xfce4-panel lock screen button not working

Bug #200665 reported by Urbán Dániel
10
Affects Status Importance Assigned to Milestone
xfce-mcs-plugins (Ubuntu)
Triaged
Wishlist
Unassigned
xfce4-panel (Ubuntu)
Invalid
Undecided
Unassigned
xfce4-utils (Ubuntu)
Confirmed
Medium
Lionel Le Folgoc

Bug Description

Binary package hint: xfce4-utils

1) Ubuntu version: Xubuntu 8.04

2) Source package: xfce4-utils and xfce4-panel

3) Package version: 4.4.2-3ubuntu2

4) What you expected to happen:
    The "Lock screen" button should lock the screen.

5) What happened instead:
    It doesn't lock the screen.

6) Steps to reproduce:
    1. Right click on the Panel -> Add New Item -> Action Buttons -> Add
    2. Select action type: Lock screen
    3. Click on the "Lock screen" button in the Panel.
    4. Nothing happening.

7) Possible reason:
The "Action Buttons" panel plugin uses the /usr/bin/xflock4 script (provided by the package xfce4-utils).
This script try to use xscreensaver to lock the screen ("xscreensaver-command -lock"), but if xscreensaver isn't running, try to use gnome-screensaver ("gnome-screensaver-command --lock"), but if gnome-screensaver isn't running, try to use the "xlock" command to lock the screen.
But, by default, neither xscreensaver, nor gnome-screensaver is running, and none of the packages providing "xlock" are installed (xlockmore and xlockmore-gl).

8) Possible solutions:
- Modify the xflock4 script, to show a warning, if xscreensaver or gnome-screensaver isn't running.
OR
- Make xfce4-panel depend on xlockmore or xlockmore-gl, so it will be able to lock the screen, even if xscreensaver or gnome-screensaver isn't running.

[9) Another suggestion: May be good, to use the keyboard shortcut Ctrl+Alt+L to lock the screen. Currently Ctrl+Alt+Del is used, but it could be useful, to let lock the screen also with Ctrl+Alt+L as in GNOME and KDE.]

Please let me know, if I have to provide additional information about this bug.

Urbán Dániel

Revision history for this message
Lionel Le Folgoc (mrpouit) wrote : Re: [Bug 200665] [NEW] xfce4-panel lock screen button not working

Hi,

Thanks for your bug report.

> But, by default, neither xscreensaver, nor gnome-screensaver is running, and none of the packages providing "xlock" are installed (xlockmore and xlockmore-gl).

One of them should be running, launched when the session starts (by
/etc/xdg/xfce4/xinitrc line 57). Is there any error in ~/.xsession-errors?

> - Make xfce4-panel depend on xlockmore or xlockmore-gl, so it will be able to lock the screen, even if xscreensaver or gnome-screensaver isn't running.

Imho, the bug isn't in the panel, but rather in xflock4 (the actions
plugin only calls this script). But xfce4-utils which provides xflock4
already recommends "xscreensaver | xlockmore | xlockmore-gl"

> [9) Another suggestion: May be good, to use the keyboard shortcut
> Ctrl+Alt+L to lock the screen. Currently Ctrl+Alt+Del is used, but it
> could be useful, to let lock the screen also with Ctrl+Alt+L as in GNOME
> and KDE.]

If both KDE and GNOME uses Ctrl+Alt+L by default, I guess we can change
xfce4-mcs-plugins default config too. ;)

Cheers,
Lionel

 affects ubuntu/xfce4-panel
 status invalid

 affects ubuntu/xfce4-utils
 status incomplete
 importance medium
 assignee mrpouit

 affects ubuntu/xfce-mcs-plugins
 status triaged
 importance wishlist

--
Lionel Le Folgoc - https://launchpad.net/~mrpouit
EEBA 555E 0CDE 92BB 3AF4 4AB3 45A0 357B 5179 5910

Changed in xfce4-panel:
status: New → Invalid
Changed in xfce4-utils:
assignee: nobody → mrpouit
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Urbán Dániel (urban.dani) wrote :

Hi,
Thanks for the quick reply.

> One of them should be running, launched when the session starts (by
> /etc/xdg/xfce4/xinitrc line 57). Is there any error in ~/.xsession-errors?

In my ~/.xsession-errors there is nothing about the screensaver I think, but I attach it.
I see that it should start, though according to "ps aux" there is no xscreensaver or gnome-screensaver process.

> Imho, the bug isn't in the panel, but rather in xflock4 (the actions
> plugin only calls this script). But xfce4-utils which provides xflock4
> already recommends "xscreensaver | xlockmore | xlockmore-gl"

