[Linuxtrent] Re: mozilla firefox - avviare 2 volte
- From: "Roberto Foglietta" <me@xxxxxxxxxxxxxxxxxxxxxx>
- To: linuxtrent@xxxxxxxxxxxxx
- Date: Fri, 13 Feb 2004 19:03:17 +0100
Renato Gallmetzer Scrive:
c'è un modo per evitarlo e fargli aprire una nuova finestra o mettere in
focus la finestra che era già aperta?
piccolo scriptino per quanto sopra:
(con modifica funziona anche con mozilla, mozilla mail ecc.)
------------------------ snip -------------------------
#! /bin/sh
if pgrep -u `whoami` firefox-bin > /dev/null
then
firefox -remote "openurl(http://www.google.it,new-tab)"
else
firefox "http://www.google.it";
fi
------------------------ snap -------------------------
Grazie Renato questo funziona, sbagliavo nell'usare la sintassi OpenUrl.
Voglio far notare un piccolo ma subdolo dettaglio.
Nel caso che firefox non sia in path e lo sia questo script allora questo
script richiama se stesso in modo ricorsivo!
Questo è meglio:
------------------------ snip -------------------------
#!/bin/bash
if pgrep -u `whoami` firefox-bin > /dev/null
then
/usr/local/firefox/firefox -remote
"openurl(http://www.google.it,new-tab)"
else
/usr/local/firefox/firefox -UILocale it-IT -contentLocale IT
fi
------------------------ snap -------------------------
con -UILocale e -contentLocale imposto la lingua purchè la si abbia
installata (come root ovviamente).
Ciao,
--
Roberto A. Foglietta
http://www.roberto.foglietta.name
--
Per iscriversi (o disiscriversi), basta spedire un messaggio con OGGETTO
"subscribe" (o "unsubscribe") a mailto:linuxtrent-request@xxxxxxxxxxxxx
Other related posts: