On Fri, Jul 16, 2004 at 05:49:35PM -0500, hackhound wrote:
> I have configured Klipper with the following line to launch Firefox
> when a link in a text file is highlighted, and it works if Firefox is
> not open. The problem is when I try it while Firefox is already open.
> It's supposed to open in a new window, but instead It opens the
> profile manager asking me to choose one. I currently am using the
> default profile, and if I choose that one, it says that it cannot open
> with that profile because it is currently in use.
>
> ps x |grep -q '[f]irefox' && firefox -remote "openURL(`echo %s`,
> new-window)" || firefox %s
>
> Thanks,
> Hackhound
Here's a script I use for such annoyances.
#!/bin/bash
browserPath="/usr/local/firefox/firefox"
url="$@"
$browserPath -a firefox -remote "ping()"
# $? = false if running, true if not
if [ $? = 0 ] ; then
exec $browserPath -a firefox -remote openURL"($url,new-tab)"
else
$browserPath $url
fi
exit
If you have a pre-0.9 version of firefox, you should drop the "-a".
Todd
--
Name that tune #20: Do you take me for a fool do you think that I don't
see that ditch out in the valley that they're digging just for me?
____________________________________________________
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________