Gentoo Wiki




GNOME screensaver is a replacement for X screensaver, but after I emerge gnome-screensaver, there are just few generic savers. The information at the end of emerging gnome-screensaver is mostly correct but will not give you all the screen savers from the xscreensaver package. This howto hopes to fix this temporary problem in a way specific to Gentoo.


Add -gnome to the xscreensaver package in /etc/portage/package.use and re-emerge xscreensaver. Also emerge gnome-screensaver if it isn't already installed with GNOME.

For example:

echo "x11-misc/xscreensaver -gnome" >> /etc/portage/package.use
emerge -avt xscreensaver
emerge -1uavt gnome-screensaver


The message at end of emerging gnome-screensaver tell us to go to /usr/share/doc/gnome-screensaver-(someversion) directory and run scripts there to import over screen savers from xscreensaver. I followed their instructions but did my conversion in /tmp:

cd /usr/share/doc/gnome-screensaver-*
mkdir /tmp/junk
cp xscreensaver-config.xsl.bz2 /tmp/junk
cd /tmp/junk
bunzip2 *
chmod a+x
./ /usr/share/xscreensaver/config/*.xml
mv *.desktop /usr/share/applications/screensavers/
cp /usr/lib/misc/xscreensaver/* /usr/libexec/gnome-screensaver

Alternatively, you could use the following procedure to keep from having to duplicate the executables of the individual screensavers:

for i in `ls /usr/lib/misc/xscreensaver/` ; do ln -s /usr/lib/misc/xscreensaver/$i /usr/libexec/gnome-screensaver/$i ; done

That should do it. Note that the generic conversion instruction tell us to put *.desktop files in /usr/share/gnome-screensaver/themes, but it appears the new location for *.desktop info files is in /usr/share/applications/screensavers/

XFCE4 support

XFCE's "lock screen" action button invokes the shell script /usr/bin/xflock4 which contains the logic to:

In combination with gnome-screensaver's ebuild depending on xscreensaver, this results in xflock4 always executing xscreensaver.

As an easy workaround, you can run as root:

chmod -x /usr/bin/xscreensaver-command
Retrieved from ""

Last modified: Sat, 27 Sep 2008 10:10:00 +0000 Hits: 6,960