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: /usr/lib/systemd/user/xscreensaver.service:5: Executable path is not absolute: xscreensaver апр 03 18:07:22 nestor-Eve-V systemd: 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:
[Unit] Description=XScreenSaver [Service] ExecStart=xscreensaver [Install] WantedBy=default.target
Do I have to type there an absolute path? Any ideas how can I enable screensaver to work properly? thanks