login
Blurts on the Art of Software Development

Today | RSS | RDF | Atom | Other Tags
Categories : All | All | CI | .NET | General | Humour | Java | Personal | Reviews | Ruby | SW Eng

No, not the Java SSH library. JSSh is a promising-looking cross-platform plugin for the Mozilla family of browsers that lets us script a browser over a network socket.

The way it works is that you install the .xpi file (the plugin), launch the browser with the "-jssh" option, and start sending commands to port 9997. Sounds like the automator's wet dream? It sure does... But it's not that simple.

You see, some weeks ago I was trying to get that damn .xpi file installed on my Fedora laptop for 15 minutes and it just wouldn't happen. I could download the file alright, but when I tried to actually install it, Firefox said something about not finding the file. Later on, I figured out that I needed to use Mozilla--the "real" Mozilla--and not Firefox.

Bang.
Plugin installed.
Bang.
Browser launched with the "-jssh" option.
Somebody's listening on port 9997.
Can this be true?

Of course not.

[lkoskela@kera ~]$ telnet localhost 9997
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
JSSh server: new connection!
###!!! ASSERTION: failed to get script security manager: 'Error', file /home/alex/devel/mozilla-trees/clean/mozilla/extensions/jssh/nsJSSh.cpp, line 567
Break: at file /home/alex/devel/mozilla-trees/clean/mozilla/extensions/jssh/nsJSSh.cpp, line 567
Welcome to the Mozilla JavaScript Shell!

> print("hello")
Connection closed by foreign host.
[1]+  Segmentation fault      mozilla -jssh

As I said, this was a few weeks ago and the need is no longer that urgent but if you've gotten this to work and have documented your setup somewhere online, I'd love a pointer.

Having said that, I am aware of the disclaimers about JSSh depending on unfrozen Mozilla APIs which might change from one version to another ("WARNING: As JSSh uses unfrozen Mozilla APIs there is quite a big chance that these XPIs will not work in a particular Mozilla release."). What I'm basically looking for is rumors of which versions of which have been proven to work...

Apparently people really don't talk the same language...