FS#37322 - [lxsession] Systemd patch for 1:0.4.6.1-1 breaks lxlock

Attached to Project: Community Packages
Opened by Brandon Moller (trogdor1138) - Sunday, 13 October 2013, 18:46 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Monday, 11 November 2013, 11:20 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Bartłomiej Piotrowski (Barthalion)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

Version 1:0.4.6.1-1 of lxsession has a patch applied to upstream sources to enable compatibility with systemd functions. However, this patch also includes a change to enable the use of xdg-screensaver. The current order of the patch places an attempt to use xdg-screensaver before using lxlock, which makes options otherwise usable with lxlock unavailable for screen locking. An example is the 'xlock' binary from the 'xlockmore' package.

The current patch makes the following change to lxsession-logout.c:

+static const gchar* determine_lock_screen(void)
+{
+ const gchar* program = NULL;
+
+ if (g_find_program_in_path("xdg-screensaver"))
+ {
+ program = "xdg-screensaver lock";
+ }
+ else if (g_find_program_in_path("lxlock"))
+ {
+ program = "lxlock";
+ }
+ return program;
+}
+
+

If this patch were changed to the following, this problem is resolved:

+static const gchar* determine_lock_screen(void)
+{
+ const gchar* program = NULL;
+
+ if (g_find_program_in_path("lxlock"))
+ {
+ program = "lxlock";
+ }
+ else if (g_find_program_in_path("xdg-screensaver"))
+ {
+ program = "xdg-screensaver lock";
+ }
+ return program;
+}
+
+

Alternatively, the latest upstream stable sources (http://sourceforge.net/projects/lxde/files/LXSession%20%28session%20manager%29/LXSession%200.4.9/) include support for xdg-screensaver when locking the screen, in the correct order so as to not break xlock. I am not sure as to upstream support for systemd.


Steps to reproduce:

- Install only lxsession and xlockmore without any other supported screen lockers, such as gnome-screensaver, xscreensaver, etc.

- Execute lxlock directly and observe how the screen is locked with xlock, as expected

- Execute lxsession-logout, then select lock from the options presented

- If the xdg-screensaver binary is present, as it should be as part of the 'xdg-utils' package, nothing happens and the screen does not lock


Expected result:

The lxsession-logout screen locker should work with any of the options supported by lxlock.
This task depends upon

Closed by  Bartłomiej Piotrowski (Barthalion)
Monday, 11 November 2013, 11:20 GMT
Reason for closing:  Fixed
Additional comments about closing:  lxsession 1:0.4.6.1-2
Comment by Jelle van der Waa (jelly) - Monday, 14 October 2013, 07:52 GMT
Could you upload the modified patch, since copy-pasting from the patch above might be a bit annoying ;)

Loading...