I don't know if it's a known issue, but I looked for some time for a way
to launch mozilla without launching a new process every time.
Finally I wrote this script, hope someone will fid it useful.


Warning! line wraps


#!/usr/bin/perl
# launch mozilla and skip the profile window
# Ami Chayun [EMAIL PROTECTED]

use strict;
my $mozilla = "/usr/local/mozilla/mozilla";

my $fullcmd = $mozilla;
my $url;

foreach $_ ( @ARGV )
{
    if (/"?--?[a-zA-Z-=]*"?/)
    {
        $fullcmd.=" ".$_;
    }
    elsif( /[a-zA-Z-_:\/\?=\.]*/ )  #if url
    {
        $url = $_;
    }
}

# see if there is a mozilla proccess running
my $Ret = system("$mozilla -remote \"ping()\" 2>/dev/null");
if ($Ret == 512)
{
    #print "new instance\n";
    # new instance required
    if( $url ) { $fullcmd .= " ".$url; }
    system("$fullcmd &");
    exit 0;
}
# mozilla is already running
else
{
    if( $url )  { $fullcmd .= " -remote \"openurl($url, new-window)\"";
}
    else        { $fullcmd .= " -remote \"xfeDoCommand (openBrowser)\"";
}
    system("$fullcmd");
}


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to