2010
05.06

In the Mint (8) installer (but also the Ubuntu Desktop one) there is no support for LVM volumes. So if you want to install it on one, you have to do it by hand. I will show you how:

Boot from the CD, install LVM and make all existing volumes active:

apt-get install lvm2
vgchange -a y
lvdisplay

Should display your volumes

Run the installer. After all packages are installed and the bootloader is configured your system will reboot. Unfortunately it won’t boot! This is because there’s no LVM support build in the initramfs

To install this support we have to boot from the CD again. What we then do is mount the just installed system (in my case a / partition and and /boot partition).

apt-get install lvm2
vgchange -a y

mkdir -p /mnt/lvmroot
mount /dev/lvm/root /mnt/lvmroot
mount /dev/sda1 /mnt/lvmroot/boot
mount --bind /dev /mnt/lvmroot/dev
mount -t proc proc /mnt/lvmroot/proc
mount -t sysfs sysfs /mnt/lvmroot/sys
mount -t devpts devpts /mnt/lvmroot/dev/pts

After mounting all needed “partitions” we can chroot into it:

chroot /mnt/lvmroot

We are now in the OS that’s on the hard disk. That’s where we want to add LVM support. The initramfs will be updated automatically.

apt-get install lvm2

We can now reboot. The system should be able to boot Mint now. Have fun!

References:

2010
05.06

By default Ubuntu (10.04) doesn’t contain a 64 bit version of Sun’s (Official) Java plugin. Of course you can use the icedtea* plugin, but I noticed that not all Java applets (i.e. Webmin file manager) are working in it. That’s why I was eager to get the Official one working. This is how you do it:

Download the latest JRE (to ~/Downloads/mozilla):

wget 'http://javadl.sun.com/webapps/download/AutoDL?BundleId=...' -O jre-6u20-linux-x64.bin

Create the folder in which we’re going to install Java:

sudo mkdir -p /opt/java/64
cd /opt/java/64

Copy the installer to that folder, set it to be executable and install:

sudo cp ~/Downloads/mozilla/jre-6u20-linux-x64.bin .
sudo chmod 755 jre-6u20-linux-x64.bin
sudo ./jre-6u20-linux-x64.bin

Set it to be the default JRE:

sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/64/jre1.6.0_20/bin/java" 1
sudo update-alternatives --set java /opt/java/64/jre1.6.0_20/bin/java
java -version

It should say:

java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

Remove the “old” JRE:

sudo apt-get remove --purge icedtea*

Link the browser plugin to your Firefox profile:

mkdir -p ~/.mozilla/plugins
rm ~/.mozilla/plugins/libnpjp2.so
ln -s /opt/java/64/jre1.6.0_20/lib/amd64/libnpjp2.so ~/.mozilla/plugins/

Firefox about:plugins should mention something like Java(TM) Plug-in 1.6.0_20 File: libnpjp2.so

2010
05.02

For a website I was creating I needed some superscripted text. After using a reset.css, <sup> just looks like normal text, so I needed to define it manually. But how?

According to the W3C you should do it like this:

small,sub,sup
{
  font-size:.83em;
}
sub
{
  vertical-align:sub;
}
sup
{
  vertical-align:super;
}

The result looks like this:

25th Level

References:

2010
05.02

When preparing a presentation for my Bachelor thesis on “Confabulation in the Wernicke-Korsakoff syndrome” I was really annoyed by Powerpoint. The presentation had to be written in Dutch, but for all new “text boxes” I created, the spell-check was set to English. At first, I tried to change the “Default language” of Powerpoint, but that wouldn’t do the trick. After googling for some time I found this nice macro that would set the “msoLanguage” language for all text elements in the presentation.

Follow these steps and you’ll be alright:

  1. Find the right msoLanguage code, for Dutch (msoLanguageIDDutch), for (US) English (msoLanguageIDEnglishUS)
  2. Create a new macro:
    1. Go to Tools, Macro, Visual Basic Editor
    2. Insert a new empty module by selecting Insert, Module
  3. Paste this code on the right panel and save the macro:
    Option Explicit
    Public Sub ChangeSpellCheckingLanguage()
        Dim j As Integer, k As Integer, scount As Integer, fcount As Integer
        scount = ActivePresentation.Slides.Count
        For j = 1 To scount
            fcount = ActivePresentation.Slides(j).Shapes.Count
            For k = 1 To fcount
                If ActivePresentation.Slides(j).Shapes(k).HasTextFrame Then
                    ActivePresentation.Slides(j).Shapes(k) _
                    .TextFrame.TextRange.LanguageID = msoLanguageIDEnglishAUS
                End If
            Next k
        Next j
    End Sub
    
  4. Execute the macro

References:

2010
05.02

In Ubuntu 10.04 (but maybe also in others versions) Nautilus default behavior is not to show the address bar. Instead it just shows some (stupid) buttons. There are probably a lot of people that like this, but I don’t! Fortunately, there is a way to get everything like it should be 🙂

Nautilus default Nautilus with Addressbar

Open gconf-editor and follow this path:

apps -> nautilus -> preferences

There you will find an option called always_use_location_entry. Check this option. This will immediately change all open Nautilus windows, as well as any newly opened Nautilus windows, to always use the location bar. Hurray!

References: