Find the answer to your Linux question:
Results 1 to 2 of 2
Iím using the following to launch Firefox (in SuSE Linux 8.2): #!/bin/bash REALPROGRAM=/opt/firefox/firefoxOLD if [ -f ~/.mozillarunning ]; then if [ ! -z $1 ]; then $REALPROGRAM -remote "openURL($1 , ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User zba78's Avatar
    Join Date
    Feb 2004
    Location
    Birmingham, England
    Posts
    335

    Problem launching firefox with script


    Iím using the following to launch Firefox (in SuSE Linux 8.2):

    #!/bin/bash

    REALPROGRAM=/opt/firefox/firefoxOLD

    if [ -f ~/.mozillarunning ]; then
    if [ ! -z $1 ]; then
    $REALPROGRAM -remote "openURL($1 , new-tab)"
    else
    $REALPROGRAM -remote "openURL(about:blank, new-tab)"
    fi
    else
    touch ~/.mozillarunning
    $REALPROGRAM $1
    rm -f ~/.mozillarunning
    fi

    Where Iíve renamed the original firefox script to firefoxOLD.

    For those who arenít aware, this script checks to see if Firefox is running, if it is then it simply opens a new-tab in the already running window, otherwise it opens a whole new window altogether (instead of the annoying Ďmanage profileí window showing up).

    This worked perfectly up till a few days ago. Then, while firefox was open my system froze (not because of firefox). Since rebooting every time I try to run the script I get the error message ĎNo open window foundí and nothing loads.

    If I run Firefox from the original script (firefoxOLD) and then run the above firefox script it opens a new tab perfectly fine, bit the new script will no longer launch firefox in the first place.

    It seems that the new script thinks that firefox is already running (when it is not) and tries to open a new tab all the time.
    Ubuntu Jaunty :: Arch Linux (current) :: Acer Aspire 1692WMLi

  2. #2
    Linux User zba78's Avatar
    Join Date
    Feb 2004
    Location
    Birmingham, England
    Posts
    335
    I figured it out. There was a hidden file (.mozillarunning) in my home directory that I had to delete
    Ubuntu Jaunty :: Arch Linux (current) :: Acer Aspire 1692WMLi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •