Moving from Tomboy to Gnote in Ubuntu 12.04

Gnote in the tray

Yesterday I updated from Ubuntu 10.04 to 12.04. As usual, I did a completely fresh install, only copying over the things I still need. Tomboy is at the top of that list, so I copied over my ~/.local/share/tomboy/ directory. I read that Gnote is now the preferred replacement for Tomboy, so I installed it and was pleased to see that it read in my Tomboy notes automatically. But it didn’t put an icon in my tray, and that was my favourite Tomboy feature. To get the tray icon back, I did the following:

Fisrt, I added gnote to the systray whitelist:

gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Wine', 'Update-notifier', 'gnote']"

Next, I set Gnote to auto-start:

mkdir ~/.config/autostart
cp /usr/share/applications/gnote.desktop ~/.config/autostart/
chmod u+x ~/.config/autostart/gnote.desktop

Finally, I turned on the tray icon in Gnote itself: Edit → Preferences → Use Status Icon. After logging out and back in, Gnote started up in the tray just the way Tomboy used to.

Using the Raspberry Pi’s serial port

The stock Debian image for the Raspberry Pi uses the UART as a serial console. I was able to connect to it from my Ubuntu laptop via my 3.3-volt USB FTDI TTL-232 cable. I connected Raspberry Pi’s ground pin to the ground pin of the FTDI, the Rasberry Pi’s TX pin to the FTDI’s RX pin and vice versa. (The Raspberry Pi’s pinout is available here.) Then on my Ubuntu laptop I installed minicom (sudo apt-get install minicom) and fired it up with:

minicom -b 115200 -o -D /dev/ttyUSB0

After typing in a username, I got a password prompt and was able to log in. Also, the serial console allowed me to see all the kernel output during boot, which could be handy someday.

But I wanted to use the Raspberry Pi’s UART for my own purposes, not as a serial console. To achieve that, I did the following.

First, I made a backup of the /boot/cmdline.txt file, which contains the kernel parameters:

sudo cp /boot/cmdline.txt /boot/cmdline_backup.txt

Then I edited it:

sudo vi /boot/cmdline.txt

Originally it contained:

dwc_otg.lpm_enable=0 rpitestmode=1 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait

I deleted the two parameters involving the serial port (ttyAMA0) to get the following:

dwc_otg.lpm_enable=0 rpitestmode=1 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait

I rebooted (sudo reboot) to confirm that kernel output was no longer going to the serial port. But the serial console was still available. So I edited /etc/inittab:

sudo vi /etc/inittab

I commented out the following line:

2:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

Finally, I rebooted again and confirmed that nothing was touching the serial port anymore. Then, to test it out I installed minicom on the Raspberry Pi:

sudo apt-get install minicom

And ran it:

minicom -b 115200 -o -D /dev/ttyAMA0

After firing up minicom on my Ubuntu laptop again, I was able to send data in both directions!

Now to get the Raspberry Pi talking to an Arduino…

Making the Raspberry Pi a little less British

Raspberry Pi

After a month and a half of obsessively checking for status updates, I finally received my Raspberry Pi yesterday. I love it!

The first thing I noticed after booting up the stock Debian image was that things are set up for British users. Most annoyingly, the symbols on the keyboard weren’t where I expected them to be. To arrive at a more Canadian configuration, I did the following.

First, I changed the system locale, turning off en_GB.UTF-8 and turning on en_CA.UTF-8:

sudo dpkg-reconfigure locales

Next, I changed the keyboard layout:

sudo dpkg-reconfigure keyboard-configuration

Next, I changed the time zone:

sudo dpkg-reconfigure tzdata

And finally, I changed to a Canadian Debian mirror by editing the “sources.list” file:

sudo vi /etc/apt/sources.list

On the first line, I changed “ftp.uk.debian.org” to “ftp.ca.debian.org”:

deb http://ftp.ca.debian.org/debian/ squeeze main

# Nokia Qt5 development
deb http://archive.qmh-project.org/rpi/debian/ unstable main

After rebooting (sudo reboot) and updating my package list (sudo apt-get update) I had a pleasantly Canadian Pi. 🙂

UPDATE: Rohan Kapoor has turned these instructions into an excellent tutorial with lots of screenshots: “Americanizing” the Raspberry Pi. I highly recommend it if you’re a beginner having trouble following my instructions.