Microblog: A very long article Wikipedia article on the orientation of toilet paper [Jun 7th, 22:52] [R]

Thursday, March 5th, 2015

Local Debian Repository

Categories: [ IT ]

Since I built a customized Debian package I could as well have my own repository. I started from this tutorial but it's a bit out of date and has a dead link to the reprepro short-howto, so here's a record of what I did.

First, you will need to install the reprepro package.

Then, choose a place where to put your repository (I chose my $HOME). Origin, Label and Description are free-form fields. Codename is the same as my current Debian version, and Architectures matches the architectures I'm using. Then run:
mkdir -p packages/debian/conf
cd packages/debian
cat <<EOF > conf/distributions
Origin: Matthieu
Label: Mathieu's Personal Debs
Codename: wheezy
Architectures: i386 amd64 source
Components: main
Description: Matthieu's Personal Debian Repository
SignWith: yes
DebOverride: override.wheezy
DscOverride: override.wheezy
cat <<EOF > conf/options
basedir .
touch conf/override.wheezy
Now's the time to add the packages. Since SignWith was set to yes in the conf/distributions file, your GPG key will be used for signing the manifest files.
reprepro -Vb . includedeb wheezy  /src/evilvte_0.5.1-1+custom_amd64.deb
reprepro -Vb . includedsc wheezy  /src/evilvte_0.5.1-1+custom.dsc
Next configure your system to use the newly created repository by adding to your /etc/apt/sources.list (replace $HOME with the actual path to your repository):
deb file:$HOME/packages/debian/ wheezy main
deb-src file:$HOME/packages/debian/ wheezy main
Add your GPG key to apt's keyring (replacing KEY-ID with the one of the GPG key that was used when adding the packages earlier):
gpg -a  – export KEY-ID | sudo apt-key add -
You can now run apt-get update and it should pick the content of your local repository. You can check that it is indeed the case:
apt-cache showpkg evilvte
Package: evilvte
0.5.1-1+custom …
0.5.1-1 …

[ Posted on March 5th, 2015 at 23:19 | no comment | ]

Bitmap Fonts for my Terminal

Categories: [ IT ]

Since I started with Linux, back in 1997, my xterm have been using always the same font: a bitmap, fixed font which produces 6x13 pixels glyphs. I'm convinced that a bitmap font is the best possible choice for not-so-high resolution LCD monitors (I have a 17" 1280x1024 monitor which results in a 96 dpi resolution) where any vector font would inevitably produce aliased or fuzzy glyphs. My bitmap font is crisp and has no rainbow edges (who in his right mind could imagine that subpixel antialiasig is a good idea?).

With the xterm, I could simply specify the font as 6x13 and it would use it. That was simple, because it was meant for it.

Today I switched from pure X11 xterm to GTK-based evilvte and while evilvte is apparently a great tool, it didn't want to use my beloved 6x13 bitmap font. It would use 6x12 or 7x13, but not the one in the middle. The font is however available on the system through fontconfig, since I could find it with fc-match:
$ fc-match Fixed-10:style=semicondensed
6x13-ISO8859-1.pcf.gz: "Fixed" "SemiCondensed"
But evilvte, while showing "SemiCondensed" as an option in its font dialog, just seemed to ignore it. The fontconfig documentation mentions that one can trigger debug output by setting an environment variable FC_DEBUG=1. With it, I could see how Pango (GTK's font managemnt system) was interacting with fontconfig:
fc-match Fixed-10:semicondensed
Match Pattern has 19 elts (size 32)
	family: "Fixed"(s) …
	style: "semicondensed"(s)
	slant: 0(i)(s)
	weight: 100(i)(s)
	width: 100(i)(s)
Pattern has 18 elts (size 18)
	family: "Fixed"(w)
	style: "SemiCondensed"(w)
	slant: 0(i)(w)
	weight: 100(i)(w)
	width: 87(i)(w)
	file: "/usr/share/fonts/X11/misc/6x13-ISO8859-1.pcf.gz"(w)

That's the right font file.

While Pango:
python mygtk.py "Fixed SemiCondensed 10"
Match Pattern has 20 elts (size 32)
	family: "Fixed"(s)  …
	slant: 0(i)(s)
	weight: 80(i)(s)
	width: 87(i)(s)
Pattern has 18 elts (size 18)
	family: "Fixed"(w)
	style: "Regular"(w)
	slant: 0(i)(w)
	weight: 80(i)(w)
	width: 100(i)(w)
	file: "/usr/share/fonts/X11/misc/7x13-ISO8859-1.pcf.gz"(w)

And that's not the right font file…

Notice the important difference: fc-match asks for a weight of 100 (and style SemiCondensed) while Pango asks for weight 80 and width 87 (which is apparently equivalent to semi-condensed). Since my font had a weight of 100, it was never selected. However, when requesting a bold version (fc-match Fixed-10:semicondensed:bold or python mygtk.py "Fixed SemiCondensed Bold 10") the same font is found (6x13B-ISO8859-1.pcf.gz, which is the bold counterpart of my font). That took me several hours to find out.

Since the root of the problem seemd to be the weight, I needed to find out how to make Pango tell fontconfig to use a different weight, since there is apparently nothing between “Regular” (Pango 400, fontconfig 80) and “Bold” (Pango 700, fontconfig 200). And then, completely by accident, I found out there is actually a middle value: “Medium” (Pango 500, fontconfig 100), which is exactly what I neeed. But the outdated PyGTK documentation and the well-hidden man page (and very little help from Google and DuckDuckGo in finding a decent documentation for Pango, I must say) didn't make this any easy.

So finally, the magic font description I put in evilvte's config is “Fixed Medium SemiCondensed 10”. With it, Pango selects the font I want:
$ python mygtk.py "Fixed Medium SemiCondensed 10"
Match Pattern has 20 elts (size 32)
	family: "Fixed"(s) …
	slant: 0(i)(s)
	weight: 100(i)(s)
	width: 87(i)(s)
Pattern has 18 elts (size 18)
	family: "Fixed"(w)
	style: "SemiCondensed"(w)
	slant: 0(i)(w)
	weight: 100(i)(w)
	width: 87(i)(w)
file: "/usr/share/fonts/X11/misc/6x13-ISO8859-1.pcf.gz"(w)


The mygtk.py script is a simple GTK tool I wrote for the purpose of using a specific Pango font description and producing the fontconfig debug output. This is the script:
import gtk
import pango
import gobject
import sys
window = gtk.Window(gtk.WINDOW_TOPLEVEL)
tv = gtk.Label("Hello World")
gobject.timeout_add(100, gtk.main_quit)

[ Posted on March 5th, 2015 at 22:14 | no comment | ]

Customized Debian Package

Categories: [ IT ]

Today I switched from using xterm (which I had been using for the past 15 years at least) to using evilvte. The reason is that evilvte allows to click on URLs and opens a new tab in Firefox, while xterm does not. Since Firefox removed the --remote option, wmnetselect did not anymore allow me to open a copied URL. Since wmnetselect has no been updated since forever and has even been removed from Debian, I thought it was time for a radical change (yes, I changed my terminal emulator because of the Web browser. I know).

Evilvte is one of those simplistic tools that you configure by editing the source code (the config.h, really), so I thought that after having done that, I may as well make my own custom Debian package. It wasn't too hard, but since I don't plan to do this regularly, here's the process.

Get the Debianized sources:
apt-get source evilvte
Enter the directory
cd evilvte-0.5.1

Edit the config file (or whatever you want to do for your own package), save it in the right place. In my case, the package contained a debian/config.h customized by the package's maintainer, so I needed to modify this one rather than the src/config.h one. During the building of the package, src/config.h is overwritten by debian/config.h.

Then edit debian/changelog and add a new entry. By doing that, you need to choose a new version number. I wanted to keep the original version number of the package (0.5.1-1) but make it known that it was slightly newer than 0.5.1-1: I decided to go for 0.5.1-1+custom (after discovering that my first choice, 0.5.1-1~custom, means that the package is slightly older than 0.5.1-1 and would therefore have been replaced during the next apt-get dist-upgrade) by 0.5.1-1 . The description of the change is simply “Custom configuration”. For the rest, follow the example of the existing entries in the changelog. Be careful, there are two spaces between the author and the date.

If you have changed the upstream source code instead of only Debia-specific files, the package building helpers will record a patch for your and let you write some comments in the patch file, based on the new entry in the changelog.

Then you just need to build the package:
It will probably ask you for your GPG passphrase (when signing the package), and after that, you're done. The newly created package is in the parent directory, and ready to be installed.
cd ..
sudo dpkg -i evilvte_0.5.1-1+custom_amd64.deb

That's it!

[ Posted on March 5th, 2015 at 21:14 | 3 comments | ]

Thursday, February 26th, 2015


Categories: [ TV/Cinema ]



On planet Pandora, humans are mining unobtainium and, with the help of mercenaries, attempt to reloacate the indigenous Na'vi away from the gigantic tree that is their home. To approach the Na'vi, humans are remote-controlling artificially grown, Na'vi-looking avatars through a neural connection. Jack Sully, a paraplegic ex-marine, makes contact with the Na'vi and, after receiving a sign from the local deity Eywa, and learning the ways of the Na'vi, becomes a honorary member of the tribe. His mission is to convince the Na'vi to leave their home, but he falls in love with the chief's daughter and soon sides with the Na'vi. When the mercenaries attack the tree, Jack manages to rally the other tribes and together they manage to beat the humans before they manage to destroy the Na'vi's most sacred place. In the end, Jack's mind is transferred to his avatar thanks to the power of Eywa.

[ Posted on February 26th, 2015 at 22:26 | no comment | ]

Wednesday, February 25th, 2015

The Imitation Game

Categories: [ TV/Cinema ]



In 1939, Alan Turing is hired to work in Bletchley Park on decrypting the most complicated cipher of the time, Enigma, used by Germany in the war. He soon understands that only a machine will be able to beat Enigma, and despite the resistance from the commander of the research center who resents Turing naive, but actual intellectual superiority, he manages to build a computer nicknamed Christpher (the name of his best friend and first love when he was in school). He receives help from Joan Clarke, hired because she solved a crossword puzzle faster than Turing and when she is forced by her parents to leave the mostly-male Bletchley Park, Alan proposes to her so as to keep her close to him, despite his homosexuality. After the war, Turing is arrested for being an homosexual (while being suspected of being a Soviet spy), and despite convincing the police detective that his top-secret work during the war has probably saved millions of lives, he is sentenced to chemical castration which he chose over prison in order to continue working on the first generic computer. The treatment however robs him of his mental faculties and he soon after commits suicide.

[ Posted on February 25th, 2015 at 22:43 | no comment | ]

Sunday, February 22nd, 2015

Moorhouse's Blond Witch

Categories: [ Beer/Moorhouse's ]


Just another pale ale. Contains barley malt.

Moorhouse's Brewery, Burnley, Lancashire, England. 4.5% alcohol.

[ Posted on February 22nd, 2015 at 20:26 | no comment | ]

Saturday, February 21st, 2015


Translation: [ Google ]

Categories: [ TV/Cinema/Spede ]



[ Posted on February 21st, 2015 at 23:45 | no comment | ]

Saturday, February 14th, 2015

Moorhouse's Black Cat

Categories: [ Beer/Moorhouse's ]


Sweet and slightly chocolatey, at bit too roasted too. Contains barley malt.

Moorhouse's Brewery, Burnley, Lancashire, England. 3.4% alcohol.

[ Posted on February 14th, 2015 at 23:30 | no comment | ]

Friday, February 13th, 2015

Noin 7 veljestä

Translation: [ Google ]

Categories: [ TV/Cinema/Spede ]



[ Posted on February 13th, 2015 at 23:45 | no comment | ]

Saturday, February 7th, 2015

Moorhouse's Pride of Pendle

Categories: [ Beer/Moorhouse's ]


Just another ale, maybe a tad too bitter. Contains barley malt.

Moorhouse's Brewery, Burnley, Lancashire, England. 4.1% alcohol.

[ Posted on February 7th, 2015 at 21:05 | no comment | ]

Sunday, February 1st, 2015

Wychwood Hobgoblin Gold

Categories: [ Beer/Wychwood ]


Quite sweet, kind of fruity, and only slightly bitter. Contains barley malt and malted wheat.

Wychwood Brewery Co. Witney, Oxfordshire, England. 4.5% alcohol.

[ Posted on February 1st, 2015 at 19:01 | no comment | ]

Sunday, January 11th, 2015

Belhaven Scottish Oat Stout

Categories: [ Beer/Belhaven ]


“roasted barley and oats along with three types of malt… black coffee and darck chocolate notes”

Sweet and fruity, very nice. Possibly the same as the Scottish Stout although the latter doesn't seem to contain oats. Contains malted barley.

Belhaven Brewery Company Ltd., Dunbar, Scotland. 7.0% alcohol.

[ Posted on January 11th, 2015 at 11:21 | no comment | ]

Tuesday, January 6th, 2015

Timothy Taylor's Bolt Maker

Categories: [ Beer/Timothy Taylor's ]


“maltiness and hoppy aroma”

Just another ale, but a goot one. Contains malted barley.

Timothy Taylor, Keighley, West Yorkshire, England. 4.2% alcohol.

[ Posted on January 6th, 2015 at 20:26 | no comment | ]

Friday, January 2nd, 2015


Categories: [ TV/Cinema ]



In a not-so-distant future, cereal species are getting extinct one by one by the blight, and sand storm happen regularly. Cooper, an ex-astronaut and now farmer decodes a message appearing in his daughter Murphy's room as gravitational anomalies, leading him to what is left of NASA. Scientists there work in parallel on anti-gravity and on sending manned exploratory probes through a wormhole that had appeared near Staturn fifty years earlier; plan A is to make space stations and take humanity away from the surface into space and plan B is to send frozen embryo to a suitable planet in the other galaxy. Cooper is asked to travel through the wormhole to another galaxy, finding out what happened to the three probes that are still emitting pings back to Earth. Cooper leaves his children in the care of their grandfather, knowing that because of relativity, they will age much faster than he will. In the other galaxy, they have three planets to visit. On the first one, there is only the wreckage of the probe, destroyed by gigantic waves and barely escape with their lives, losing one crew member. On the second planet, they find a survivor ,Mann, who tries to kill them to take their ship and escape back to Earth. Cooper learns from him that he had faked the data about the planet (it's not inhabitable) to attract rescuers and that anti-gravity cannot be discovered without measurements taken from the inside of a black hole, and that plan A is just a scam to get people working while plan B is applied. Cooper and Brand manage to escape from the planet and save their orbiter from Mann's wrong docking maneuvres that almost destroyed it. They then split, Brand going to the third planet while Cooper jumps into the black hole. He discovers there an environment when he can survive, showing a 2-dimension view to his daughter's room and where he can travel time as a dimension of space. He then understands he can send messages by generating gravitational anomalies. He also sends the measurements taken from inside the blackhole by his robot sidekick, leading his daughter to discover anti-gravity. His environment then collapses and he's spit out of the wormhole. He eventually wakes up in a space station years later, seing his now elderly daughter for the last time. She convices him to go back and search for Brand, who is implementing plan B on the last planet (that happens to be habitable).

[ Posted on January 2nd, 2015 at 23:45 | no comment | ]