Ubuntu Natty: Fixing "unknown locale" in Python

The fix itself is the same as for Python 2.5 – only the line numbers have changed. Open the file /usr/lib/python2.7/locale.py and find the line containing en_gb (line 921) and add these lines (this works for Danish locales): 'en_dk': 'en_DK.ISO8859-1', 'en_dk.iso88591': 'en_DK.ISO8859-1', 'en_dk@euro': 'en_DK.ISO8859-15', In order to avoid this change getting overwritten by packages updates, I use dpkg-divert: $ sudo dpkg-divert --add --rename --divert /usr/lib/python2.7/locale.py.real /usr/lib/python2.7/locale.py $ sudo cp /usr/lib/python2.7/locale.py.real /usr/lib/python2.7/locale.py If you wish to remove the diversion (if the package is fixed to support you locale at some point) simply run ...

June 27, 2011 · 1 min · alj

Tip: Change the Chrome proxy settings when running Xubuntu (Xfce)

For a long time, in the olden days, I ran Xubuntu – mainly because I loved the simplicity of the desktop (and also because it was a lot lighter on my machine, a Thinkpad T40, than GNOME. And I just have no love for KDE). Then some changes were made to the menu system (or the way to edit it) which annoyed the hell out of me – that combined with a new, more powerful machine, I decided to switch to GNOME, which I’ve been running for a couple of years. ...

June 13, 2011 · 3 min · alj

Ubuntu: Install Percona XtraBackup

Percona XtraBackup is an open-source hot backup utility for MySQL that doesn’t lock your database during the backup. It can back up data from InnoDB, XtraDB, and MyISAM tables on MySQL 5.0 and newer servers, and it has many advanced features. Commercial support contracts are available. For a high-level overview of the features, including a feature comparison, please see the XtraBackup homepage. Luckily installing XtraBackup is pretty easy $ sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A $ echo "deb http://repo.percona.com/apt maverick main" | sudo tee -a /etc/apt/sources.list $ sudo apt-get update<br /> $ sudo apt-get install xtrabackup I wrapped the backup program in a small shell script ...

June 13, 2011 · 1 min · alj

Natty Narwhal: Problems connecting to servers behind (Cisco) firewalls using ssh

After upgrading to Natty Narwhal I couldn’t connect to my Linux based jump host (connected via VPN): OpenSSH_5.8p1 Debian-1ubuntu2, OpenSSL 0.9.8o 01 Jun 2010 debug1: Reading configuration data /home/alj/.ssh/config debug1: Applying options for * debug1: Applying options for smallpox.xxx.dk debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to smallpox.xxx.dk [xxx.xxx.xxx.xxx] port 22. debug1: Connection established. debug1: identity file /home/alj/.ssh/id_rsa type -1 debug1: identity file /home/alj/.ssh/id_rsa-cert type -1 debug1: identity file /home/alj/.ssh/id_dsa type 2 debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024 debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024 debug1: identity file /home/alj/.ssh/id_dsa-cert type -1 debug1: identity file /home/alj/.ssh/id_ecdsa type -1 debug1: identity file /home/alj/.ssh/id_ecdsa-cert type -1 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-4ubuntu4 debug1: match: OpenSSH_5.5p1 Debian-4ubuntu4 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.8p1 Debian-1ubuntu2 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-md5 [email protected] debug1: kex: client->server aes128-ctr hmac-md5 [email protected] debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP Read from socket failed: Connection reset by peer The key seem to be that Natty uses OpenSSH 5.8p1 – This problem seem to affect clients newer than 5.7p1, when connecting to older servers. And the problem seem to be restricted to connecting through some firewalls, I have no problem on my home network and when connecting to hosts running iptables. ...

March 21, 2011 · 2 min · alj

Ubuntu Natty: Making a Gobi 2000 wireless modem work

In the pre-10.04 days it was possible to make a Gobi 200(0) modem work by installing gobi_loader and using it to load the firmware for the modem. However, with the release of Ubuntu 10.04 (which sports a shiny 2.6.35 kernel) gobi_loader stopped working. Because gobi_loader (according to the homepage) does not support 2.6.32+ I stopped caring and used my Huwai stick instead. Recently one my colleagues noted that after upgrading to 10.10 the wireless broadband connection seemed to be available from time to time – and having recently upgraded to Natty (11.04) I decided to see if I could get it to work again. ...

February 25, 2011 · 2 min · alj

Ubuntu Natty: Fixing the "mouse" on HP 2540p

Update: This fix is now documented in the Ubuntu Wiki After upgrading to Natty alpha 2 clicking left+right mouse no longer worked as middle mouse button (also known as Emulate3Buttons). Since version 10.04 (and for real since 10.10) Ubuntu no longer sports a xorg.conf file; all configuration is done through udev and evdev – for some reason the “mouse” (track point) in my HP Elitebook 2540p is detected as a three button mouse ...

February 20, 2011 · 1 min · alj

FUSE coolness with mhddfs

Let’s say you have three disks but you wish to share with Samba or NFS clients. Of course you could just mount the disks on three separate mount points and export those. Or you could mount the three disks on three mount points inside the same directory and export the parent directory. The problem with both solutions is you have to “balance” the data among the disks – and it will make navigating your TViX, WDTV or Popcorn more annoying. ...

May 24, 2010 · 2 min · alj

Tip: Fixing character encoding in Terminator 0.14 (Ubuntu 10.04)

I’ve been using the excellent terminal emulator Terminator for a long time. Terminator sports (among other things) split screen and “cluster support” (grouping of screens, making it possible to type the same thing in all terminals). In previous versions of Ubuntu (Terminator versions prior to 0.14) Terminator would pick all settings from GNOME Terminal, including character encoding (ISO-8859-15 in my case). Apparently this is no longer the case in Ubuntu 10.04, which has Terminator 0.14. ...

March 29, 2010 · 1 min · alj

Irssi notifications in Windows using Growl and Minivan

After completing my script to deliver Irssi notifications to the Linux desktop using Perl (IPC::Message::Minivan and Desktop::Notify), I wondered if this framework could be extended to Windows (since I have a Windows desktop at work). I have previously looked at Growl (on Linux) and think it is cumbersome to get the notifications across the network – but ended up using it anyway since it’s an easy way to display notifications in Windows (and probably in MacOS as well). There is a another Growl script for Irssi but I wanted to make my own that plugs into Minivan because I wanted the pop ups to look the same on all computers (at least the wording). ...

March 6, 2010 · 2 min · alj

Irssi notifications using Desktop Notifications and Minivan

I was pretty happy with solution to get notifications from Irssi though it had some shortcomings. A couple of days ago a colleague made me aware of a Perl modules written by another colleague (Anton Berezin) called IPC::Message::Minivan which, it turns out, is perfect for my notification script. Basing the notifications on Minivan combine the speed of using something like Dbus locally (instant notifications) with the convenience of my previous script (notifications over the network, able to handle multiple clients). ...

March 6, 2010 · 3 min · alj