Please support VectorLinux!

Author Topic: HOWTO remote control Seamonkey and other spawn of moz  (Read 2644 times)

Triarius Fidelis

  • Vecteloper
  • Vectorian
  • ****
  • Posts: 2399
  • Domine, exaudi vocem meam
    • my website
HOWTO remote control Seamonkey and other spawn of moz
« on: September 15, 2006, 07:19:16 pm »
http://www.mozilla.org/unix/remote.html

the functionality described in the above webpage applies to any moz-based browser, afaik, and is more or less self-explanatory. but for demonstration:

#!/bin/sh

SEAMONKEY_PATH=/opt/seamonkey/bin/seamonkey

if $SEAMONKEY_PATH -remote 'ping()' &> /dev/null; then
  exec $SEAMONKEY_PATH -remote "openURL($1,new-tab)"
else
  exec $SEAMONKEY_PATH $1
fi


This example script checks if an instance of Seamonkey is running with the remote ping() function. If so, it opens a new tab in this running process with openURL(someURL,new-tab). Otherwise, it initiates a completely new Seamonkey process with the given URL as its one and only tab

(Note that the argument referenced by $1 must be a proper URL; that is, file:///home/hanumizzle and http://www.vectorlinux.com are both halal, but plain /home/hanumizzle isn't)
"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months