GNOME Bugzilla – Bug 561855
Calls wrong slideshow binary if there is one installed in $PATH
Last modified: 2009-02-21 05:37:13 UTC
I've got plt-drscheme installed, which installs a binary called slideshow in /usr/bin. Gnome-screensaver also has a binary called slideshow, installed in /usr/lib64/gnome-screensaver. Now when clicking on the Pictures folder screensaver in g-s preferences dialog, a preview of /usr/lib64/gnome-screensaver/slideshow should be shown of this screensaver in the dialog. Instead /usr/bin/slideshow is started, resulting in plt's slideshow application being shown full screen. g-s should use the full path for /usr/lib64/gnome-screensaver/slideshow or it should prepend /usr/lib64/gnome-screensaver/ to $PATH before starting a screensaver.
Created attachment 123539 [details] [review] set helper full path when generating .desktop file Attached patch ensure .desktop are generated with full path for the various screensaver helper used.
Committed to trunk. Thanks!
This has broken normal running of screensavers as the find_command function in src/gs-theme-manager.c already checks the exec in the desktop file against a list of directories not including root. For example, with 2.25.2 gnome-screensaver is checking against the following and failing. /usr/libexec/gnome-screensaver/usr/libexec/gnome-screensaver/popsquares /usr/lib/misc/xscreensaver/usr/libexec/gnome-screensaver/popsquares /usr/libexec/xscreensaver/usr/libexec/gnome-screensaver/popsquares /usr/libexec/xscreensaver/usr/libexec/gnome-screensaver/popsquares /usr/lib/xscreensaver/usr/libexec/gnome-screensaver/popsquares
Confirmed. With this patch, all screensavers are broken and just a blank screen is shown. If I remove the full path from cosmos-slideshow.desktop (on a system where plt is not installed), the Cosmos screensaver starts working again.
Created attachment 129199 [details] [review] patch Here is a patch that also accepts full paths in the trusted directories
* src/gs-theme-manager.c (find_command): Accept a full path as long as it is one of the trusted directories. (#561855)