From ArchWiki
Revision as of 17:35, 15 April 2011 by Adalgiso (talk | contribs) (word choice)
Jump to navigation Jump to search

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n links end

Installing Xscreensaver

Install Xscreensaver by:

# pacman -S xscreensaver

Alternatively, there is a patched version with archlinux logo in the AUR available at this link. Running this package instead of the one available in the extra repo is advantageous for several reasons:

  1. Since makepkg is compiling it from source code, the resulting package will contain processor-specific optimizations unique to your specific system -- assuming you setup your Makepkg.conf with the appropriate CFLAGS and CXXFLAGS.
  2. This package is Arch-branded (screensavers, lock screen, etc.)
  3. If running Gnome, this package will provide an icon to enter the xscreensaver preferences under System>Preferences>Screensaver whereas the package in the extra repo does not.

Configuring Xscreensaver

Launch the GUI configuration window with

$ xscreensaver-demo

Starting Xscreensaver

Single-User Systems

Simply installing the xscreensaver package is not enough to have it run automatically. The xscreensaver program has to be started, which is commonly done by the desktop environment if operating with one user via a line in Template:Filename as follows:

/usr/bin/xscreensaver -no-splash &

The ampersand '&' argument makes xscreensaver run in the background, and is required.

Multi-User Systems

If operating with multiple users via a greeter screen such as slim, gdm, kdm, etc. it is best to start the xscreensaver via the DM's native screensaver interface. This allows full management of user switching. For example, if using Gnome, install gnome-screensaver and xscreensaver but only have gnome-screensaver active. This allows for all the screensavers to be selected, and keep the ability for user switching in the event that one user has the screen locked, and another user wants to "switch users" to he/she can access to the box.

Note: Some xscreensaver native functionality will be lost such as the ability to capture a screen, use photos in a pre-defined path, and/or display custom texts when running the DM's native screensaver with a subset of xscreensaver's offerings (for example, Flipscreen3D, photopile, etc.)

Lock Screen

You may immediately trigger xscreensaver, if it is running, and lock the screen with the following command

$ xscreensaver-command --lock

Disabling Xscreensaver for Media Applications


Add the following to Template:Filename

heartbeat-cmd="xscreensaver-command -deactivate >&- 2>&- &"


There is no native support within XBMC to disable xscreensaver (although XBMC does come with its own screensaver). A 3rd party application available in the AUR called [caffeine] does just this. Once running, simply add xbmc.bin to the list of apps for automatic activation.


XScreensaver's unlock screen can be themed, see XScreensaver Theming

Example ~/.xinitrc

Change the window manager line to your window manager.

# ~/.xinitrc
# Executed by startx (run your window manager from here)

xscreensaver -no-splash &
# exec wmaker
# exec startkde
# exec icewm
# exec blackbox
# exec fluxbox
exec icewm

Xscreensaver is automatically started by Xfce in /etc/xdg/xfce4/xinitrc, to ensure it gets executed use startxfce4 and not xfce4-session.

# ~/.xinitrc
# Executed by startx (run your window manager from here)

# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
exec ck-launch-session startxfce4