Caffeinated Bitstream

Bits, bytes, and words.

Firefox Selection Applet

After writing the script to help open links in the correct Firefox instance, I decided that it would be really nifty to develop a simple GNOME Panel applet to manage browser instances. (Again, not browser windows, but browser instances—completely separate Firefox processes running with distinct profiles and settings.)

When you click on the applet's icon, a menu is presented which lists the running browser windows and their associated profiles, as well as profiles which are not currently running. If you click on an item representing a running browser window, the window will be raised to the foreground. If you click on an item representing a non-running profile, a new Firefox instance will be launched with the selected profile.

Here are the instructions for using the applet:

  1. Install any needed prerequisites, such as python-xlib.
  2. Place the script in its final location:
    sudo cp /usr/local/bin/
  3. Run the script with the “install” argument with root privileges, to register the script as an applet:
    sudo /usr/local/bin/ install
  4. Refresh the GNOME Panel:
    killall gnome-panel
  5. Right-click the GNOME Panel, select “Add to Panel”, and pick the Firefox Selection Applet.

Here is the applet script; be sure to note the comments at the top:

  • - a GNOME Panel applet for managing separate Firefox instances on the desktop.

Update 2010-01-17: This script stopped working after a recent Ubuntu update. Some change exposed a minor bug in the code. This is now corrected.