I am using the following script to launch firefox (to avoid the well-known problem it has in launching two instances normally):
Code:
#! /bin/bash
#
if pgrep -u `id -un` "firefox-bin" > /dev/null ; then
if [ -z "$1" ]; then
mozilla-firefox -remote "xfeDoCommand (openBrowser)" &
else
mozilla-firefox -remote "openURL($1, new-window)" &
fi
else
mozilla-firefox $1
fi
this seems to work just fine if i launch the script from the cmd line. however, when i put the script into a KDE Menu item and click it, the second time you click (where the script uses the -remote switch), a 3rd toolbar item is created that says Starting Mozilla Firefox with a spinning hourglass. The 2nd window *does* open correctly, but this weird toolbar item stays there for 15 seconds or so. If I click the menu item a 3rd time, a third firefox window is created, along with a second weird spinning hourglass toolbar item.
The weird item is created only when launching the script from my KDE menu item, not if i run the script from a term window.
If my descriptions are bad, here is a screenshot of the weird item:
http://www.coffeegeek.net/firefox_launch.png
I have all of the behavior I need, I can create a new Firefox window by clicking on a link in my menu. However, this weird toolbar item is really bugging me. What is causing it? How I can get rid of it?
Thanks for the help,
~ Justin