Monday, June 19, 2006

My Desktop Got Egg'd

A while back I decided to try kde on my ubuntu installation and installed the kubuntu-desktop package using synaptic, all went well until my desktop was egg’d. It wasn’t realy egg’d, but I started getting messages similar to this one "** (process:4337): CRITICAL **: egg_desktop_entries_add_group: assertion 'egg_desktop_entries_lookup_group (entries, group_name) == NULL' failed" all over the place during the install and afterwards when I tried installing any other applications.

My first step when troubleshooting a problem is to Google the error message and I usually get a fix to my problems, but not this time… I only picked up a few bug reports here and there. It took me a day or two to figure out, so here’s how I got my desktop cleaned up…

The problem is caused by duplicate entries in your .desktop files located in /usr/share/applications. First we need to find the culprit, execute the following commands:

cd /usr/share/applications
sudo update-desktop-database -v
You should get output similar to this

Search path is now: [/usr/local/share/applications, /usr/share/applications]
Could not create cache file in directory '/usr/local/share/applications':
Error opening directory '/usr/local/share/applications': No such file or directory
File '/usr/share/applications/kde/mountconfig.desktop' lacks MimeType key
** (process:27561): CRITICAL **: egg_desktop_entries_add_group: assertion egg_desktop_entries_lookup_group (entries, group_name) == NULL' failed
File '/usr/share/applications/kde/kcm_knemo.desktop' lacks MimeType key
File '/usr/share/applications/kde/kcm_btpaired.desktop' lacks MimeType key

Ignore the MimeType errors and focus on the line after the egg_desktop error in this case it’s /usr/share/applications/kde/kcm_knemo.desktop, use your prefered editor (vim in my case) and edit using sudo.

Your file should like something like this (I modified mine to recreate the error to get the correct output)

[Desktop Entry]
Exec=kcmshell kcm_knemo


[Desktop Entry]
Name=Network Monitor
Comment=Monitor network interfaces
In my case I have ”[Desktop Entry]” and ”Encoding=UFT-8” duplicated. Just remove the duplicate lines, save the file and repeat for all files. Once your done run sudo update-desktop-database -v and your desktop will be clear of eggs.

I also encounterd another error (Not MimeType) but it complained about invalid characters or something. I you have a similar error edit the file and remove the localizations which you do not require. In my case is was a comment for localization “de”.

Hope this helps, I’ll try to clean up the post when I get some free time.

Don’t forget to leave me a comment good or bad, I really appreciate any fixes, improvements you might recommned.

[posted with ecto]

Monday, May 22, 2006

Setting up Freemind in Ubuntu Dapper

This tutorial is very old, and it has been brought to my attention that it actually is causing more problems than fixing them. I had written this up before there were any other resources of getting Freemind installed on Ubuntu. Anyway you should head on over to to get help on installing FreeMind. Thanks Eric

The Rest of the article will remain intact for posterity.


Freemind, it's an cross platform java Mind-Mapping application. You might be asking yourself what is a mind mapping application. Here's an quote from the Freemind website:
So you want to write a completely new metaphysics? Why don't you use FreeMind? You have a tool at hand that remarkably resembles the tray slips of Robert Pirsig, described in his sequel to Zen and the Art of Motorcycle Maintenance called Lila. Do you want to refactor your essays in a similar way you would refactor software? Or do you want to keep personal knowledge base, which is easy to manage? Why don't you try FreeMind? Do you want to prioritize, know where you are, where you've been and where you are heading, as Stephen Covey would advise you? Have you tried FreeMind to keep track of all the things that are needed for that?
Now for the new and improved FreeMind installation instructions: We need to make sure we have the universe and multiverse turned on /etc/apt/sources.list for the archive repository

deb dapper main
deb dapper universe
deb dapper multiverse
The FreeMind files are located here
  • Download the main packages
  • freemind_0.8.0-1_all.deb
  • libforms-java_1.0.5-2_all.deb
To install the plugins downlaod these
  • freemind-plugins-help_0.8.0-1_all.deb
  • freemind-plugins-svg_0.8.0-1_all.deb
  • freemind-plugins-time_0.8.0-1_all.deb
Note: the versions numbers might change, or if the page is not available go to the FreeMind site and click on the Debian for Linux link under downloads.

To install FreeMind (we'll get to the plugins a little later) we need to take care of some dependency problems. Install libcommons-lang-java with you favorite package manager. I prefer to use wajig so this is what I will use during the examples. But, if you prefer apt-get replace "wajig" with "sudo apt-get".

wajig install libcommons-lang-java
Now that libcommons-lang-java is installed we can go ahead and install librelaxng-datatype-java

wajig install librelaxng-datatype-java
Next we install libforms-java from the deb package we downloaded

sudo dpkg -i libforms-java_1.0.5-2_all.deb
We now should have all of dependencies we can go ahead and install FreeMind

sudo dpkg -i freemind_0.8.0-1_all.deb
You should now have a working version of FreeMind on you machine. You can test it out by running the following command

If all looks good we can continue to install the plug-ins. The plug-ins also have some dependencies which need to be met. Fist lets take care of the dependencies. All but one are located within the repositories. Install the following packages for the SVG plug-in

wajig install rhino libbsf-java
Install the following packages for the time plugin

wajig install j2re1.4 libjcalendar-java
We need to install libbatik-java and I was able to find a deb package here. Download from one of the mirrors and install using dpkg

sudo dpkg -i libbatik-java_1.5.1-1_all.deb
That should take care of our dependency problem, now lets install our plugins

sudo dpkg -i freemind-plugins-help_0.8.0-1_all.deb
sudo dpkg -i freemind-plugins-svg_0.8.0-1_all.deb
sudo dpkg -i freemind-plugins-time_0.8.0-1_all.deb
Now we just need to take care of our associations Create a file called freemind.xml within /usr/share/mime/packages and add the following text

<mime-type type="application/x-freemind">
<comment xml:lang="en">FreeMind Mindmap</comment>
<glob pattern="*.mm" />
Now its time to update the system, enter the following commands

sudo /usr/bin/update-mime-database /usr/share/mime
sudo /usr/bin/update-menus
That should do it. If you check your menu Applications>Office you should see FreeMind and you will also have .mm files associated with FreeMind.


Freeming won't start
If you have problems with freemind loading you might want to try this workaround recommended by eiraku in the comments: Edit the startup script to point to the JVM... taken from Update the start script so FreeMind uses Sun Java. There's probably a more elegant way to make this change, and find the Sun Java path, but this works and I've already spent too much time resolving and documenting this.

sudo vi /usr/share/freemind/
Locate the method findjava() and add the line JAVACMD=/usr/lib/j2re1.5-sun/bin/java as shown below. The path could differ slightly if using a different version of Java.

     elif [ -x /usr/bin/java ]
_debug "Using /usr/bin/java to find java virtual machine."
# if we were successful, we return 0 else we complain and return 1
if [ -n "${JAVACMD}" ] && [ -x "${JAVACMD}" ]
_debug "Using '$JAVACMD' as java virtual machine..."
Exception in thread “main” java.awt.AWTError
If you an error similar to this
Exception in thread “main” java.awt.AWTError: Cannot load AWT toolkit:
at java.awt.Toolkit.getDefaultToolkit(
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(
at java.awt.Window.(
at java.awt.Frame.(
at javax.swing.JFrame.(
at freemind.main.FreeMind.(
at freemind.main.FreeMind.main(
Caused by: java.lang.ClassNotFoundException:
at java.lang.Class.forName(
at java.lang.Class.forName(
at java.awt.Toolkit.getDefaultToolkit(
…6 more
then you should be able to fix this if you type

sudo update-alternatives --config java
and select

you can also use "Galternatives" which is a GUI that does the same as "update-alternatives". Remember to run it as "sudo" or in this case "gksudo" since it's a GUI application. If you need to install it just type

sudo apt-get install galternatives
and after the installation is complete use the following command

gksudo galternatives
  • 2006/06/01
    • Thanks to *armin* I was able to fix a problem with the deb _source.list_ entries. I've also included the packages for each of the two repositories mentioned in the article.
  • 2006/06/20
    • After reading *432sd's* comment I tried the install from scratch without using the the experimental or unstable repositories from Debian and got it working. So, I've rewritten the article in hopes of making the install cleaner and simpler.
  • 2006/06/29
    • Fixed a typo in the code for the freemind.xml file setup thanks to feedback *Samuel Hilderbrandt*.
  • 2006/08/24
    • Added code changes recommended by eiraku at end of article. Thanks for the info *eiraku*.
  • 2006/11/27
    • Added comments by *Spiro* in the Troubleshooting section. Thanks for the tip.
  • 2007/1/24
    • Fixed typo in freemind.xml text

[posted with ecto]