Archive for the ‘Uncategorized’ Category
November 8, 2009
or checking out a specific commit.
First, one has to locate the hash of the commit. This can be done by:
- Scanning the log by running “git log” (press q to quit). Look for lines labeled commit.
-
Scanning the log in giggle. Look for the SHA-line. Example:
In this case our hash is 7f8d2051582dd030e3c07ded70010af033461e31.
Then, come up with a name for a branch to refer the this specific revision. For this example we will use old-branch.
Last, set up the branch by running:
git checkout -b old-branch 7f8d2051582dd030e3c07ded70010af033461e31
Syntax: The general syntax is: “git checkout -b BRANCHNAME HASH“
Tags:checkout, commit, giggle, git, git checkout, git log, hash, old revision, revision, sha, timetravel
Posted in Uncategorized | Leave a Comment »
November 1, 2009
From time to time one needs to measure stuff on the desktop. You might – for instance – want to know whether some region of an image will fit nicely into some part of a webpage.
In ubuntu (both jaunty and karmic releases) the screenruler application provides an easily available mean to do just that. This application is available through a package of the same name and can be found in the menu under Applications -> Accessories -> Screen Ruler.

The screenshot above shows two instances of screenruler along with the contextual menu (available through right-click or a menu button which appears when the mouse hovers over the ruler). Through this menu the metric can be changed. The length of the ruler can be changed by pulling in the ends and the orientation can be flipped by middle-clicking.
Tags:desktop, Jaunty, Jaunty Jackelope, karmic, Karmic Koala, measuring, screenruler, ubuntu
Posted in Uncategorized | Leave a Comment »
October 28, 2009
Note: This applies to multiple flavors of Ubuntu; Jaunty as well as Karmic. Also, it might be generic to all distributions based on Network Manager.
At the university we have a eduroam-based wireless network. It has not been very dependable yet; sometimes you can log on, sometimes you cannot. It doesn’t seem to be directly related to signal strength.
It seems that Ubuntu – which uses Network Manager – is quite well suited for this environment. Our setup is based on two laptops; one which can connect to eduroam and one which cannot. These are connected by a standard ethernet cable. The laptop connected to eduroam is then set up to share the connection.
The Guide
First open up the network connections dialog. Do this by right clicking on the Network Manager icon in the notification area and choose ‘Edit Connections …’. In the ‘Wired’ tab, click ‘Add’ to add a new connection. Fill it out like so:

The important parts are
- The method. This should be ‘Shared to other computers’.
- The unmarking of ‘Connect automatically’. This will make sure other connections (like DHCP) take precedence.
After confirming this dialog (by clicking ‘Apply …’) the list of network connections should look like this:

