./run-mozilla.sh ./xpcshell
xpcshell is almost always in the same directory as run-mozilla.sh.
$ locate run-mozilla.sh /usr/lib/firefox-0.10.1/run-mozilla.sh /usr/lib/thunderbird-0.9/run-mozilla.sh /usr/local/mozilla/run-mozilla.sh /opt/mozilla/run-mozilla.sh /root/.Trash/mozilla/run-mozilla.sh
Just pick one, cd over there, and run-mozilla.sh xpcshell:
$ cd /opt/mozilla $ ./run-mozilla.sh ./xpcshell js>
You can input JavaScript?, straight to Mozilla..!
js> 5+7
12
js> print("Hello, world!")
Hello, world!
js> Pretty much all Mozilla programs use components; Read UsingComponents to get started with that.