Re: Firefox 0.9 remote control
Paul Hands <[email protected]>
| Newsgroups | gmane.comp.gnome.ximian.user |
|---|---|
| Message-ID | <1087980901.27638.62.camel@localhost> |
I use this script, called moz_launcher....
#!/bin/bash
#Check an arg got passed
#for arg in "$@"
#do
# if [ "$arg" != "" ]; then
# echo "Got an arg :- $arg"
# fi
#done
echo "Try to launch a new window on an existing browser process."
#If it fails, return code will be non-zero, and we will need to start a
new one.
mozilla-xremote-client -a firefox "openurl($arg,new-window)"
#
#Now check the return code.
#If non zero, spawn a new mozilla process - remote control is not
needed.
if [ $? -ne 0 ]; then
# echo $?
echo "No existing Firefox - start a new one on site $arg"
firefox $arg
fi
That works for me in both cases (existing firefox or not). In the gnome
control center, I tell it to use :-
moz_launcher "%s"
This has now worked across several versions of mozilla, firefox, XD1,
XD2, KDE, evolution and connector.
Paul
On Tue, 2004-06-22 at 22:24, Thomas R. Burkholder wrote:
> Thanks for the suggestions but your script didn't work for me. It fails
> when there is no running instance of firefox as follows
>
> /path_to_application/firefox-installer/mozilla-xremote-client: Error:
> Failed to find a running server.
>
> It works just fine when there is a running instance of firefox.
>
> The original script
> /path_to_application/mozilla-xremote-client -a firefox
> "openurl($arg,new-window)"
>
> exhibits similar behavior and I found that replacing $arg with $1 and
> new-window with new-tab puts the URL in a new tab as advertised
>
> My original problem was that I was trying to put the shell script in the
> dialog box, Duh!! Saving it as an executable script makes it work.
>
>
> Tom
>
>
>
>
> On Tue, 2004-06-22 at 16:30, jack wallen wrote:
> > here's teh script i'm using to call up firefox:
> >
> > /opt/firefox/mozilla-xremote-client "openURL($@,new-tab)" || firefox $1
> > &
> >
> > it took me about a week to get it working right (and a lot of help from
> > a lot of people).
> >
> > On Tue, 2004-06-22 at 16:18, Thomas R. Burkholder wrote:
> > > I'm still having trouble passing the URL to $arg in gnome-control-center
> > > preferred applications.
> > >
> > > /path_to_app/mozilla-xremote-client -a firefox "openurl(URL,new-tab)"
> > > pulls up URL perfectly from bash.
> > >
> > > I've tried:
> > >
> > > /path_to_app/mozilla-xremote-client -a firefox "openurl(%s,new-tab)"
> > > which pulls up a blank tab and gets redirected to hoovers.com
> > >
> > > and escaping the %s with '%s' and "%s" which give me a literal %s as a
> > > URL.
> > >
> > > Any suggestions on how to escape the %s so that it gets interpreted
> > > correctly?
> > >
> > > Tom
> > >
> > > On Tue, 2004-06-22 at 10:59, Paul Hands wrote:
> > > > Hi all,
> > > >
> > > > I found, like many others, that the remote control of firefox has
> > > > changed from 0.8 to 0.9. They actually changed the remote control
> > > > functionality, so that existing scripts used to invoke a new window on
> > > > an existing firefox process no longer work.
> > > >
> > > > The answer is to use the supplied mozilla-xremote-client command, and
> > > > to add the -a firefox argument.
> > > >
> > > > As an example, the command now looks like this....
> > > >
> > > > mozilla-xremote-client -a firefox "openurl($arg,new-window)"
> > > >
> > > > Hope this helps,
> > > >
> > > > Paul
> > > >
> > >
> > > _______________________________________________
> > > Users maillist - [email protected]
> > > http://lists.ximian.com/mailman/listinfo/users
>
> _______________________________________________
> Users maillist - [email protected]
> http://lists.ximian.com/mailman/listinfo/users