Thats it! When you whish to share a wireless connection, click on the network manager icon in the notification area and choose ‘Share Connection’ under ‘Wired networks’.
Tags:eduroam, network connection, network manager, share, shared connection, ubuntu, wireless
Posted in Uncategorized | Leave a Comment »
October 26, 2009
The solution for Jaunty seems to have degenerated.
I recently installed Karmic (Koala) Beta and decided to give it a try again. For me, installing the pidgin-facebookchat package and following the instructions at the relevant (bottom) part of the official documentations page regarding protocols. The experience is not entirely stable, but for a beta release I guess it’s ok.
Tags:empathy, facebook, Jaunty, Jaunty Jackelope, karmic, Karmic Koala, pidgin-facebookchat, ubuntu
Posted in Uncategorized | 1 Comment »
October 15, 2009
Not the Darwinian kind, but the mail client. This is useful if you want to move evolution data back and forth between two machines.
A little google-research seems to indicate that Evolution stores its data at several locations:
-
Running processes These may interfere with our work.
Exit them by running: killall evolution-data-server-2.26 evolution-alarm-notify
Note that the name of the data server seems to follow the relase of evolution (2.26 in this case).
-
~/.evolution This is the big one, containing mails and other kind of data.
Backed up by running: mv ~/.evolution ~/.evolution.bk0
Note this resets the location.
-
~/.gconf/apps/evolution Contains GConf data. This is most likely and old format which I have lying around.
Backed up by running: mv ~/.gconf/apps/evolution ~/.evolution_gconf
Note this resets the location.
-
gconf2://apps/evolution Contains GConf data, new format.
I don’t know how to backup this.
Removed by running[source]: gconftool-2 --recursive-unset /apps/evolution
Note this resets the location.
When these locations have been cleared, starting evolution will launch a settings importer, which can load settings from a backup. Backups can be created by chosing ‘Backup Settings …’ from the ‘File’ menu.
Note: This process appears to forget all about your signatures. Use other means to back them up if necessary.
Tags:backup, clearing, evolution, gconf, mail client, resetting, restore
Posted in Uncategorized | Leave a Comment »
September 19, 2009
Came across an article describing one guys efforts in photographing bats slurping water from a pond while in flight. The pictures are strangely beautiful.
Tags:Bats, Pho, Photo Trap, photography, phototrap, Pond
Posted in Uncategorized | Leave a Comment »
September 12, 2009
Locating clear guidelines describing the proces of creating a copy of an already existing machine (also known as cloning it) is not an easy task. I gave up when I came across an unofficial guide or two.
In VirtualBox, virtual machine definitions are stored separately from disk images. Cloning the machine can be reduced to the matter of cloning the disk(s) and creating a new machine which uses the cloned disk(s). Since disk images contain a unique identifier (UUID) a simple copy – as performed by the operating system – won’t do. Instead, use the following command:
vboxmanage clonevdi ORIGINAL_IMAGE NEW_IMAGE
The default locating for disk images is ~/.VirtualBox/HardDisks and the files use the .vdi extension.
Example:
$ vboxmanage clonevdi ~/.VirtualBox/HardDisks/Disk.vdi ~/.VirtualBox/HardDisks/DiskClone.vdi
VirtualBox Command Line Management Interface Version 2.1.4_OSE
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: cd4972c2-b57f-4b59-90f3-db151ac131e5
$
Then create a new virtual machine which uses the DiskClone.vdi image.
Tags:clonevdi, cloning, UUID, vboxmanage, vboxmanage clonevdi, VDI file, Virtual Machine, VirtualBox
Posted in Uncategorized | Leave a Comment »
September 12, 2009
This site sells kits to convert Leica R-Mount lenses to Nikon F mount.
Features (according to site):
- The procedure is fully reversible.
- The lens will focus to infinity.
- Nikon cameras will show focus confirmation light in viewfinder.
It seems like a few Hong Kong based brands are offering alternatives on ebay. Don’t know if they are trustworthy though …
leitax also has kits for other exotic lens/body combinations. Just about any combination of:
- Lens: Contax Carl Zeiss, Leica R
- Body: Canon EOS, Minolta/Sony alpha, Nikon F, Pentax, Sigma
Tags:adaptor, conversion, F-Mount, leica, Leica R, leitax, nikon, Nikon F, R-Mount, stop-down metering
Posted in Uncategorized | Leave a Comment »
September 6, 2009
After a system freeze, evolution ceased to be able to generate the folder list for my inbox. The statusbar said Error While Generating message list. Clicking on the message popped up this dialog:
According to this bug report the issue might be linked to evolutions use of SQLite.
In the same bug report it was suggested that the following command might solve the issue.
cd ~/.evolution/mail ; for i in `find . -name folders.db`; do echo "Rebuilding Table $i"; sqlite3 $i "pragma integrity_check;"; done
I didn’t have sqlite3 installed, so I ran sudo apt-get install sqlite3 first. For me this command located a handful of files called folders.db and sqlite3 did find errors in one of them: ~/.evolution/mail/local/folders.db.
To make sure that I had the right file I ran
sqlite3 ~/.evolution/mail/local/folders.db "pragma integrity_check;"
which again presented the errors. In the bug report someone explained that missing folder.db files would be regenerated, so I tried stopping all evolution-related processes (evolution-data-server and evolution-alarm-notify will linger after exitting the main program) and removed the file. I then started evolution and everything came up nicely.
Tags:ubuntu, Jaunty Jackelope, evolution, Error While Generating message list, database disk image is malformed, folder list, inbox, 9.04, sqlite3, pragma integrity_check
Posted in Uncategorized | 2 Comments »
September 5, 2009
I recently moved my evolution setup from one machine to another, in the proces changing my username. Mostly the move was successful, but signatures got cleared and the ability to add filters broke. This post describes a workaround for the latter issue.
Description
First a working evolution setup was backed up (File->Backup Settings …) and restored (File->Restore Backup …) on a different computer as a different user.
After adding a message filter and applying it (Message -> Apply Filters) a warning would pop up (‘asjo’ was my username on the first machine):
Workaround
Make sure no processes related to evolution are running. Then edit the ~/.evolution/mail/filters.xml file:
- Locate the rule in question (enclosed by <rule …></rule> tags). It is most likely in the buttom of the file.
- Inside it, you will find a <folder … /> tag (Assuming your filter is a move-to-folder operation). Mine says <folder uri="email://5/Inbox/tinyos"/>.
- Replace the 5 with local@local so that you come up with something similar to <folder uri="email://local@local/Inbox/tinyos"/>.
Then save the file.
Test
In order to test the change, simply start up evolution and try to apply filters as before.
Tags:apply filters, backup settings, changed username, error, evolution, filters, mail client, migration, restore backup, ~/.evolution/mail/filters.xml
Posted in Uncategorized | Leave a Comment »
September 3, 2009
While fooling around with Windows (XP variant) I found a few missing essentials:
- For transferring files there is putty (there’s an installer common to almost everything)
- For calculating checksums (MD5/SHA1) there is HashTab which adds a tab to the file properties dialog box
I intend to update this list as I find additions.
Tags:checksum, HashTab, MD5, missing essentials, putty, scp, SHA1, Windows, Windows XP, XP
Posted in Uncategorized | Leave a Comment »
September 2, 2009
Update 2: On a clean install of Karmic Beta, this was fixed out of the box.
Update: The config below results in some stability issues on my machine. It might be isolated and it might not be. But for me it triggers random restarts once a day or so and a reproducible restart when I try to run
cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co -P tinyos-2.x
which really doesn’t make sense. I have reverted to this xorg.conf (which is slow) and hope for the best in Karmic …
Original post:
Since the arrival of Jaunty Jackelope (Ubuntu 9.04) my laptop has performed miserably on the 2D side of things. It’s an IBM ThinkPad T42 2379-R4U. Thats an ATI Radeon Mobility 7500 with 32MB and a 1400×1050 screen.
Today I found this page and as a result my /etc/X11/xorg.conf now contains this device section:
Section "Device"
Identifier "Configured Video Device"
Option "AGPMode" "4"
Option "AGPFastWrite" "True"
Option "EnablePageFlip" "True"
Option "AGPMode" "4"
Option "AGPSize" "64"
Option "RingSize" "8"
Option "BufferSize" "2"
Option "EnableDepthMoves" "true"
Option "RenderAccel" "true"
# Eyecandy Stuff
Option "AccelMethod" "XAA"
Option "EnablePageFlip" "true
Option "DDCMode"
Option "SubPixelOrder" "NONE"
Option "ColorTiling" "false"
Option "MigrationHeuristic" "greedy"
EndSection
This gives me decent, but not great, performance.
Tags:ubuntu, Jaunty Jackelope, ATI, Radeon Mobility 7500, ThinkPad T42, IBM, 2D performance
Posted in Uncategorized | 4 Comments »
July 27, 2009
Recently empathy has been giving randomish errors for certain protocols, mostly MSN and Facebook. The message is “Network Error“.
This forum thread hints a solution: Simply run “killall telepathy-butterfly” and restart empathy.
Tags:empathy, facebook, msn, Network Error, telepathy-butterfly
Posted in Uncategorized | 1 Comment »
July 22, 2009
This article explains how to install a LaTeX style file – as found in CTAN – under Ubuntu.
Tags:CTAN, latex, STY file, style file, tetex, texlive, ubuntu
Posted in Uncategorized | Leave a Comment »
July 17, 2009
Anandtech has an interesting article on how various hard- and software affect the gaming experience.
Human responce is said to be somewhere between 150 and 300 ms. Add to this the time spent within the game engine and logic, the graphics driver and hardware, and the relevant IO devices such as mouse and monitor.
As a result, with the wrong hardware you are – as a gamer – already a big step behind the competition.
Update: See also this story on slashdot. Some of the comments seems to carry insights as well.
Tags:game engine, gamer, gaming, human responsiveness, input lag
Posted in Uncategorized | Leave a Comment »
July 16, 2009
First of all, those are not my words.
Recent developments in key web standards have opened up for the use of arbitrary (sort of) fonts, instead of the usual 11 web-safe ones. In an interview, David Berlow – a successfull type designer – seems to indicate that, it is the foundries belief that all existing standards should be changed to make room for some sort of permission table to handle the foundries copyright requirements, hereby rendering all current fonts unlinkable.
Related link.
Tags:David Berlow, font, foundries, type, typography
Posted in Uncategorized | Leave a Comment »
June 21, 2009
Update 2: With the forthcomming release of Karmic Koala this guide becomes (more or less) obsolete. This guide deals with the new situation.
Updata 1: This guide no longer seems to work for me.
This article explains how to configure Empathy under Ubuntu (9.04 Jaunty Jackelope) to interface with Facebook Chat.
On the technical side of things, the indea is to use pidgin-facebookchat – a libpurple plugin – through telepathy-haze – a telepathy connection manager based on libpurple – to establish and maintain the connection. The plugin can be used directly with Pidgin for similar results.
First, we need to install the needed packages (I assume that empathy is installed):
sudo apt-get install pidgin-facebookchat telepathy-haze
As described here and here you then need to do some fiddling. This might change in the future. What you need to do is:
cp /usr/share/telepathy/managers/haze.manager /tmp/
wget https://bugs.freedesktop.org/attachment.cgi?id=20810
sudo mv attachment.cgi?id=20810 /usr/share/telepathy/managers/haze.manager
wget https://bugs.freedesktop.org/attachment.cgi?id=20811
sudo mv attachment.cgi?id=20811 /usr/share/mission-control/profiles/bigbrownchunx-facebookim-haze.profile
Note: The two sudo lines will override any existing files. Since the first file should exist prior to the operation, one should make sure that nothing is removed from it during the operation. Do this by comparing /tmp/haze.manager and /usr/share/telepathy/managers/haze.manager. The latter should be the prior plus a section for the bigbrownchunx-facebookim protocol.
Tags:bigbrownchunx-facebookim, chat, empathy, facebook, pidgin, pidgin-facebookchat, telepathy-haze, ubuntu
Posted in Uncategorized | 2 Comments »
June 13, 2009
By default LaTeX does not display the bibliography section in the table of contents (TOC). This article describes how to add it.
Tags:bibliography, bibtex, latex, table of contents, toc
Posted in Uncategorized | Leave a Comment »
May 21, 2009
At some point I realized that apache was giving seemingly random “403 Forbidden” errors. This when under high load and yet, not really high at all. I would be able to trigger it by reloading some page a few times quickly in a row or loading a page with a lot of images.
The problem was mod_evasive, a module designed to protect against DOS attacks. The above usage pattern was being categorised as an attack and rejected. This page explains the details and this page explains how to deal with it in Ubuntu.
I did have to loosen up some settings, namely:
- DOSPageCount 10 (the number of pageviews allowed within DOSPageInterval secs)
- DOSSiteCount 10000 (the number of object requests allowed within DOSSiteInterval secs, that is images, stylesheets, javascrip files ...)
Tags:403, apache, DOSPageCount, DOSPageInterval, DOSSiteCount, DOSSiteInterval, forbidden, mod_evasive, random, ubuntu
Posted in Uncategorized | Leave a Comment »
May 11, 2009
This guide seems to explain it all.
You may run into errors of the form:
$ reprepro -Vb . includedeb jaunty /path/to/package.deb
Error: Distribution jaunty contains an architecture called 'all'.
There have been errors!
$ reprepro -Vb . dumpreferences
Error: Distribution jaunty contains an architecture called 'all'.
There have been errors!
$
In that case, try removing all from the “architectures” line of nano conf/distributions.
Tags:apt, debian, repository, reprepro, ubuntu
Posted in Uncategorized | Leave a Comment »
May 11, 2009
This article explains how to set up subdomains. Very easy, at least on Apache …
Tags:apache, dns, subdomain, VirtualHost
Posted in Uncategorized | Leave a Comment »
April 26, 2009
Terry Jones has an interesting read on the current swine influenza. Federico Mena Quintero has a spanish translation.
Tags:flue, influenza, swine flue, swine influenza, Terry Jones
Posted in Uncategorized | Leave a Comment »
March 8, 2009
MySQL installation, the adding of users, the creation of databases and the assignment of permissions is explained, by example, on this page.
Tags:grant, MySQL, permissions, user privileges
Posted in Uncategorized | Leave a Comment »
January 19, 2009
Ordinary file-permissions are apparently not sufficient anymore. Ubuntu, and others, therefore uses AppArmor to associate programs with certain permission filters.
One such program is MySQL. When changing the datadir, it will most likely land somewhere outside the permissions granted by AppArmor and as a result fail. I would get errors (from /var/log/syslog) of the form:
Jan 19 00:41:12 asjo kernel: [262573.788599] type=1503 audit(1232322072.553:28): operation="inode_permission" requested_mask="r::" denied_mask="r::" fsuid=116 name="/vol/mysql/" pid=18262 profile="/usr/sbin/mysqld"
Others were having similar problems, as described in this thread among others.
This page solved my problem. Basically, you first put AppArmor in complain-mode regarding the specific program (in this case /usr/sbin/mysqld) by running this command:
sudo aa-complain /usr/sbin/mysqld
This will temporarily turn off the security and log the offending actions. Generate the offending actions by running the program:
sudo /etc/init.d/mysql start
Next you run
sudo aa-logprof
When asked if I wanted to “enable access to the profile repository” I answered L for ‘later’. Next it displays the offending action previously logged, at which point a allow it by answering A. At this point I am asked if I would like to save the changes. S for yes (save).
In order to re-enable security you simply run:
sudo aa-enforce /usr/sbin/mysqld
Tags:aa-complain, aa-enforce, aa-logprof, AppArmor, datadir, MySQL, ubuntu
Posted in Uncategorized | Leave a Comment »