You are not logged in.

#1 2020-02-06 15:29:24

ipyakuza
Member
Registered: 2013-06-24
Posts: 50

[SOLVED] How should you configure xscreensaver to run as part of xorg

I've been trying to configure xscreensaver to run as part of my xorg session (whenever I kickoff via startx).  There was one thread I read on here that noted I should setup xscreensaver as a user systemd service.  I've tried this but seems like a race condition as when I login if I don't start xorg immediately the service fails to launch (system unit file below) because there is no xorg session to attach to.  Not sure if there is a dependency I can declare in the service file to wait for xorg or not.

The other method I believe is just adding it to .xinitrc before kicking off exec i3.

Reading the Arch wiki (https://wiki.archlinux.org/index.php/XS … figuration) I didn't see any specific method called out, it noted how to manually launch it and some tweaks for various players/Kodi/etc. but not a recommendation on how it should be configured to run as part of my user xorg session.

Any advice appreciated.

[Unit]
Description=XScreensaver

[Service]
ExecStart=/usr/bin/xscreensaver -no-splash

[Install]
WantedBy=default.target

Last edited by ipyakuza (2020-02-06 18:08:04)

Offline

#2 2020-02-06 15:49:37

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,325

Re: [SOLVED] How should you configure xscreensaver to run as part of xorg

If you have and use an xinitrc, that's the most straight forward and local approach.
Otherwise you'd have to make your X11 session a systemd user-service/target and depend the screensaver on that.

Offline

#3 2020-02-06 18:06:42

ipyakuza
Member
Registered: 2013-06-24
Posts: 50

Re: [SOLVED] How should you configure xscreensaver to run as part of xorg

Thanks.  I've added to my .xinitrc and it seems to be working:

# For xscreensaver to run as part of the x session
/usr/bin/xscreensaver -nosplash &

# Launch i3 window manager
exec i3

Offline

#4 2020-02-06 20:27:33

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,325

Re: [SOLVED] How should you configure xscreensaver to run as part of xorg

In case that's your entire xinitrc, please see the second note in https://wiki.archlinux.org/index.php/Xinit#xinitrc

Offline

#5 2020-02-06 21:16:58

ipyakuza
Member
Registered: 2013-06-24
Posts: 50

Re: [SOLVED] How should you configure xscreensaver to run as part of xorg

I wasn't aware of this (of course I'm not aware of a lot of thing in linux yet but learning quickly).  Thanks again for the tip and your help.

Offline

Board footer

Powered by FluxBB