Setting default applications in Ubuntu 10.10

After installing Adobe Reader into my Ubuntu installation I noticed that
the Adobe Reader was actually making itself at home as the default
viewer for PDF files. However, I do only rarely use it because I feel
that the Ubuntu Document Viewer (aka evince) is the quicker and better
solution most of the time.

Now, I could change the default for double-clicking by going through any
PDF file’s Properties->Open With and selecting Document Viewer
there. Firefox and Thunderbird for one thing did not really seem to care
at all about this, though. Both kept using Adobe Reader to open PDF
files when double-clicking in the download window and only offered the
reader as the default in the file save dialog.

To work around this problem, I came up with a solution using

In a terminal, I did

porten@lx-porten:~$ xdg-mime query default application/pdfacroread.desktop
porten@lx-porten:~$ sudo xdg-mime default evince.desktop application/pdf
porten@lx-porten:~$ xdg-mime query default application/pdfevince.desktop

Obviously the important part is the xdg-mime default. I would
actually have expected setting the default via the file properties to
have the same effect, but alas, it does not.


Connecting Apache2 and Tomcat6

If you ever need to serve Tomcat applications through Apache2, here is a
quick guide on how to do this on Ubuntu.

First, install mod-jk:

sudo apt-get install libapache2-mod-jk
sudo a2enmod jk

Then, edit

sudo vi /etc/libapache2-mod-jk/

and adapt the following values (assuming you have installed the

workers.java_home = /usr/lib/jvm/java-6-openjdk

Then, mount the site using JkMount. Do

sudo vi /etc/apache2/sites-enabled/000-default

and then add the following line

JkMount /path/to/app/* ajp13_worker

And update the mod-jk settings in jk.load. do

sudo vi /etc/apache2/mods-available/jk.load

and update to file to read like this

LoadModule jk_module /usr/lib/apache2/modules/
JkWorkersFile /etc/libapache2-mod-jk/
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel error

Update the server.xml with

sudo vi /etc/tomcat6/server.xml

and then uncommenting the line

<connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

Finally, restart the services

sudo /etc/init.d/apache2 restart
sudo /etc/init.d/tomcat6 restart


Installing Ubuntu 10.04 Server 64bit via USB Pendrive

After struggling with installing Ubuntu Server 10.04 from a bootable
usb stick, here are some hints in case anyone else ever wants to do
this. My problem was that the Server Installer kept trying to load files
from the CD and could not find them, which made the installation fail. I
actually wonder why it could not find anything because it was apparently
looking in the right places (i.e. the USB stick mounted under /cdrom).
Feel free to enlighten me. Read more after the break.

Anyway, first, you’ll of course need the Ubuntu Server Iso Image and
the Universal USB Install in case you’re on Windows or the ‘Startup
Disc Creator’ in case you’re already running Ubuntu.

Then, you’ll need to follow the guide to creating a usb stick as posted
on thedownload page when you click ‘Show me how’. That is, run the
Disc Create / USB Installer and follow the instructions. It’s actually
pretty straight forward so I’m not going to post it again. 🙂

Next, and this is important, copy the iso you downloaded onto the USB
stick, as we will need it later when we booted into the installation.

Now, boot the system from the USB stick you just created. This will
start the installation where you can first choose a language and the
like. After a while, as I already wrote, the installer failed for me
with "missing data from cdrom", bringing me to the installation menu.
From there, you can choose to open a shell. Do so.

Once the shell is there, execute:


and note the device that is mounted as /cdrom. This is your usb stick.

Next, execute the following commands:

umount /cdrom
mkdir /usb
#device_name is the one from mount
mount /dev/device_name /usb
mount -t iso9660 -o loop /usb/ubuntu-10.04-server-amd64.iso /cdrom

The iso name of course depends on the version of the server you
downloaded. for me, it was the 64 bit version.

Next, you can exit the shell:


This will take you back to the installation menu.

Select "Load preseed" (or similiarly named – can’t quite remember right
now). The installation should now continue normally.

Flashing PR 1.2 to the N900 from Ubuntu 10.04 64bit

To install flasher, do

sudo dpkg -i --force-architecture maemo_flasher-3.5_2.5.2.2_i386.deb

afterwards, install ia32-libs from multiverse:

sudo apt-get install ia32-libs

Before installing ia32-libs flasher kept telling me this:

ubuntu@ubuntu:~/Desktop$ flasher-3.5
bash: /usr/bin/flasher-3.5: No such file or directory

Now, to flash PR1.2 and the vanilla eMMC content, issue the following
two commands:

sudo flasher-3.5 -F RX-51_2009SE_10.2010.19-1_PR_COMBINED_MR0_ARM.bin -f
sudo flasher-3.5 -F RX-51_2009SE_10.2010.13-2.VANILLA_PR_EMMC_MR0_ARM.bin -f -R

This will flash and reboot after flashing the eMMC contents.