You are currently viewing a snapshot of taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to, please file a bug.

remote control of unix mozilla
[Borrowed from the 4.x x-remote doc]
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("

Syntax of mozilla-xremote-client:
mozilla-xremote-client [-a firefox|thunderbird|mozilla|any] [-u ] [-p ] COMMAND

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.
    Creates a new window displaying the specified document.
    Creates a new tab displaying the specified document. (Available in 1.0.1, 1.1 and beyond)
    pops up the mail dialog with the To: field empty.
    Puts the addresses "a, b, c" in the default To: field.
    Opens a new browser window
    Opens a new Mail & Newsgroups Window
    Opens a new Message Compose window
    Checks if Mozilla is currently running. Can be used by scripts.