Hire a senior Perl / Python programmer today; download my up-to-date resume (PDF)
John Bokma MexIT
freelance Perl programmer

Copy URL+ add-on for Firefox on Ubuntu

Sunday, March 15, 2009 | 0 comments

This blog entry describes how to make the CopyURL+ add-on work with more recent versions of Firefox running on Ubuntu.

Download the cross-platform install (XPI) file of version 1.3.2 of Copy URL+:

wget http://downloads.mozdev.org/copyurlplus/copyurlplus-v1.3.2.xpi

Since the XPI (pronounced "zippy") is just a ZIP file, use unzip to extract the install.rdf from the downloaded file:

unzip copyurlplus-v1.3.2.xpi install.rdf

Next, use your favourite editor to change the 1.6 at line 23 of install.rdf - in my case - by 3.5, for example. Make it at least as high as the current Firefox version you're using. Before:


and after:


Note: if you're unsure of the right location either change all <em:maxVersion> values to the same higher value, or make sure that the value you changes follows the <em:id> with the following value: {ec8030f7-c20a-464f-9b0e-13a3a9e97384}

Save the modified file, and add it back to the XPI file as follows:

zip -f copyurlplus-v1.3.2.xpi install.rdf

The -f option to zip, freshen, adds the updated install.rdf to copyurlplus-v1.3.2.xpi. If the file was changed by you, you will see a message similar to the one below:

freshening: install.rdf (deflated 61%)

Next, drag and drop the XPI file onto the main window of Firefox. A dialog titled "Software Installation" should open. Click the "Install Now" button. A new dialog window, named "Add-ons" should pop up, showing "Copy URL + 1.3.2", followed by the message: "Restart to complete the installation". Click the "Restart Firefox" button.

After Firefox has restarted, the "Add-ons" dialog window should show up again with the following message near the top:

1 new add-on has been installed

You should also see the Copy URL + extension in the list of add-ons. Just close this window.

Now is also a good time to clean up the downloaded file, and the modified file:

rm -i install.rdf install.rdf~ copyurlplus-v1.3.2.xpi

Note that I've used the -i (interactive) option with rm allowing me to think again if I really want to delete each file. The file that has its name end in a tilde (~) is a back up made by the editor, gedit, I used to modify the install.rdf file. Since I don't need it anymore, I delete it as well.

Finally, if you want to use the same or similar customization as I use (see: Copy URL+ extension for Firefox), first find out the directory Firefox has assigned to your profile:

ls -al ~/.mozilla/firefox

If you have only one profile in use, you should see output similar to:

total 16
drwx------ 3 john john 4096 2008-11-14 22:53 .
drwx------ 5 john john 4096 2008-11-25 13:21 ..
drwx------ 7 john john 4096 2009-03-15 17:27 528s8w95.default
-rw-r--r-- 1 john john   94 2008-11-14 22:53 profiles.ini

In my case, 528s8w95.default is my profile directory.

Next, use an editor to extend the user.js file. I used the following command to start the gedit editor and open the aforementioned file:

gedit ~/.mozilla/firefox/528s8w95.default/user.js

Now visit Copy URL+ extension for Firefox and copy the user.js lines given on that page. Next time you start Firefox, the Copy URL+ menu should have 14 entries: the default one, and the 13 defined in user.js.


Copy URL+ Related

Also today

Please post a comment | read 0 comments | RSS feed