Skip to content


Install Thunderbird 3 (beta) with Lightning 1 (beta) in Ubuntu 9.10

At the time of writing, Lightning is at version 1.0b1rc1 (sounds stable, doesn’t it…). It only works with the beta release of Thunderbird 3 (aka Shredder), which is currently at version 3.0.2. I hear you ask: “Why would you want to use these two stable-sounding pieces of software together?” In my case, it’s because I need to deal with meeting invites sent by Microsoft Outlook users, but I want to continue using Mozilla Thunderbird. NB: it does not provide a solution for integrating with a Microsoft Exchange calendar.

So, to get started…

As root add the Mozilla Ubuntu daily build repository:

root@continuity:~# add-apt-repository ppa:ubuntu-mozilla-daily/ppa Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv B34505EA326FEAEA07E3618DEF4186FE247510BE gpg: requesting key 247510BE from hkp server keyserver.ubuntu.com gpg: key 247510BE: "Launchpad PPA for Ubuntu Mozilla Daily Build Team" not changed gpg: Total number processed: 1 gpg:              unchanged: 1 root@continuity:~#

Update the repository:

root@continuity:~# apt-get update

If you get a warning about a duplicate entry, just repeat the update command, it’ll clear up.

Install Thunderbird 3.0 (not 3.1, which does not currently work with the release of the Lightning plugin):

root@continuity:~# apt-get install thunderbird-3.0

If you use GNOME as your desktop, I recommend also installing the GNOME support package:

root@continuity:~# apt-get thunderbird-3.0-gnome-support

Now that you have Thunderbird 3, fire it up. In the menu, go to Tools -> Add-ons and keep that window handy.

If you’re running a 32 bit version of Ubuntu, this next bit will be easy for you…

In your browser window, go to the Mozilla Lightning project page. Under Download Now click on Linux x86. Press the whopping great big Download Now button and save the file.

If, however, you’re running a 64 bit version (like me), this next bit is annoying… but still easy…

Use your browser to download http://releases.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b1rc1/contrib/linux-x86_64/lightning.xpi or do the following in a terminal:

david@continuity:~$ wget http://releases.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b1rc1/contrib/linux-x86_64/lightning.xpi

Now that you have the file, return to the Add-ons window that you opened earlier, click on the Extensions icon at the top, click on Install..., navigate to the lightning.xpi file that you downloaded, click OK, wait a few seconds, click Install Now.

Once that’s installed, the last thing that you need to do is click on Restart Shredder.

Posted in E-mail, Linux.

Tagged with , , , , , , , .


An open letter to Stephen Conroy against censorship

I have sent this e-mail to Stephen Conroy and have reproduced it here as an open letter:

Date: Fri, 18 Dec 2009 12:38:11 +1100 From: David Taylor To: minister@dbcde.gov.au, senator.conroy@aph.gov.au Subject: Against censorship and loss of freedom Stephen Conroy, I am writing to express my deep concerns about the proposed internet filter. Censorship of any kind should not exist in a civilised society. Of course, racism, sexism, anti-semitism, homophobia, child porn should not exist in a civilised society, either.  However, the way to combat such unethical or immoral behaviour is through education, not through censorship.  Censorship raises the values of the censor above the values of those being censored, enforces those values regardless of the lack of acceptance, and it deprives us of freedom and deprives us of choice. Ultimately, the proposed censorship will be misdirected, expensive and ineffective. The proposed censorship will be easy to circumvent, even trivial for many people.  The means of circumvention (virtual private networks, tunnels, encryption, proxies, alternative DNS servers, etc) will make it even harder to detect the very behaviour you intend for this censorship to address.  You will drive the individuals you hope to deter or catch even further underground. By doing so, you will also reduce the scale and frequency of success by policing bodies, which will result in less visible deterrence. Do you also intend to censor our telephone lines and postal service?  After all, all it takes are some modems to set up an electronic bulletin board.  Or some phone calls to setup a meeting place.  Or an envelope, delivered by the local postie, to deliver many more gigabytes of offensive material than could be delivered over the internet, and in a more timely and reliable manner. I am a parent.  I have children.  I plan to protect them from offensive material.  How?  Simply, and without depriving anyone else of their freedom or choice, by being a responsible parent, by educating my children, and by being there to supervise them. I do not want the government stepping in. This proposed censorship is unwelcome. It is an international embarrassment. Thank you for your time. Sincerely, David Taylor. "They who would give up an essential liberty for temporary security, deserve neither liberty or security." Benjamin Franklin "When liberty is taken away by force it can be restored by force. When it is relinquished voluntarily by default it can never be recovered." Dorothy Thompson. "We cannot defend freedom abroad by deserting it at home." Edward R. Murrow

I hope it isn’t simply ignored, although I suspect it will be.

Posted in General, Web.

Tagged with , .


Using qemu to install from CD/DVD to a docked drive

Usually the CD/DVD drive is /dev/sr0. To double-check:

david@wopr:~$ dmesg | grep -i attached | grep -ie cd -ie dvd [    1.930748] sr 0:0:0:0: Attached scsi CD-ROM sr0

See the last field: sr0.

Determine the drive you will use for the installation. Be careful not to use the wrong drive. Check the output of the following, looking for the label or distinguishing size/geometry of your drive:

david@wopr:~$ sudo fdisk -l

When you’re ready:

david@wopr:~$ sudo qemu -hda /dev/sdd -cdrom /dev/sr0 -boot d

The options mean:

-boot dBoot on CD-ROM.
-hda /dev/sddUse /dev/sdd as hard disk 0.
-cdrom /dev/sr0Use /dev/sr0 as the CD-ROM image.

Note: If you get the following error message when trying to use/install Linux inside qemu

8254 timer not connected to IO-APIC

Try adding noapic to the kernel parameters.

Note: To release the keyboard and mouse from qemu, press Ctrl & Alt.

Time for me to install Mythbuntu to a docked SATA drive.

Posted in Linux.

Tagged with , .


Install EC2 AMI & API tools in Debian

Download the zip files for the tools:

root@hal:~# wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip . . . root@hal:~# wget http://s3.amazonaws.com/ec2-downloads/ec2-ami-tools.zip . . .

Unzip the tools:

root@hal:~# unzip ec2-api-tools.zip . . . root@hal:~# unzip ec2-ami-tools.zip . . .

This will give you some directories with version numbers appended. Put them in a safe place:

root@hal:/root# mv ec2-ami-tools-1.3-34544 /opt/ root@hal:/root# mv ec2-api-tools-1.3-42584 /opt/ root@hal:/root# ls /opt ec2-ami-tools-1.3-34544  ec2-api-tools-1.3-42584

Create symbolic links to them. This makes them easier to refer to and it’s easier to update the links to point to newer (or older, in the case of a problem) releases of the tools:

root@hal:/root# cd /opt root@hal:/opt# ln -s ec2-api-tools-1.3-42584 ec2-api-tools root@hal:/opt# ln -s ec2-ami-tools-1.3-34544 ec2-ami-tools root@hal:/opt# ls -l total 8 lrwxrwxrwx 1 root root   23 Oct  9 10:56 ec2-ami-tools -> ec2-ami-tools-1.3-34544 drwxrwxr-x 5 root root 4096 Apr 15 19:13 ec2-ami-tools-1.3-34544 lrwxrwxrwx 1 root root   23 Oct  9 10:56 ec2-api-tools -> ec2-api-tools-1.3-42584 drwxrwxr-x 4 root root 4096 Sep 23 22:24 ec2-api-tools-1.3-42584

Install Java:

root@hal:/opt# apt-get install sun-java6-jre

Edit the system-wide profile:

root@hal:/opt# vi /etc/profile

Add the following to the file:

# EC2 Tools export EC2_HOME=/opt/ec2-api-tools export PATH=$PATH:$EC2_HOME/bin export JAVA_HOME=/usr

When someone logs in, their environment will be ready and raring to go. For example:

david@hal:~$ ec2-describe-instances -K pk-HZF5F4JFK4ZCKLU6FCVW25DQSEHQQ4LH.pem -C cert-HZF5F4JFK4ZCKLU6FCVW25DQSEHQQ4LH.pem RESERVATION  r-87b95eef  097681427437  rhelsandbox INSTANCE  i-ffa80797  ami-ccac48a5  ec2-75-101-187-65.compute-1.amazonaws.com  ip-10-245-134-15.ec2.internal  running  rhelsandbox  0  54DBF944  m1.small  2009-10-09T00:36:08+0000  us-east-1d  aki-8ca347e5  ari-8da347e4    monitoring-disabled  75.101.187.65  10.245.134.15    

Don’t know how to use the tools? No problem. I’ll soon write something about it.

Posted in Linux.

Tagged with , , , , , .


“[Insert shell here]: No such file or directory” … Why is it so?

I was doing some simple shell scripting and encountered an odd problem when I started to test my scripts. It didn’t matter which shell I used (sh, bash, dash, etc), the shell was always reporting:

No such file or directory

Or:

not found

Being of sound mind and good testing pedigree, I boiled it down to the simplest test case possible:

david@wopr:~$ cat /tmp/test.sh #!/bin/bash # do nothing david@wopr:~$ ls -l /tmp/test.sh -rwxr-xr-x 1 david david 29 2009-10-08 14:49 /tmp/test.sh david@wopr:~$ /tmp/test.sh /tmp/test.sh: line 1: #!/bin/bash: No such file or directory david@wopr:~$ sh -x /tmp/test.sh + #!/bin/bash /tmp/test.sh: 1: #!/bin/bash: not found david@wopr:~$

I tried moving my $HOME/.profile aside. No change. I tried /etc/profile. No change. I tried $HOME/.bashrc, /etc/bashrc, $HOME/.bash_profile, and so on. Nothing helped.

Time for a different approach.

I tested a simple Python script. It ran fine. Strangely, the problem did not affect my Python scripts, only my shell scripts.

That ignited a spark of memory…

The previous day I had updated my $HOME/.vimrc so that my Python scripts would meet the PEP standard for code formatting. I remembered enabling some features without limiting them to Python scripts.

Lo and behold:

" Puts a marker at the beginning of the file to differentiate between UTF and " UCS encoding (WARNING: can trick shells into thinking a text file is actually " a binary file when executing the text file): set bomb

I disabled that, created a new script, and the problem went away:

david@wopr:~$ cat /tmp/test2.sh #!/bin/sh echo testing omg david@wopr:~$ /tmp/test2.sh testing omg david@wopr:~$

For future reference, this problem can be detected using cat:

david@wopr:~$ cat -v /tmp/test.sh M-oM-;M-?#!/bin/bash # do nothing david@wopr:~$ cat -v /tmp/test2.sh #!/bin/sh echo testing omg david@wopr:~$

For some reason, these characters can’t be seen in vi using :set list or :set invlist. Go figure. If anyone knows how to show them in vi please let me know.

Posted in Coding, Linux.

Tagged with , , , .