JSSh (Firefox 3.0) with Optional Port Number
One of the ways how to remotely control Firefox is to use the JSSh (JavaScript Shell) plug-in. To successfully install the plug-in, it is necessary to find a suitable version for your Firefox version (1.x, 2.x, 3.x) and platform (Linux, Mac, Win). That is sometimes not so trivial…
Additionally there is a limitation in the plug-in: its communication port number cannot be (easily) changed, so it is not possible to start more JSSh (and Firefox) instances.
First, the actual status is described, later a new version of the JSSh plug-in is provided with examples.
JSSh communication port
The plug-in opens a port on your machine and it listens to commands that are sent to this port. Unfortunately, the port number is fixed and there is no possibility to start more Firefox instances (with different profiles) – except you alter the plug-in source code and replaced the port number value.
Other Attempts
A patched version appeared where it was necessary to say a port number, but the patched plug-in is compatible only with Firefox 2.x and it is not backward compatible, because it makes the port number value mandatory (-jssh
vs -jssh number
).
A version compatible with Firefox 3.x was created. This version does not contain the patch for changing the port number.
JSSh with Optional Port Number
To make changes in JSSh in a (more) standard way, I submitted a patch to Mozilla. The patch adds an optional parameter -jssh-port number.
The change is backward compatible – it starts on the default port 9997 without the -jssh-port parameter, so your older applications should run without any problems.
JSSh Plug-in with Optional Port Number
And as promised, a new version (0.9.1) of the plug-in that
- works with Firefox 3.x
- allows to optionally specify the port number with a new option
-jssh-port
is available for download (so far only for Linux) here:
I also added a short changelog.txt
file that summarizes main versions and web pages of/about this plug-in (again, only for Linux).
A few examples how to use the new option:
i) start FF with JSSh on the default port (9997). This is exactly the previous original way – just to show that everything will work fine also for your current/older scripts.
ii) start FF with JSSh on the port 9996:
iii) start two FF instances with JSSh on ports 9995 and 9996 (do not forget that it is necessary to use two different profiles):
Enjoy :)