1

For Ubuntu 12.04 using Firefox 21.0, say I have a local .html file, test.html, in my home directory, which I want to add to the bookmarks menu..

  • First I use "Open File" and then choose the file from file selection dialog,
  • Then I press CTRL+D to save the bookmark
  • Then I move to the bookmarks side bar, and right click on the bookmark, and choose "Properties"
  • From the dialog I can see that the location of the file is "file:///home/fcihh/test.html" where "/home/fcihh/" is my home directory.

The problem is that it uses an absolute path to the home directory. My case, is that I have two machines that share the same bookmarks, but the absolute path to the home directory is different for each machine. Therefore, I would like to use a relative path to the file such that the bookmark can be used on either machine..

I have tried replacing "/home/fcihh" with a tilde "~" but that does not work.. (The tilde seems to be removed automatically when I save the change..)

1 Answer 1

1

Here is a workaround: Instead of saving the file as a bookmark, open it in a Firefox tab from the command line using the following bash script:

absp=$(readlink -f $1)
xdg-open file://${absp}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .