GNOME Bugzilla – Bug 573495
logout_command setting may be overwritten with keyboard_command value
Last modified: 2009-05-01 23:28:24 UTC
Please describe the problem: The gnome-screensaver daemon's internal setting for the logout_command value is sometimes overwritten with the value for keyboard_command (from the gconf key embedded_keyboard_command), thus breaking the logout button in the unlock dialog. Steps to reproduce: 1. Enable logout (e.g. /apps/gnome-screensaver/logout_enabled = true, /apps/gnome-screensaver/logout_command = /usr/bin/gnome-session-save --kill --silent, /apps/gnome-screensaver/logout_delay = 1) and locking (/apps/gnome-screensaver/lock_enabled = true, /apps/gnome-screensaver/lock_delay = 1) 2. Lock the screen (e.g. gnome-screensaver-command -l), wait for the logout delay interval to elapse 3. Click the Logout button when it appears in the unlock dialog. Actual results: On some occasions, nothing; more specifically, on these occasions, it will try to execute what has been set as the embedded_keyboard_command instead of the logout_command. If the embedded_keyboard_command value is unset, nothing happens. Expected results: The command specified in logout_command should be executed. Does this happen every time? No Other information: This seems to be caused by a copy-and-paste error in gs-manager.c, which causes the logout_command value to be overwritten internally with the value of embedded_keyboard_command, when it is trying to update the internal value for the latter. (I am not exactly sure when this update happens). I will attach a patch which should fix the problem. Also, I noticed that at least in some places where the code is checking whether a command value is set, it only checks for a NULL string, not an empty string, though it seems that an empty string is actually retrieved from the gconf setting. Thus when this bug is triggered, and embedded_keyboard_command is unset, you will see that gnome-screensaver-dialog is invoked with arguments "... --enable-logout --logout-command= ...", i.e. with the logout command set to an empty string. The patch I am attaching does not address this problem.
Created attachment 129697 [details] [review] Fix overwriting of logout_command value with the keyboard_command value Attaching the patch.
Nice catch. Fixed the copy/paste bug in stable. Thanks! Yes would be best to also check for empty strings too. Do you have a patch for that also?
No, sorry, I do not have a patch for the empty strings problem, and am not sure when I might have time to do so.