Yes, the plugin only calls the script, you are right.
I see, that xfce4-utils recommends that, and it's ok, but anyway, if for some reason, xscreensaver (or gnome-screensaver) isn't running, and the user try to lock the screen, and can't, he doesn't have any idea, why. So some warning, if none of the 3 programs are found by xflock4 would be useful, (if it can be done).

> If both KDE and GNOME uses Ctrl+Alt+L by default, I guess we can change
> xfce4-mcs-plugins default config too. ;)

Thanks :-)

Urbán Dániel

Revision history for this message
Gauvain Pocentek (gpocentek) wrote :

/etc/xdg/xfce4/xinit doesn't want to start the screensavers and I don't get why. The bug comes from this problem IMO.

Changed in xfce4-utils:
status: Incomplete → Confirmed
Revision history for this message
Urbán Dániel (urban.dani) wrote :

Yes, I agree, if I start a screensaver manually, everything works fine.
Unfortunately it doesn't start automatically...

Revision history for this message
Ivà Burgos (ivaburgos) wrote :

Same problem here on a clean xubuntu daily install (Xubuntu 8.04 and xfce4-utils 4.4.2-4ubuntu1).

In my system, the screensaver doesn't start because startxfce4 are never called by default gdm session so /etc/xdg/xfce/xinitrc are not processed at all. You need to explicitly select Xfce Session in gdm login but on a clean installation this session isn't the default.

Not sure how to proceed.

Revision history for this message
Teoh Han Hui (teohhanhui) wrote :

gnome-screensaver should be autostarted as it is used as the default screensaver in Xubuntu 8.04. xflock4 fails as no screensaver is started and xlock is not installed.

There is an entry in the/etc/xdg/xfce4/xinitrc for loading either xscreensaver or gnome-screensaver. However, for some reason the file is not processed?

Revision history for this message
Ivà Burgos (ivaburgos) wrote :

Teoh Han Hui, please select Xfce Session in gdm login and try it again. If that solves the problem then it will confirm that for some reason the default session in gdm is not calling startxfce4, as I said before.

Revision history for this message
Teoh Han Hui (teohhanhui) wrote :

I confirm that.

Xubuntu's default session is "Run XClient script" which fails to load any screensavers. Might be a problem with the XClient script? Choose "Xfce session" in gdm and the screensaver, xflock4 will work fine.

What extra things that the XClient script actually does and where is it located?

Revision history for this message
Jordan Callicoat (monkeesage) wrote :

As far as I can tell, the "XClient script" it refers to is:

/usr/share/gdm/BuiltInSessions/default.desktop

which calls (by special "exec" keyword):

/etc/X11/xinit/xinitrc

which sources:

/etc/X11/Xsession

Xsession then sources:

~/.xsession

from:

/etc/X11/Xsession.d/40x11-common_xsessionrc

So putting all that together, linking the xfce4 xinitrc script to ~/.xsession should make everything work properly as if you had explicitly chosen the "Xfce session" with startxfce4.

ln -s /etc/xdg/xfce4/xinitrc /home/sage/.xsession

Ps. This is also a problem for applications like Banshee and last-exit which rely on the environment variable DBUS_SESSION_BUS_ADDRESS to connect to DBus; that variable only gets exported from the xfce4 xinitrc script, so without the link to ~/.xsession they cannot connect to the session bus.

Revision history for this message
Teoh Han Hui (teohhanhui) wrote :

But this has to be done for every user.

What is the disadvantage of selecting "Xfce session" instead of "Run XClient script" in gdm? If none, why isn't "Xfce session" used as the default?

Revision history for this message
Jordan Callicoat (monkeesage) wrote :

Yes, I agree. I don't know of any advantage to using the Xsession way. I think using the xfce4 session as default is better. But it also doesn't hurt to link the xfce xinitrc as well, so that if someone chooses the "XClient script" option ("What does this do...?"), it still works correctly.

Revision history for this message
Matthew Caron (matt-mattcaron) wrote :

I can confirm this bug and the workaround.

If I use the default login on a vanilla Xubuntu 8.04 install, the screensaver does not activate and locking does not work.

If I select Xfce login in GDM, it all works correctly.

Revision history for this message
Lionel Le Folgoc (mrpouit) wrote :

Yes, xubuntu-default-settings (>= 0.34) ships a broken gdm config (DefaultSession=default.desktop should be replaced with DefaultSession=xfce4.desktop).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.