HOWTO Skin the Lock and Unlock Dialog in XScreenSaver
From Gentoo Linux Wiki
| Installation • Kernel & Hardware • Networks • Portage • Software • System • X Server • Gaming • Non-x86 • Emulators • Misc |
Contents |
[edit] Introduction
XScreenSaver is a widely used and useful tool to prevent pixels in your monitor from burning in. One aspect of the XScreenSaver is it's Lock/Unlock feature which allows you to leave your PC unattended safely. The Unlock dialog, however, looks merely functional and most would argue that it looks bad. This article will explain how you can alter the Unlock Dialog box of the XScreenSaver and make it look prettier.
[edit] What you will need
For the bare minimum, you will need these:
- A running Gentoo Linux system
- X Server
- Alan Swanson's XScreenSaver Theme Patch
For customizing further, and adding your own logo, you will also need these:
- Your own logo
- A Pixmap editing utility
[edit] Removing XScreenSaver
You will first have to remove your existing installation of XScreenSaver. This needs to be done because the patch will be compiled into your XScreenSaver. Run this command as root:
emerge -C xscreensaver
[edit] Download the Theme Patch File
Depending on which version of XScreenSaver you have, download the appropriate patch.
Upto XScreenSaver 4.20 -> Download Patch 1.0
Over XScreenSaver 4.20 -> Download Patch 1.1
[edit] Create a local ebuild
We will be creating our own ebuild for this patch. Therefore, we need to add a Portage Overlay Directory and make a few changes in the original ebuild file. This will ensure the local ebuild takes precedence over the original ebuild
echo PORTDIR_OVERLAY=\"/usr/local/portage/\" >> /etc/make.conf mkdir /usr/local/portage/x11-misc cp -r /usr/portage/x11-misc/xscreensaver /usr/local/portage/x11-misc cd /usr/local/portage/x11-misc/xscreensaver cp /path/to/xss-lock-theme-1.0.patch files/
Then, edit your original XScreenSaver ebuild file (We will use XScreenSaver 4.20 in this HOWTO) :
| File: xscreensaver-4.20.ebuild |
src_unpack() {
unpack ${A}
cd ${S}
------ LINES ADDED ------
#XScreenSaver Lock Patch
epatch ${FILESDIR}/xss-lock-theme-1.0.patch
------ LINES ADDED ------
# disable rpm -q checking, otherwise it breaks sandbox if rpm is installed
epatch ${FILESDIR}/${PN}-4.20-norpm.patch
# set default fortune to /usr/bin/fortune even if one can't be found
epatch ${FILESDIR}/${PN}-4.14-fortune.patch
# disable not-safe-for-work xscreensavers
use offensive || epatch ${FILESDIR}/${PN}-4.16-nsfw.patch
|
You can also use this diff against -4.23-r1 that gives you use-flags for the themes:
| File: xscreensaver-4.23-r1.patch |
--- /usr/portage/x11-misc/xscreensaver/xscreensaver-4.23-r1.ebuild 2006-02-07 13:17:34.000000000 +0100
+++ /usr/local/portage/x11-misc/xscreensaver/xscreensaver-4.23-r1.ebuild 2006-03-01 23:14:50.000000000 +0100
@@ -4,10 +4,12 @@
inherit eutils flag-o-matic pam fixheadtails autotools
-IUSE="gnome jpeg kerberos krb4 insecure-savers new-login nls offensive opengl pam xinerama"
+IUSE="gnome jpeg kerberos krb4 insecure-savers new-login nls offensive opengl pam xinerama theme-default theme-entity theme-darkalu"
DESCRIPTION="A modular screen saver and locker for the X Window System"
-SRC_URI="http://www.jwz.org/xscreensaver/${P}.tar.gz"
+SRC_URI="http://www.jwz.org/xscreensaver/${P}.tar.gz
+http://www.swanson.ukfsn.org/xss/xss-theme-darkalu10-lcd-1.0.tar.gz
+http://www.swanson.ukfsn.org/xss/xss-theme-entity-1.0.tar.gz"
HOMEPAGE="http://www.jwz.org/xscreensaver/"
LICENSE="BSD"
@@ -70,6 +72,15 @@
unpack ${A}
cd ${S}
+ if use theme-default || use theme-darkalu || use theme-entity; then
+ epatch ${FILESDIR}/xss-lock-theme-1.1.patch
+ fi
+ if use theme-darkalu; then
+ unpack xss-theme-darkalu10-lcd-1.0.tar.gz
+ fi
+ if use theme-entity; then
+ unpack xss-theme-entity-1.0.tar.gz
+ fi
# disable rpm -q checking, otherwise it breaks sandbox if rpm is installed
# use gnome-terminal in tests rather than gnome-open (bug #94708)
# and bug 118028:
|
You can apply it with (I think)
patch < xscreensaver-4.23-r1.patch
Then run:
ebuild xscreensaver-4.20.ebuild digest
[edit] Installing XScreenSaver
You should be ready to emerge the XScreenSaver package now:
emerge xscreensaver
[edit] Screenshots of Default Theme
Some screenshots are available on Alan Swanson's Site
[edit] Adding your own Logo
...to be added soon.
[edit] Author and Credits
This page was written by Sheran Gunasekera <sheran@zensay.com> Feedback is always welcome
In addition, Special Thanks go out to the following people:
Oliver Grawert http://www.grawert.net/ - Customized the dialog in Ubuntu Linux & provided valuable guidance Alan Swanson http://www.swanson.ukfsn.org/ - Creator of the XScreenSaver Patch Jamie Zawinski http://www.jwz.org/ - Creator of XScreenSaver
