Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 71399 - Mozilla start script does the wrong thing with -remote and no moz running
Summary: Mozilla start script does the wrong thing with -remote and no moz running
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-16 07:19 UTC by Klaus Kusche
Modified: 2004-11-19 11:35 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Kusche 2004-11-16 07:19:05 UTC
Mozilla 1.7.3.

Reproducible: Always
Steps to Reproduce:
1. make sure no mozilla is running
2. Type on shell: mozilla -remote openURL(...)


Actual Results:  
I got *two* error messages that mozilla is not running, no mozilla was started.

Expected Results:  
It should start a new mozilla instance and open the given URL.

I analyzed the "mozilla" shell script:
* The "-remote ..." is parsed correctly into the variable "mozargs" - ok.
* The while loop at line 42 tries to send the "-remote ..." command to a running
mozilla, and fails - also ok.
* However, at line 51, it moves the "-remote ..." to the variable "args" (which
was empty up to now - the problem starts here.
* Next, the script intends to start a new browser at line 59. However, it
appends the "args", i.e. "-remote ...". Hence, the binary will not start a new
instance, but look for an existing one, and fails.
* The script gives up...

It should first start a new instance without the "-remote ...", and then send
the "-remote ..." to the newly started instance.
Comment 1 Aron Griffis (RETIRED) gentoo-dev 2004-11-16 11:10:51 UTC
Where are you getting your idea of how "mozilla -remote" should behave?  It's like a remote control; if there's nothing to contact, the remote isn't going to make a TV magically appear.

AFAICT this is the same behavior as the default mozilla.org supplied scripts.

Btw, the Gentoo-supplied script does what you want if you pass a simple URL

    mozilla http://gentoo.org

That will open a new window if there is an existing browser.  If there is no existing browser then it starts a new one.  However, as you've noticed, explicitly specifying -remote overrides this automatic behavior.
Comment 2 Klaus Kusche 2004-11-17 01:13:14 UTC
Ok, sorry, I was wrong about what -remote should do when no browser is running.

The reason why I wanted to use -remote is that I wanted to open a given URL in a new tab, not in a new window, and I didn't find a way to specify "new tab" with a simple URL argument.

(intended to start Google etc. from window manager shortkeys)

Any hint for that (except for writing a small script and using ping() first)?
Comment 3 Aron Griffis (RETIRED) gentoo-dev 2004-11-19 11:35:57 UTC
Put in your .bash_profile: export MOZILLA_NEWTYPE=tab

mozilla-launcher (meaning /usr/bin/mozilla) honors that variable.