tags/gnomebloghttp://blog.spang.cc/tags/gnome/blogikiwiki2010-01-06T19:33:59Zconfiguring Gnome screensaver for unicode-screensaverhttp://blog.spang.cc/posts/configuring_Gnome_screensaver_for_unicode-screensaver/2010-01-06T19:33:59Z2010-01-06T19:33:59Z
<p>I love unicode. You should too. For the unicode-lover out there,
<a href="https://www.joachim-breitner.de/blog/">Joachim Breitner</a> recently
created an xscreensaver hack called unicode and
<a href="http://packages.debian.org/sid/unicode-screensaver">uploaded it to debian</a>.
[1] I didn't like the default colourscheme of black text on a white background,
so I hacked it to support colour configurability. The patches are in the
Debian package as of version 0.2-1.</p>
<p>If you're using xscreensaver, you can configure it using the xscreensaver
configuration dialog for a subset of the
<a href="http://en.wikipedia.org/wiki/X11_color_names">available colours</a>. If you
want different colours, you can edit ~/.xscreensaver by hand.</p>
<p>Gnome screensaver, however, does not have a configuration UI, opting
instead to present a simpler interface and also allow administrators to
lock down the screensaver configuration if desired. You can still configure
the screensaver on unlocked systems without a GUI. Here's how to do it. [2]</p>
<p>At a terminal:</p>
<pre><code>mkdir -p .local/share/applications/screensavers
cp /usr/share/applications/screensavers/unicode.desktop .local/share/applications/screensavers
editor .local/share/applications/screensavers
</code></pre>
<p>There's an Exec line in the file that should look like this:</p>
<pre><code>Exec=/usr/lib/xscreensaver/unicode -root
</code></pre>
<p>Change it to look like this:</p>
<pre><code>Exec=/usr/lib/xscreensaver/unicode -root -background <bgcolor> -foreground <fontcolor>
</code></pre>
<p>Swap the two colours with any X11 colour of your choice. Make sure to quote
any multiple-word colour names. I like black as a background, with white or
firebrick or another non-jarring bright colour as the font colour.</p>
<p>If you want, you can also change the "Name" field in the file, but it's
not necessary for things to work.</p>
<p>Now, open up gnome-screensaver-preferences and select the new screensaver.</p>
<p><a href="http://blog.spang.cc/images/unicode_recycling.png/">
<img src="http://blog.spang.cc/images/unicode_recycling_small.png" alt="U+2673: RECYCLING SYMBOL FOR TYPE-1 PLASTICS" />
</a></p>
<p>Lastly, leave your laptop strategically with the screensaver on to geek out
all your friends with your unicode prowess.</p>
<p>[1] Thanks Joachim!</p>
<p>[2] There is actually another way to do it, if you prefer to interact
graphically. For the other method, get
/usr/share/applications/screensavers/unicode.desktop, edit it to your taste,
and then drag-and-drop it onto gnome-screensaver-preferences, which will
automatically put it in the right place in .local. You may need
to restart gnome-screensaver preferences in order to see the new screensaver
in the selection box. The feedback isn't very good.</p>