Difference between revisions of "XScreenSaver"

From ArchWiki
Jump to: navigation, search
Line 67: Line 67:
  
 
==See Also==
 
==See Also==
[http://wiki.gotux.net/code:bash:pnclck PanicLock] -- Lock your screen in XFCE4 and close selected programs in background.
+
[http://wiki.gotux.net/code/bash/pnclck PanicLock] -- Lock your screen in XFCE4 and close selected programs in background.

Revision as of 19:26, 14 March 2012

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Installing XScreenSaver

Install the xscreensaver package found in the official repositories.

Alternatively, there is a patched version with the Arch Linux logo in the AUR named xscreensaver-arch-logoAUR. Running this package instead of the one available in the official repositories 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 set up your /etc/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 official repositories 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 via a line in ~/.xinitrc as follows:

/usr/bin/xscreensaver -no-splash &

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

Note: XScreenSaver is automatically started by Xfce in /etc/xdg/xfce4/xinitrc, to ensure it gets executed use startxfce4 and not xfce4-session.
exec ck-launch-session startxfce4

Multi-User Systems

If operating with multiple users with a display manager (e.g. SLiM, GDM, KDM) it is best to start XScreenSaver via the desktop manager'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.)

Another option to retain multi-user support, without having to install a second screensaver, is to modify either ~/.xscreensaver for per-user settings, or /usr/share/X11/app-defaults/XScreenSaver for global settings, and add the following line.

newLoginCommand: /usr/bin/gdmflexiserver
Note: The command given is for GDM; if you are using a different login manager, you will need to replace it with your preferred login manager's command.

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

MPlayer

Add the following to ~/.mplayer/config

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

XBMC

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 caffeineAUR does just this. Once running, simply add xbmc.bin to the list of apps for automatic activation.

Adobe Flash/MPlayer/VLC

There is no native way to disable XScreenSaver for flash, but there is script named lightsOn that works great and has support for Firefox's Flash plugin, Chromium's Flash plugin, MPlayer, and VLC.

Using XScreenSaver as animated wallpaper

You can run xscreensaver in the background, just like a wallpaper. First, kill any process that is controlling the background (the root window). Locate the desired XScreenSaver executable (they are usually on /usr/lib/xscreensaver/) and run it with the -root flag, like this

$ /usr/lib/xscreensaver/glslideshow -root &

XScreenSaver as wallpaper under xcompmgr

xcompmgr may cause problems, so you need to use xwinwrap to run it in order to use it as wallpaper. You can find it as shantz-xwinwrap-bzrAUR in the AUR.

Run it with the following command:

$ xwinwrap -b -fs -sp -fs -nf -ov  -- /usr/lib/xscreensaver/glslideshow -root -window-id WID &

Theming

XScreenSaver's unlock screen can be themed with X resources (see: XScreenSaver resources).

See Also

PanicLock -- Lock your screen in XFCE4 and close selected programs in background.