Closed Bug 208794 Opened 21 years ago Closed 21 years ago

Launching second instance should automatically reuse first instance

Categories

(SeaMonkey :: Startup & Profiles, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 122698

People

(Reporter: ux9i, Assigned: jag+mozilla)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030529
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030529

Launching a second instance of the browser should automatically reuse the first
instance of the browser.  Instead by default launching a second instance of
mozilla from the command line "mozilla" or from the start menu in GNOME, I get a
refusal indicating that the profile is already in use.

Reproducible: Always

Steps to Reproduce:
1. Launch mozilla
2. Launch mozilla again

Actual Results:  
Second instance refuses to start, profile already in use.

Expected Results:  
Second instance should use the first instance.

My suggested solution is that during the install, the link /usr/bin/mozilla
should be the following short script:

#! /bin/sh

# The installed version of mozilla we are using
mozbin=/usr/lib/mozilla-1.4rc1/mozilla
 
# Ensure we have only zero or one argument
if [ $# -gt 1 ]; then
    echo Usage: mozilla [URL]
    exit 1
fi
 
# See if instance is running
if ! $mozbin -remote 'ping()' 2>/dev/null; then
    # It is not running, start a new instance
    $mozbin "$1"
else
    # It is running, tell it to open the url in a new window
    $mozbin -remote "openurl($1,new-window)"
fi
Ever since I changed /usr/bin/mozilla to be that short script, right-clicking on
a link in gnome-terminal and saying "Open Link" reuses the first instance and
opens the link in a new window.  Seems like this is a system-wide solution.

*** This bug has been marked as a duplicate of 122698 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
v
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.