I wrote a systemd user unit to start xscreensaver, since I want it to start up automatically. Here's what it looks like:
# ~/.config/systemd/user/xscreensaver.service
[Unit]
Description=XScreensaver
[Service]
Type=simple
ExecStart=/run/current-system/sw/bin/xscreensaver -no-splash
Restart=always
[Install]
WantedBy=multi-user.target
This starts up; however, it's not following the configuration that I'd laid out (as it does when I just start it manually). I think this is because the HOME directory isn't being set (xscreensaver looks in ~/.xscreensaver
for its configuration). But even adding in a line
Environment=HOME=/home/username
in the [Service]
section in my unit doesn't fix this; it's still not reading the configuration file. As far as I know, xscreensaver doesn't have a command-line argument to customize the path to the config file. What do I need to do to communicate the correct home directory to xscreensaver?
EDIT: after closer inspection, it seems that xscreensaver is looking at the right config file; however, it's simply just not displaying any of the images (my configuration is just GLSlideshow pointing at a directory). It might be that it's failing to find something in the path that it's looking for?