OK, I figured this one out. The problem was that GLSlideshow was expecting something (not exactly sure what) to be callable on its PATH, and systemd wasn't giving it the path. So what fixed it was:
[Unit] Description=XScreensaver [Service] Type=simple ExecStart=/run/current-system/sw/bin/xscreensaver -no-splash Restart=always Environment=HOME=/home/myusername Environment=PATH=/run/current-system/sw/bin [Install] WantedBy=multi-user.target
(Note that the /run/current-system/sw/bin
path is specific to my distribution, NixOS. It's possible that for more standard systems, e.g. ones that use /bin
or /usr/bin
, that this wouldn't come up.)