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.
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.
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)?
Put in your .bash_profile: export MOZILLA_NEWTYPE=tab mozilla-launcher (meaning /usr/bin/mozilla) honors that variable.