<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  
  
  <channel>
    <title>chrisjrob: xkcd</title>
    <link>https://chrisjrob.com</link>
    <atom:link href="https://chrisjrob.com/tag/xkcd/feed/index.xml" rel="self" type="application/rss+xml" />
    <description>GNU Linux, Perl and FLOSS</description>
    <language>en-gb</language>
    <pubDate>Fri, 13 Feb 2026 17:22:31 +0000</pubDate>
    <lastBuildDate>Fri, 13 Feb 2026 17:22:31 +0000</lastBuildDate>
    
    <item>
      <title>XKCD Wallpaper</title>
      <link>https://chrisjrob.com/2011/03/21/xkcd-wallpaper/</link>
      <pubDate>Mon, 21 Mar 2011 00:00:00 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2011/03/21/xkcd-wallpaper</guid>
      <description>
       <![CDATA[
         
           <img src="https://chrisjrob.com/assets/xkcd-wallpaper_300.png" align="right" alt="Featured Image">
         
         <p>I confess, I like <a href="http://xkcd.com/">XKCD</a>. Even though some of them are
<a href="http://xkcd.com/871/">unfunny</a> and others <a href="http://xkcd.com/849/">beyond my understanding</a>, 
sometimes, just sometimes, they 
<a href="http://xkcd.com/208/">strike a chord</a>.</p>

<!--more-->

<p>Once I <a href="/tag/pekwm">moved to pekwm</a> I found myself with a black plain
desktop, what could be better, I thought, than the current XKCD comic in
the centre, with the tooltip comment located underneath in an
appropriate font.</p>

<p><img src="/assets/xkcd-wallpaper.png" alt="XKCD Wallpaper Screenshot" />
After some trial and error, I ended up writing 
<a href="http://pastebin.com/vqtmyRWW">this script</a>. 
It is far from perfect, and will
probably end up being broken at some point, although it survived 
<a href="http://xkcd.com/859/">its first trial</a> unscathed. I’m a little embarrassed
by my tortuous curl/perl one-liner, ideally I would re-write this whole
thing in perl, but it has worked reliably for a couple of months, so I
dare say that I will never get around to it.</p>

<p>Currently it works for pekwm, and I dare say it will work for other
lightweight window managers, like openbox, that can use <code class="language-plaintext highlighter-rouge">feh</code> to set the
desktop wallpaper. If not, then it shouldn’t be too difficult to modify
the script for your window manager or desktop environment. You can also
run the script without the <code class="language-plaintext highlighter-rouge">-w</code> switch in order to just create the XKCD
image in the directory for your own purposes.</p>

<p>You will obviously need <code class="language-plaintext highlighter-rouge">perl, curl, wget, and fold</code>, if they aren’t
already installed on your system. Create a directory, say <code class="language-plaintext highlighter-rouge">~/.xkcd</code> and
save this script in there, along with the 
<a href="http://antiyawn.com/uploads/Humor-Sans.ttf">XKCD font</a>, mark the script as
executable. If you read the script, it is fairly self-explanatory I
think.</p>

<p>You basically run it like this:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/path/to/.xkcd/xkcd -w -d '/path/to/.xkcd'
</code></pre></div></div>

<p>For pekwm, just add a line at the end of the <code class="language-plaintext highlighter-rouge">~/.pekwm/start</code> file:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>(sleep 30 &amp;&amp; /path/to/.xkcd/xkcd -w -d '/path/to/.xkcd') &amp;
</code></pre></div></div>

<p>I hope it works for you, feel free to comment any suggestions or
criticisms. If you do start using it, it would be fantastic if you could
add a comment to let me know.</p>


       ]]>
      </description>
    </item>
    
  </channel> 
</rss>
