Skip to content

Unable to create new xfce4-screensaver entry with arbitrary Exec path

I'm trying to create a new screensaver entry by using an existing program such as /usr/bin/xeyes. My ultimate goal is to be able to use any arbitrary command as a screensaver, specifically the /usr/bin/mpv movie player to play a looping video as a screensaver.

My system info:

$ cat /etc/issue
Ubuntu 20.04 LTS \n \l

$ uname -a
Linux FOO 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

$ xfce4-screensaver-command --version
xfce4-screensaver-command 0.1.10

If you study the following two links, you will find basically the same procedure for creating a new xfce4-screensaver entry:

https://docs.xfce.org/apps/xfce4-screensaver/faq#where_are_all_the_screensavers

https://www.youtube.com/watch?v=tiJwKVPlyuY

Following the official XFCE docs, I created the below 6 lines saved in the file "/usr/share/applications/screensavers/xfce-xeyes-screensaver.desktop":

[Desktop Entry]
Type=Application
Name=Xeyes
Exec=/usr/bin/xeyes
TryExec=/usr/bin/xeyes
Categories=Screensaver;

This DOES correctly cause an new entry named "Xeyes" to show up in my Screensaver Preferences GUI, but it DOES NOT actually work, when I click on that entry for a preview it just shows a blank screen.

Further, when I run killall xfce4-screensaver to stop the default process, then run it manually in a terminal via xfce4-screensaver --debug, and click the screen lock button, I am able to find the following error which does not show up with the working screensaver entries:

...
[manager_maybe_start_job_for_window] gs-manager.c:210 (16:18:43.490): Starting job for window
[gs_job_start] gs-job.c:453 (16:18:43.490): Starting job
[spawn_on_widget] gs-job.c:360 (16:18:43.492): Could not start command '(null) ': Failed to execute child process “(null)” (No such file or directory)
...

See attached file for full debug output.

I have confirmed that it DOES WORK if I just copy the "Exec" and "TryExec" lines from one of the existing screensaver entries such as "Exec=/usr/libexec/xfce4-screensaver/popsquares", which shows the "Pop art squares" screensaver and DOES NOT give the error above.

Searching the Internet for "[spawn_on_widget] gs-job.c" or "Could not start command (null)" both brought up nothing! Please help

wbraswell_20231231-xfce4_screensaver_debug.txt

[ EDIT: I will leave this issue open for the "arbitrary Exec path" enhancement request, and create a new issue for any further concerns. ]

Edited by William N. Braswell, Jr.