LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Mozilla (official) Open New Window script (https://www.linuxquestions.org/questions/linux-software-2/mozilla-official-open-new-window-script-214968/)

tuxq 08-08-2004 08:42 AM

Mozilla (official) Open New Window script
 
I've been googlin' for a while trying to find the actual (official) Open New Window script from Mozilla.org ... I've found it pasted into forums, but I was hoping to get the link because some people tend to leave things out.

And before you say "why not ctrl-N? how hard is that?" ... I usually have windows on top of windows on top of windows because I do several things at once (wow, multitask, who would have thought?).

Thanks in Advance.

wipe 08-10-2004 07:43 PM

You mean the script that opens a new Mozilla window instead of the Profile Manager? The one that first checks whether Mozilla is running and if it is, uses the openURL remote command?

Look what I found in the launch script firefox, in package firefox-0.9.3-i686-linux-gtk2+xft-installer.tar.gz:

Code:

# The following is to check for a currently running instance.
# This is taken almost verbatim from the Mozilla RPM package's launch script.
MOZ_CLIENT_PROGRAM=$dist_bin/mozilla-xremote-client
check_running() {
    $MOZ_CLIENT_PROGRAM -a firefox 'ping()' 2>/dev/null >/dev/null
    RETURN_VAL=$?
    if [ $RETURN_VAL -eq 0 ]; then
        echo 1
        return 1
    else
        echo 0
        return 0
    fi
}

ALREADY_RUNNING=`check_running`

if [ $ALREADY_RUNNING -eq 1 ] && [ -z "$1" ]; then
  exec $MOZ_CLIENT_PROGRAM -a firefox "xfeDoCommand(openBrowser)" 2>/dev/null >/dev/null
fi
# End of section that checks for currently running instance. - jtg

This is as official as it gets. It's nice to see that it's finally been implemented in Firefox. Saves many people from headaches. They use mozilla-xremote-client to open the new window.

Regards
Simon


All times are GMT -5. The time now is 04:09 AM.