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]
Encoding=UTF-8
Type=Application
Exec=kcmshell kcm_knemo
Icon=knemo

X-KDE-ModuleType=Library
X-KDE-Library=knemo
X-KDE-FactoryName=knemo
X-KDE-ParentApp=kcontrol

[Desktop Entry]
Encoding=UTF-8
Name=Network Monitor
Comment=Monitor network interfaces
Categories=Qt;KDE;X-KDE-settings-network
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]

No comments:

Post a Comment