Running Firefox in a While-loop for Kiosk

Zach Carter linux at
Wed Jul 18 20:40:35 CEST 2007

On Tuesday 17 July 2007 08:33:02 pm alexgill at wrote:
> Hello List,
> I have an LTSP setup with Firefox running atop XFCE (xfwm and xfdesktop) for the purpose of providing kiosk functionality.  My goal is to have FF always up -- and so it'd re-open after being closed.
> I'm using the "autostart" feature to launch the script at startup:
>     while true; do /usr/bin/firefox; done;
> Sometime this gets out of hand and will start launching ad infinitum....  But other times, it works nicely.  
> Has anyone every tried having such a large app loop like this?  Any advice on getting Firefox to always relauch in a sane and reliable way??

How about something like this:

while true
  if $(pgrep firefox > /dev/null)
    # wait a few secs before checking again
     sleep 5
     echo firefox not running.  restarting.....
    # give it a chance to startup
    sleep 10


More information about the Xfce mailing list