Un simple petit script qui regarde si une instance de mozilla est déjà lancée et, le cas échéant, lance une nouvelle fenêtre (ici pour phoenix):
#!/bin/bash
# author - David Patton
# hacked by Ploum
startpage="file:///usr/share/doc/mozilla-browser/localstart.html"
cd /usr/local/phoenix
if [[ `ps -e | grep phoenix-bin` ]]; then
echo "Phoenix is probably running."
echo "See http://www.mozilla.org/unix/remote.html(...) for -remote commands"
if ! [ $# = 0 ]; then
`./phoenix -remote 'openURL('1ドル',new-tab)'`
elif ! `./phoenix -remote 'openURL('$startpage', new-window)'`; then
echo "Phoenix failed to start."
echo "Trying phoenix as if it isn't running: "
`./phoenix 1ドル &`
fi
else
echo "Phoenix isn't running."
`./phoenix 1ドル &`
fi
Mes livres CC By-SA : https://ploum.net/livres.html
# Re: Mozilla 3.1 -> Profile Manager
Posté par ploum (site web personnel, Mastodon) . En réponse au journal Mozilla 3.1 -> Profile Manager. Évalué à 6.
#!/bin/bash
# author - David Patton
# hacked by Ploum
startpage="file:///usr/share/doc/mozilla-browser/localstart.html"
cd /usr/local/phoenix
if [[ `ps -e | grep phoenix-bin` ]]; then
echo "Phoenix is probably running."
echo "See http://www.mozilla.org/unix/remote.html(...) for -remote commands"
if ! [ $# = 0 ]; then
`./phoenix -remote 'openURL('1ドル',new-tab)'`
elif ! `./phoenix -remote 'openURL('$startpage', new-window)'`; then
echo "Phoenix failed to start."
echo "Trying phoenix as if it isn't running: "
`./phoenix 1ドル &`
fi
else
echo "Phoenix isn't running."
`./phoenix 1ドル &`
fi
Mes livres CC By-SA : https://ploum.net/livres.html