When Netscape Navigator is invoked with the -remote argument, it does not open a window, but instead connects to and controls an already-existing process. The argument to the -remote switch is an Xt action to invoke, with optional arguments.
Remote control is implemented using X properties, so the two processes need not be running on the same machine, and need not share a file system.
We have started support for the old 4.x remote commands in mozilla. Look at nsGtkMozRemoteHelper.cpp,
mozilla-xremote-client.cpp,
and XRemoteService.cpp
for most-current status. Example usage:
mozilla -remote "openurl(http://www.mozilla.org)"
Syntax of mozilla-xremote-client:
mozilla-xremote-client
[-a firefox|thunderbird|mozilla|any]
[-u
Command syntax is case-insensitive, but will be listed here as they were in 4.x.
Commands should not have spaces in them.
List of commands that seem to work:
- openURL() and openFile()
- Prompt for a URL with a dialog box.
- openURL(URL) and openFile(URL)
- Opens the specified document without prompting.
- openURL(URL,new-window)
- Creates a new window displaying the specified document.
- openURL(URL,new-tab)
- Creates a new tab displaying the specified document. (Available in 1.0.1, 1.1 and beyond)
- mailto()
- pops up the mail dialog with the To: field empty.
- mailto(a,b,c)
- Puts the addresses "a, b, c" in the default To: field.
- xfeDoCommand(openBrowser)
- Opens a new browser window
- xfeDoCommand(openInbox)
- Opens a new Mail & Newsgroups Window
- xfeDoCommand(composeMessage)
- Opens a new Message Compose window
- ping()
- Checks if Mozilla is currently running. Can be used by scripts.