Mailinglist Archive: opensuse (769 mails)

< Previous Next >
Re: [opensuse] start firefox from script
On 05/17/2016 08:47 AM, Bernhard Voelker wrote:
-------------------
#!/bin/bash

FFPIDFILE="$HOME/.ffpid"
FFPROFILE='list'

test -r "$FFPIDFILE" \
&& . "$FFPIDFILE"

test "$FFPID" \
&& kill "$FFPID" 2>/dev/null \
&& wait "$FFPID"

sorry, 'wait' does not work here, but I think you got the idea,
right? I'd replace the last line with the following:

&& while kill -0 "$FFPID" 2>/dev/null; do sleep .2; done


firefox -P "$FFPROFILE" --new-window "$@" &
echo "FFPID=$!" > "$FFPIDFILE"
-------------------

Have a nice day,
Berny
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >