Wednesday, 12 May 2010

Panel Problems

I've had a erratic but persistent problem with the Notification applet on my panel: when I restart my machine (not (usually) when I boot my machine), the network icon fails to render (also known as paint) leaving a black hole that neither responds to attention from my mouse or my keyboard.

There are several suggestions on the Internet about what might cause this and how it might be resolved, but none of them have been successful in my case. That said, it's an irritation rather than a major inconvenience and it's easily fixed by opening a terminal and typing:

killall gnome-panel

The killall command stops the panel and, as soon as this happens, the kernel re-starts it rendering all the icons as they should appear. However, I must be getting lazy in my old age and even this simple operation is too much bother! So, I created a simple shell script and allocated it to an application launcher on the panel.

Open a text editor and type: killall gnome-panel. If you want to add some notes about the purpose of the shell (which is a very good idea), simply use the hash (#) symbol at the start of a text line and the command line interface will ignore it when it runs. Save the file as (or any name of your choice) in your home directory.

Open a terminal and type:

chmod +x ./

This makes our file an executable shell script.

Right click on your panel where you want to add your launcher and click Add to Panel.... From the Add to Panel... dialog box, select Custom Application Launcher.
  • Type is Application
  • Name can be anything that you want, but I think simple is best, so I advise that you make it as descriptive as possible.
  • Command is the full file path to the file - it's case sensitive, so use the browse button if your typing is rubbish!
  • The Comment can be anything but will appear when your mouse hovers over the application icon so, once again, make it descriptive and meaningful.

You can add (or change) an icon to the launcher simply by clicking on the icon in the top left hand corner of the launcher panel. You'll find more icons in the /usr/share/icons directory.

Now all you have to do is click the icon if you need to restart the gnome-panel: simple!

No comments:

Post a Comment