<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4471334211875326397</id><updated>2012-02-16T18:08:34.508-08:00</updated><title type='text'>Stuff I have installed</title><subtitle type='html'>A record of stuff I have installed on my Ubuntu laptop.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://stuffihaveinstalled.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4471334211875326397/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://stuffihaveinstalled.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Weeble</name><uri>http://www.blogger.com/profile/14430249240219688811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_dk3zDKAxcms/SSNCyyTSyMI/AAAAAAAAAk4/NZ-mjjejsPc/S220/weeble.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4471334211875326397.post-2706442092713112053</id><published>2009-12-16T16:03:00.000-08:00</published><updated>2009-12-16T16:37:50.480-08:00</updated><title type='text'>Django</title><content type='html'>(Installing on Ubuntu Karmic.)&lt;br /&gt;&lt;br /&gt;First of all we need Apache, mod_wsgi and Django itself:&lt;br /&gt;&lt;br /&gt;&lt;code class="codeblock"&gt;sudo apt-get install apache2&lt;br /&gt;sudo apt-get install libapache2-mod-wsgi&lt;br /&gt;tar -xvf Django-1.1.1.tar.gz&lt;br /&gt;cd Django-1.1.1&lt;br /&gt;sudo python setup.py install&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I found out later that Django is packaged for Ubuntu, it's called "python-django", so I needn't have installed from source. Never mind. I'm just setting up a local server on my laptop for development, so I'd also like it to server the media files (the CSS and images) for the admin interface. So I created a symlink:&lt;br /&gt;&lt;br /&gt;&lt;code class="codeblock"&gt;sudo ln -sT /usr/local/lib/python2.6/dist-packages/django/contrib/admin/media/ /var/www/admin_media&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We also need a bunch of additions to httpd.conf to set up Django using mod_wsgi:&lt;br /&gt;&lt;br /&gt;&lt;code class="codeblock"&gt;sudoedit /etc/apache2/httpd.conf&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Here I'm mapping "/" to serve my application, but overriding "/admin_media" to point to my media files symlink. Why did I bother with the symlink? Hmm, good question. httpd.conf:&lt;br /&gt;&lt;br /&gt;&lt;code class="codeblock"&gt;WSGIScriptAlias / /home/weeble/hg/webtest/django.wsgi&lt;br /&gt;Alias /admin_media/ /var/www/admin_media/&lt;br /&gt;&amp;lt;Directory /var/www/admin_media&amp;gt;&lt;br /&gt;Order deny,allow&lt;br /&gt;Allow from all&lt;br /&gt;&amp;lt;/Directory&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We need to set up django.wsgi:&lt;br /&gt;&lt;br /&gt;&lt;code class="codeblock"&gt;import os&lt;br /&gt;import sys&lt;br /&gt;&lt;br /&gt;os.environ['DJANGO_SETTINGS_MODULE'] = 'webtest.settings'&lt;br /&gt;&lt;br /&gt;sys.path.append('/home/weeble/hg/webtest')&lt;br /&gt;import django.core.handlers.wsgi&lt;br /&gt;application = django.core.handlers.wsgi.WSGIHandler()&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I had to configure a few settings for my Django application in settings.py. I'm using an sqlite database because it's easy. I have ended up with a silly directory structure here, with two nested "webtest" directories. You probably don't want to copy that. Here are the salient bits from settings.py:&lt;br /&gt;&lt;br /&gt;&lt;code class="codeblock"&gt;DATABASE_ENGINE = 'sqlite3'&lt;br /&gt;DATABASE_NAME = '/home/weeble/hg/webtest/webtest/webtest.db'&lt;br /&gt;ADMIN_MEDIA_PREFIX = '/admin_media/'&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Apache runs as a different user, so we need to make sure it has permission to read and write the database file, as well as to write to the directory containing the database file. I did this the bad way (I think I should probably have used chgrp or chown):&lt;br /&gt;&lt;br /&gt;&lt;code class="codeblock"&gt;chmod o+w webtest.db&lt;br /&gt;chmod o+w .&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I forgot to make the directory writeable at first, and this resulted in the admin interface getting a server error whenever I visited it, as did any of my application's pages if they tried to write to the database.&lt;br /&gt;&lt;br /&gt;Of course, you need to restart the server to pick up all the configuration changes:&lt;br /&gt;&lt;br /&gt;&lt;code class="codeblock"&gt;sudo apache2ctl restart&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4471334211875326397-2706442092713112053?l=stuffihaveinstalled.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stuffihaveinstalled.blogspot.com/feeds/2706442092713112053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://stuffihaveinstalled.blogspot.com/2009/12/django.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4471334211875326397/posts/default/2706442092713112053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4471334211875326397/posts/default/2706442092713112053'/><link rel='alternate' type='text/html' href='http://stuffihaveinstalled.blogspot.com/2009/12/django.html' title='Django'/><author><name>Weeble</name><uri>http://www.blogger.com/profile/14430249240219688811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_dk3zDKAxcms/SSNCyyTSyMI/AAAAAAAAAk4/NZ-mjjejsPc/S220/weeble.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4471334211875326397.post-1650748173298747733</id><published>2009-12-11T08:04:00.000-08:00</published><updated>2009-12-11T08:42:11.930-08:00</updated><title type='text'>Gargoyle</title><content type='html'>Gargoyle is a user interface to play various different formats of interactive fiction (text adventure) files.&lt;br /&gt;&lt;br /&gt;Get source from here: &lt;a href="http://code.google.com/p/garglk/downloads/list"&gt;http://code.google.com/p/garglk/downloads/list&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;code class="codeblock"&gt;mkdir gargoyle-2009-08-25-sources&lt;br /&gt;cd gargoyle-2009-08-25-sources&lt;br /&gt;unzip ../gargoyle-2009-08-25-sources.zip &lt;br /&gt;sudo apt-get install jam&lt;br /&gt;sudo apt-get install libsdl-mixer1.2&lt;br /&gt;sudo apt-get install g++&lt;br /&gt;sudo apt-get install libgtk2.0-dev&lt;br /&gt;jam&lt;br /&gt;jam install&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Binaries are now in build/dist&lt;br /&gt;&lt;br /&gt;Should probably put them somewhere sensible and add a symbolic link from ~/bin/gargoyle&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4471334211875326397-1650748173298747733?l=stuffihaveinstalled.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stuffihaveinstalled.blogspot.com/feeds/1650748173298747733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://stuffihaveinstalled.blogspot.com/2009/12/gargoyle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4471334211875326397/posts/default/1650748173298747733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4471334211875326397/posts/default/1650748173298747733'/><link rel='alternate' type='text/html' href='http://stuffihaveinstalled.blogspot.com/2009/12/gargoyle.html' title='Gargoyle'/><author><name>Weeble</name><uri>http://www.blogger.com/profile/14430249240219688811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_dk3zDKAxcms/SSNCyyTSyMI/AAAAAAAAAk4/NZ-mjjejsPc/S220/weeble.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4471334211875326397.post-1454345826107512757</id><published>2009-06-15T13:26:00.000-07:00</published><updated>2009-07-08T08:49:43.400-07:00</updated><title type='text'>Bitmap fonts</title><content type='html'>Much as I love sub-pixel font rendering, I found that I was not impressed with the blurry mess that comes out when using small font sizes for Terminal windows. I had a look for good terminal fonts that clearly distinguish 0 (zero), O (capital O), I (capital I), l (lower case l) and 1 (one), and settled on &lt;a href="http://bok.net/MonteCarlo/"&gt;Monte Carlo&lt;/a&gt;. However, Ubuntu disables bitmap fonts by default.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Enabling bitmap fonts&lt;/b&gt;&lt;br /&gt;/etc/fonts/conf.d/ contains a bunch of symlinks to files in /etc/fonts/conf.avail/. One of these is 70-no-bitmaps.conf. I removed it and added a symlink to 70-yes-bitmaps.conf:&lt;br /&gt;&lt;br /&gt;&lt;code class="codeblock"&gt;sudo rm /etc/fonts/conf.d/70-no-bitmaps.conf&lt;br /&gt;sudo ln -s /etc/fonts/conf.avail/70-yes-bitmaps.conf /etc/fonts/conf.d/&lt;br /&gt;sudo dpkg-reconfigure fontconfig&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Note that I think I could have instead followed &lt;a href="http://www.nazgum.com/2007/12/09/ubuntu-pcf-fonts/"&gt;the instructions here&lt;/a&gt; to achieve the same thing in a slightly more pleasant way.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Installing the fonts&lt;/b&gt;&lt;br /&gt;I put the font files, MonteCarloBold.pcf and MonteCarloMedium.pcf into the ~/.fonts/ directory. Then I rebuilt the font cache:&lt;br /&gt;&lt;br /&gt;&lt;code class="codeblock"&gt;sudo fc-cache -v -f&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Somewhere in the output there should be a line something like this:&lt;br /&gt;&lt;br /&gt;&lt;code class="codeblock"&gt;/home/weeble/.fonts: caching, new cache contents: 4 fonts, 0 dirs&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;(I have some other fonts in there too.)&lt;br /&gt;&lt;br /&gt;I needed to log out and in again to see the results.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;My eyes, they burn!&lt;/b&gt;&lt;br /&gt;Once you've done all that, you will sooner or later discover why bitmap fonts are disabled by default. There are a bunch of nasty bitmap fonts installed with names like "Helvetica" and "Times". These appear when applications or web pages request those font names expecting to get a lovely outline font. To fix this, you can either remove those fonts entirely or add rules to stop them from being used. I went with the latter option, creating a ~/.fonts.conf file:&lt;br /&gt;&lt;br /&gt;&lt;code class="codeblock"&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE fontconfig SYSTEM "fonts.dtd"&amp;gt;&lt;br /&gt;&amp;lt;!-- ~/.fonts.conf for per-user font configuration --&amp;gt;&lt;br /&gt;&amp;lt;fontconfig&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Private font directory&lt;br /&gt;--&amp;gt;&lt;br /&gt;&amp;lt;dir&amp;gt;~/.fonts&amp;lt;/dir&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;rejectfont&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;glob&amp;gt;/usr/share/fonts/X11/*&amp;lt;/glob&amp;gt;&lt;br /&gt;&amp;lt;/rejectfont&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/fontconfig&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;NOTE:I previously had a much more complicated .fonts.conf file which I didn't fully understand but had constructed by trial and error. Every so often I'd find a web-page that used some new obscure font that happened to be included in with the bitmap fonts, and have to add something for it. This new one just blacklists all the built-in bitmap fonts, so only the news ones I've installed to ~/.fonts will be available.&lt;br /&gt;&lt;br /&gt;You do &lt;em&gt;not&lt;/em&gt; need to rerun fc-cache or reboot after updating .fonts.conf, but you may need to restart an application before it will pick up the correct fonts.&lt;br /&gt;&lt;br /&gt;When I was messing around with .fonts.conf, I found the fc-match command invaluable. If you give it a font-name it will tell you what font would actually be rendered. If you also specify --sort, it will list all the fonts that could match in order of preference. Be careful not to mistype font names in the .fonts.conf file, it took me ages to realise my rules weren't firing because I'd mistyped "Bitstream" as "Bitsteam".&lt;br /&gt;&lt;br /&gt;Monte Carlo in a terminal window:&lt;br /&gt;&lt;img src="http://lh3.ggpht.com/_dk3zDKAxcms/SjbB17G5PCI/AAAAAAAAAm8/ympoYBf8O84/MonteCarloInTerminal.png" width=497 height=291 /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4471334211875326397-1454345826107512757?l=stuffihaveinstalled.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stuffihaveinstalled.blogspot.com/feeds/1454345826107512757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://stuffihaveinstalled.blogspot.com/2009/06/bitmap-fonts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4471334211875326397/posts/default/1454345826107512757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4471334211875326397/posts/default/1454345826107512757'/><link rel='alternate' type='text/html' href='http://stuffihaveinstalled.blogspot.com/2009/06/bitmap-fonts.html' title='Bitmap fonts'/><author><name>Weeble</name><uri>http://www.blogger.com/profile/14430249240219688811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_dk3zDKAxcms/SSNCyyTSyMI/AAAAAAAAAk4/NZ-mjjejsPc/S220/weeble.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_dk3zDKAxcms/SjbB17G5PCI/AAAAAAAAAm8/ympoYBf8O84/s72-c/MonteCarloInTerminal.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4471334211875326397.post-5961062237323783354</id><published>2009-06-15T00:43:00.000-07:00</published><updated>2009-06-15T00:55:46.942-07:00</updated><title type='text'>Python 2.6.2 and Pygame 1.8.1</title><content type='html'>After an unfortunate incident with Ubuntu Jaunty, I am back to a fresh install of Ubuntu Intrepid. I still have most of my user folder, but I have to reinstall everything. And I'll probably have to do it again. This blog is to keep a record of what I had to install.&lt;br /&gt;&lt;br /&gt;First up, Python 2.6 and Pygame, because I have a little project that is dependent on both. There's no package for Python 2.6 in Intrepid, so I'm installing from source. As far as I can tell there's no risk of upsetting anything else on the system so long as you don't replace the /usr/bin/python symlink.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Getting the source&lt;/b&gt;&lt;br /&gt;Python 2.6.2: &lt;span style="font-size:small"&gt;&lt;a href="http://www.python.org/ftp/python/2.6.2/Python-2.6.2.tgz"&gt;http://www.python.org/ftp/python/2.6.2/Python-2.6.2.tgz&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;Pygame 1.8.1: &lt;span style="font-size:small"&gt;&lt;a href="http://www.pygame.org/ftp/pygame-1.8.1release.tar.gz"&gt;http://www.pygame.org/ftp/pygame-1.8.1release.tar.gz&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Getting dependencies for Python&lt;/b&gt;&lt;br /&gt;&lt;code&gt;sudo apt-get build-dep python2.5&lt;br /&gt;sudo apt-get install tk8.5-dev&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Dependencies for Pygame&lt;/b&gt;&lt;br /&gt;&lt;code&gt;sudo apt-get install libsdl-ttf2.0-dev&lt;br /&gt;sudo apt-get install libsdl-image1.2-dev&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Build and install Python&lt;/b&gt;&lt;br /&gt;&lt;code&gt;tar -xvf Python-2.6.2.tgz &lt;br /&gt;cd Python-2.6.2/&lt;br /&gt;./configure&lt;br /&gt;make&lt;br /&gt;sudo make altinstall&lt;br /&gt;cd ..&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Build and install Pygame&lt;/b&gt;&lt;br /&gt;&lt;code&gt;tar -xvf pygame-1.8.1release.tar.gz &lt;br /&gt;cd pygame-1.8.1release/&lt;br /&gt;sudo python2.6 setup.py install&lt;br /&gt;cd ..&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4471334211875326397-5961062237323783354?l=stuffihaveinstalled.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stuffihaveinstalled.blogspot.com/feeds/5961062237323783354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://stuffihaveinstalled.blogspot.com/2009/06/python-262-and-pygame-181.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4471334211875326397/posts/default/5961062237323783354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4471334211875326397/posts/default/5961062237323783354'/><link rel='alternate' type='text/html' href='http://stuffihaveinstalled.blogspot.com/2009/06/python-262-and-pygame-181.html' title='Python 2.6.2 and Pygame 1.8.1'/><author><name>Weeble</name><uri>http://www.blogger.com/profile/14430249240219688811</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_dk3zDKAxcms/SSNCyyTSyMI/AAAAAAAAAk4/NZ-mjjejsPc/S220/weeble.png'/></author><thr:total>0</thr:total></entry></feed>
