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:
- 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.
- This package is Arch-branded (screensavers, lock screen, etc.)
- 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.
Launch the GUI configuration window with
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.
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.
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
Change the window manager line to your window manager.
#!/bin/sh # # ~/.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
#!/bin/sh # # ~/.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