lubuntu-desktop team mailing list archive
Mailing list archive
Re: [Lxde-list] Try to make a conclusion for lxsession-logout and screen locking.
On Wed, Sep 15, 2010 at 4:19 AM, Guido Berhoerster
> * PCMan <pcman.tw@xxxxxxxxx> [2010-09-14 15:48]:
>> > No, running "gnome-screensaver-command -l" without
>> > gnome-screensaver running will print
>> > **Message: Screensaver is not running!
>> > and return exit code 1.
>> This is not the case on my box.
>> It tried to launch gnome-screensaver even if this command failed.
>> I'm using ubuntu 10.04.
>> Please read the source code of gnome-screesaver-command.
>> Is doesn't do what you said.
>> It exit with code 1 only when you pass wrong arguments, when dbus is
>> not available, and when you query the version number.
>> It return 0 even if gnome-screensaver is not running.
>> The dbus call, however, will cause the gnome-screensaver service being launched.
>> I don't know the version of gnome-screensaver you're using, but from
>> the latest code in git, it doesn't not work the way we want.
> I admit you are right on this one, the DBus autostart seems to
> have been introduced in April:
> They more or less silently changed the behavior of
> gnome-screensaver-command breaking shell scripts (including one
> of mine for inhibiting the screensaver while running an
> application) relying on the previous behavior which was modeled
> after xscreensaver-command, just lovely.
Since they do things with the dirty way, here is a dirty solution I
came up with.
dbus-send --session --type=method_call --print-reply
--dest=org.freedesktop.DBus / org.freedesktop.DBus.NameHasOwner
Maybe this command line can do the trick.
> If someone has gnome-screensaver installed and is running another
> screensaver I don't see any way to tell from a shellscript which
> one to use now. Looking for a process is just plainly broken and
> unreliable by principle, e.g. someome might suspend before the
> session has started gnome-screensaver, see
But this should be a rare case. Maybe we should ask gnome-screensaver
developers how to solve this.
> For lxsession I'd propose to use my script and remove
> gnome-screensaver-command from the list. If someone wants to use
> it, it can still be added as an explicit locking command in the
> config file.
> Since I find changing the cli silently in a minor version upgrade
> unacceptable I am also going to file a bug against
> Guido Berhoerster