XScreenSaver is a screen saver and locker for the X Window System.
Install the package.
For an Arch Linux branded experience, install theAUR package.
Most options are configured on a user-by-user basis by running xscreensaver-demo. xscreensaver-demo writes the chosen configuration to
~/.xscreensaver, discarding any manual modifications to the file. Global options are defined in
DPMS and blanking settings
XScreenSaver manages screen blanking and display energy saving (DPMS) independently of X itself and overrides it. To configure the timings for blanking, standby, display poweroff and such, use xscreensaver-demo or edit the configuration file manually, e.g.
timeout: 1:00:00 cycle: 0:05:00 lock: False lockTimeout: 0:00:00 passwdTimeout: 0:00:30 fade: True unfade: False fadeSeconds: 0:00:03 fadeTicks: 20 dpmsEnabled: True dpmsStandby: 2:00:00 dpmsSuspend: 2:00:00 dpmsOff: 4:00:00
DPMS and screen blanking can be disabled by starting xscreensaver-demo and, for the Mode setting, choosing Disable Screen Saver.
To immediately trigger
xscreensaver, if it is running, and lock the screen, execute the following command:
$ xscreensaver-command -lock
Lock on suspend
See Power management#xss-lock. You may want to set XScreenSaver's fade out time to 0.
User switching from the lock screen
By default, XScreenSaver's New Login button in the lock screen will call
/usr/bin/gdmflexiserver to switch users. Other display managers than GDM or KDM that support user switching (such as LightDM) require a different command.
As modifications in
~/.xscreensaver are discarded by xscreensaver-demo,
~/.Xresources is used in this section.
To use LXDM's switching mode:
xscreensaver.newLoginCommand: lxdm -c USER_SWITCH
To use LightDM's switching mode:
xscreensaver.newLoginCommand: dm-tool switch-to-greeter
Tips and tricks
Disable during media playback
Add the following to
heartbeat-cmd="xscreensaver-command -deactivate >&- 2>&- &"
One can run
xscreensaver in the background, just like a wallpaper. First, kill any process that is controlling the background (the root window).
Then, locate the desired XScreenSaver executable (typically in
/usr/lib/xscreensaver/) and run it with the
-root flag, for example:
$ /usr/lib/xscreensaver/glslideshow -root &
You can configure xscreensaver to write to a log file by creating the logfile
# touch /var/log/xscreensaver.log and then specifying its X resource logFile.
To log verbose debugging information to the logFile as well start xscreensaver with the
-verbose command line option, or add this to