Mailinglist Archive: opensuse (769 mails)

< Previous Next >
[opensuse] start firefox from script

I would like to start firefox browser from bash script. I made this script:

#! /bin/bash

ffpid=`pidof firefox`

echo "firefox PID is: $ffpid"

if test $ffexit == 0
then `kill -9 $ffpid`

sleep 5

firefox -P list &


What I want is to check if firefox is running, if it's runing stop it and start
it again with specific profile with specific URL. This works with the above
script but the problem is if I run the script at least two times, the second
time firefox opens with two tabs, with the same content in both tabs. How can I
force it to open only on tab with the URL in the command line specified? In
firefox preferences I've set General/Startup: When firefox start: Show a blank
page. I use an old firefox version (24.8.1 ESR, the last ESR that doesn't have
australis uinterface), I don't know if it matters.

Thanks in advance,

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >