Ubuntu 8.10 and 9.04 problems with KompoZer

There is a nasty little bug with KompoZer in some releases which causes it to crash with a segfault when accessing any submenu which has another menu below that.
For some reason, despite a suitable patched version being available, the faulty version is included in the new 9.04 release.

For anyone else struggling with this problem, there is a fix. To read the background on the issue, it is covered in the Ubuntu Launchpad bug report at https://bugs.launchpad.net/ubuntu/+source/kompozer/+bug/263441

As this bug report can be a bit hard to follow and extract the info needed, I have copied below the instructions which I passed to another Ubuntu user in the Launchpad answers. I also used the same fix and am writing this on the fixed KompoZer!

Go to System > Administration > Software Sources.

Click Software Sources and enter your password when requested.

Click the second tab (entitled Third Party Software). Click the "+ Add" button and in the box which opens enter the following line (this is for 9.04, if using an earlier version of Ubuntu, simply change the word jaunty for intrepid or hardy, depending on your version)-

deb http://ppa.launchpad.net/giuseppe-iuculano/ppa/ubuntu jaunty main

After adding that line, click the Add Source button below this line.

Also add the following line (again, click the "+ Add" button as above and enter the following line, then click Add Source as above)

deb-src http://ppa.launchpad.net/giuseppe-iuculano/ppa/ubuntu jaunty main

This has added the two relevant repositories to your software list. You can now close the Software Sources window.

You will need the key to authenticate these additions, so open a terminal (Applications > Accessories > Terminal).
In the terminal, type (or copy and paste) -

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 623C928A

Press enter.You will be asked for your password, so type that in (note that nothing will show as you type in the password - but it is working!).
Very quickly, the keyserver will be added and you can now update your software list with the following command in the terminal -

sudo apt-get update

Again, press enter, type in password when asked.
You will see the sources being updated - this may take a minute or two, depending on how recently you checked for updates.

OK, the basics are now all completed and you can close the terminal once all is done.

Now, head to your Synaptic Package Manager (System > Administration > Synaptic Package Manager) and uninstall kompozer. If you do not uninstall it, you will get an error at the next step.

Now Kompozer is removed, you can now install Kompozer again - but this time you will find you are installing a different version - this is the latest one which works correctly!