xscreensaver systemd user service init : wait for DISPLAY
1
vote
1
answer
1105
views
I have xscreensaver running as a user service and see that often it fails to start. The status shows
DISPLAY not set
.
I've changed the service definition to now retry and that seems to be working
[Unit]
Description=XScreenSaver
StartLimitInterval=200
StartLimitBurst=5
[Service]
ExecStart=/usr/local/bin/xscreensaver -nosplash
Restart=always
RestartSec=30
[Install]
WantedBy=default.target
Is there a better way to do this? My guess is that because this is a user service it is starting sometimes before the user environment is fully set.
Ideally the start would wait for DISPLAY to be set.
The restart strategy seems crude but perhaps that's the best I can do.
Asked by Stephen Boston
(2526 rep)
Feb 18, 2020, 02:02 PM
Last activity: Oct 14, 2020, 10:35 AM
Last activity: Oct 14, 2020, 10:35 AM