Bug 674 - lock unfunctional on Gnome with xscreensaver installed
Status:
RESOLVED FIXED
Component:
Core
Version:
1.8.3
Hardware:
PC Linux
Importance:
P4 normal
Target Milestone:
---
Assignee:
Rob Caelers
URL:
http://bugs.debian.org/441930
Depends on:
Blocks:
Reported:
Sep 12 2007 03:16:29 UTC
by:
Francois Marier
Modified:
Sep 14 2007 18:21:14 UTC
| Id | Who | When | Size | Type |
|---|---|---|---|---|
| 102 | Locking fix | |||
| Francois Marier | Sep 12 2007 23:48:17 UTC | 5230 | text/plain | |
| Who | When | What | Removed | Added |
|---|---|---|---|---|
| Rob Caelers | Sep 14 2007 18:21:14 UTC | status | NEW | RESOLVED |
| resolution | FIXED |
Description
Francois Marier Sep 12 2007 03:16:29 UTC
Philipp Kern <pk**@de**.org> suggested (on the Debian bug tracker) changes to the current screensaver detection code:
frontend/common/src/System.cc:
if (is_kde() && (lock = g_find_program_in_path("kdesktop_lock")))
{
xlock = g_strdup_printf("%s --display \"%s\" --forcelock",
lock, display);
}
else if ((lock = g_find_program_in_path("xscreensaver-command")))
{
xlock = g_strdup_printf("%s --display \"%s\" -lock",
lock, display);
}
else if ((lock = g_find_program_in_path("xlock")))
{
xlock = g_strdup_printf("%s -display \"%s\"",
lock, display);
}
else if ((lock = g_find_program_in_path("gnome-screensaver-command")))
{
xlock = g_strdup_printf("%s --lock", lock);
}
This works correctly for KDE users as `kdesktop_lock' is invoked. But it
does not work for Gnome users when xscreensaver is installed [but not used].
`xscreensaver-command' does just bail out with the failure that no
xscreensaver is active on the current desktop[1]. No further xlock command
is tried, because only one is set within System::init(...).
IMHO the order should be changed so that xlock is last (as a fallback if
nothing else works) and the various commands should be tried in order
until the first exit code is zero.Comment 1
Francois Marier Sep 12 2007 23:48:17 UTC
Created attachment 102 Locking fix Philipp Kern has proposed the following patch which fixes the problem on his machine.