I don't understand Linux and sys-admin stuff, but I have installed recently xscreensaver Ubuntu 18.04.4 LTS as described here and I have followed all the steps. If I lock the screen with Cntrl+Alt+L then the xscreensaver starts. But If I wait for the screen to time out, it just goes blank black like the gnome-screensaver does, despite that I have gnome-screensaver installed. Curiously, when I type locate screensaver.desktop I get:


I was afraid to delete the gnome-screensaver.desktop file, so I out commented everything in it. Still, same problem persists.

If after a restart I type xscreensaver -nosplash I get:

xscreensaver: 18:39:29: already running on display :0 (window 0x1a000de) 

I guess, this is good and excludes the possibility that screensaver just doesn't get automatically started on start-up.

Then I followed the instructions here and I did:

sudo apt-get remove --auto-remove gnome-screensaver
sudo apt-get purge --auto-remove gnome-screensaver
systemctl --user enable xscreensaver.service
systemctl --user start xscreensaver.service

After the last command I got the message:

Failed to start xscreensaver.service: Unit xscreensaver.service is not loaded properly: Exec format error.
See user logs and 'systemctl --user status xscreensaver.service' for details.

The referred log says:

● xscreensaver.service - XScreenSaver
   Loaded: error (Reason: Exec format error)
   Active: inactive (dead)

апр 03 18:07:22 nestor-Eve-V systemd[1492]: /usr/lib/systemd/user/xscreensaver.service:5: Executable path is not absolute: xscreensaver
апр 03 18:07:22 nestor-Eve-V systemd[1492]: xscreensaver.service: Cannot add dependency job, ignoring: Unit xscreensaver.service is not loaded properly: Exec format error.

This suggests the problem is "Executable path is not absolute", so I opened the file /usr/lib/systemd/user/xscreensaver.service and it contains:


Do I have to type there an absolute path? Any ideas how can I enable screensaver to work properly? thanks

  • 1
    19.04 has passed its end of public support. As per askubuntu.com/help/on-topic we can assist with upgrading to a current version. – K7AAY Apr 3 '20 at 15:47
  • @K7AAY My bad, I checked with lsb_release -a and my version is 18.04.4 LTS. Do you have any ideas regarding the problem and can you upvote it again? – NeStack Apr 3 '20 at 19:13

Thanks for your question, @NeStack.

This error message seems clear:

systemd[1492]: /usr/lib/systemd/user/xscreensaver.service:5: Executable path is not absolute: xscreensaver

So I opened the file with sudo vim /usr/lib/systemd/user/xscreensaver.service and saw this:


I replaced it with ExecStart=/usr/bin/xscreensaver, after which systemctl --user start xscreensaver.service no longer gives an error. `

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.