The addon you mention hasn't been updated for a while, but it is possible to run it in
Firefox 17 using the hack I mention below, which I have used for other addons.
However, be very careful when using it to copy, paste, and run commands, as some forums other than this one have malicious code. However, it may be very useful for a good site like askubuntu.
Note: This method below merely edits the install file so it can be installed in the latest
firefox, as xpi files are basically like zip archives, which can be manipulated.
The developer did not test it with Firefox 17, so it is unsupported, but it does seem to work. However, it will not be updated again and will receive no updates or fixes, so you must only use it on trusted sites like askubuntu.
How to edit the xpi and install it
(After writing this article myself, I noticed that a similar method for another addon was also used in this question, so the basics of the trick documented below is well known and usually works fine.)
Download the xpi file from gnome's archive:
unzip -d terminalrun terminalrun-0.6-fx-linux.xpi
Now, just edit the
Firefox version numbers in
install.rdf so they look like this- choose any version of
Firefox from 17 onwards to put in the MaxVersion (I chose an arbitrary number like 23.0, but you can choose a much higher one, up to 99.0.)
After saving the file, but while still in the terminalrun folder, run
zip -r terminalrun *
mv terminalrun.zip terminalrun.xpi
Now just drag the xpi file into
Firefox and it will install it; restart
firefox and you will be able to highlight code with your mouse and right click to open in terminal.
Usually when you highlight code it works fine (as long as the command you highlight makes sense for your system), so please test this one that gives you system information:
firefox context menu that you should see: