Thursday, August 4, 2011

A GNOME Panel Hack

Linux Mint 11 (Katya), built on Ubuntu 11.04 (Natty Narwhal), continues to act goofy at times, notably with intermittent boot failures on both my home PC (AMD 64 bit quad-core) and my laptop (Intel 32 bit dual-core).  On the desktop, when a boot fails I get a set of messages that stop abruptly; the failure point is a bit random (sometimes it stops after the battery check, sometimes it goes deeper).  On the laptop, the screen stays blank; two of the LED indicators (either numeric lock and caps lock or caps lock and scroll lock; I forget which pair) blink in unison.  On both machines, rebooting eventually succeeds.

Another intermittent problem has to do with the GNOME panel. Again on both machines, I sometimes get a message that one of the panel components failed to load (sometimes the indicator applet, sometimes the clock applet, this morning the Mint Menu button).  I'm asked if I want to delete it, to which I always reply in the negative.

Killing the GNOME panel will cause it to spontaneously regenerate, and usually it regenerates correctly.  (Occasionally it needs to be killed a second, or even third, time.)  So I cobbled together a menu entry to do this.  I put a file named Fix\ Panel.desktop into ~/.local/share/applications.  The contents of the file are listed below.  Now all I have to do is click the Menu button, find "Fix Panel" and click it to (hopefully) repair the panel.

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=gnome-panel-launcher
Name[en_US]=Fix Panel
Exec=killall gnome-panel
Comment[en_US]=Restarts GNOME panel if it's glitched
Name=Fix Panel
Comment=Restarts GNOME panel if it's glitched
Icon=gnome-panel-launcher

No comments:

Post a Comment

Due to intermittent spamming, comments are being moderated. If this is your first time commenting on the blog, please read the Ground Rules for Comments. In particular, if you want to ask an operations research-related question not relevant to this post, consider asking it on Operations Research Stack Exchange.