The mystery of Ubuntu Gnome missing panel applet

Have you ever installed application on your Linux box to discover that its Gnome panel applet is missing from "Add to panel" dialog. Even worse if you application is Gnome panel applet. On my Ubuntu box this usually happens when i install something from the source. What went wrong you might ask? Many things I must say. But there is one thing you should check first. Here it goes...

According to the library.gnome.org, every Gnome 2 panel applet is Bonobo component, it must have a special file called Bonobo activation file so that the Bonobo activation daemon is aware that our panel applet exists and how to activate it. This activation file has extension .server and Gnome expects it to be located in "/usr/lib/bonobo/servers". You see, there is unwritten convention for distributions like Ubuntu, Fedora etc. to install their packages to /usr directory, so our panels Bonobo activation file is expected to be located under the /usr directory. When you install software from source this is not the case. GNU convention is to install applications to /usr/local. Reason for this is to prevent software installed from source to overwrite some of your distributions conflicting files during "make install" part of your installation. Because of all I've wrote here your applets .server file ends up in "/usr/local/lib/bonobo/servers" instead of "/usr/lib/bonobo/servers".

You panel applet is missing because your panel applets .server file is invisible to Gnome. Here are three things we can do to materialize our Gnome applet on our Gnome panel.

  1. Symlink "/usr/local/lib/bonobo/servers/your_applet.server" to "/usr/lib/bonobo/servers/your_applet.server".This way we must symlink every .server file for every one of our misplaced panel applets. I think we can do better than that, don't you?
  2. We can install our software in /usr by giving "--prefix=/usr" parameter to our "./configure" script while installing our software from the source. This is better but still there is the chance that we will overwrite some of distributions libraries with our files and installing our application could brake some of existing applications installed trough our distributions channels.
  3. Third and the most elegant way is to instruct Gnome to include "/usr/local/lib/bonobo/servers" directory when searching for panel applets .server files. We do this by editing "bonobo-activation-config.xml" file. This way we have fixed problem for all panel applet software installed from source.

Here's what you should do first when you encounter missing applet problem in Gnome:

gksudo gedit /etc/bonobo-activation/bonobo-activation-config.xml

Now we add our "/usr/local/lib/bonobo/servers" path to the list of paths that Bonobo activation deamon visits in his search for applets. "bonobo-activation-config.xml" file is supposed to look like this after our modifications:

<?xml version="1.0"?>
 
<oafconfig>
 
<searchpath>
    <item>/usr/local/lib/bonobo/servers</item>
</searchpath>
 
</oafconfig>

After modifying this file save changes, logout and login again or restart you PC. Your missing panel applet should be back in "Add to panel" dialog. If not, now you can go and submit bug report to you package maintainer. And feel free to post comments by clicking on the link in the upper right corner of this post. Maybe I can help you if things don't work the way I've described them.

DevGenii

E-commerce is a breeze with Magento Certified Developer Plus & Zend Certified PHP Engineer nearby. Get in touch!

One thought on “The mystery of Ubuntu Gnome missing panel applet

  1. Kenny

    I found a better solution.
    1. Go to Keyboard Shortcut
    2. Add
    3. For the name type WiFi Icon and for command type “nm-applet &”.
    4. Assign a keyboard shortcut

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *