ComputersLinux

Creating custom Files and Folder view in Ubuntu Netbook Remix (UNR) using Nautilus bookmarks for Gnome Users

This info may be useful to anyone running Ubuntu Netbook Remix, to anyone running the normal Ubuntu Linux distributions or in fact any Gnome based Linux distributions.

The reason for this is that all of these use the Nautilus bookmark file in one shape or another. If running Nautilus (the default file-manager for Gnome, Ubuntu and UNR) then this will allow you to customise the bookmarks lists (top level menu option).

This is also the same bookmarks menu used in Ubuntu from the top menu bar Places -> Bookmarks.

The place that is more important for me is that this is used in the Files and Folders menu on the backdrop to Ubuntu Netbook Remix (UNR).

Ubuntu Netbook Remix UNR Files and Folders

If that’s not enough it’s also used to provide shortcuts when opening and saving files using Gnome applications. All in all this is one really useful list.

You can easily add to the list through Nautilus using Bookmarks -> Add Bookmarks, and you can make minor changes using Bookmarks -> Edit Bookmarks, but that just allows you to change the name and edit the location details. What I wanted to do was to re-order the bookmarks to do that I needed to roll-up my sleeves, delve under the hood and edit the user bookmarks file.

The file is a simple format text file located in ~/.gtk-bookmarks (the ~ signifies it’s in your home folder – ie. /home/username and the . at the beginning of the filename means it’s normally hidden). This can be edited in your favourite text editor (eg. gedit in the Accessories menu).

The format of the file is one line per bookmark with the location followed by a space and then the name of the bookmark.

Note that the locations can be files on the local computer (prefixed file://), remote Samba/Windows shares mounted (prefixed using smb://), ftp locations (prefixed ftp://). You could also add other locations (such as http:// – but that’s probably best left to your web browser), but these are the most common. The best way to work out the location string is to add a few bookmarks using Nautilus and then edit the resulting file. Here are a few examples:


file:///home/stewart stewart
smb://linuxserver1/stewart stewart @ linuxserver1
ftp://upload.penguintutor.com/ PenguinTutor (Upload)

These relate to my home folder on the local computer, my home share on my liuxserver1 computer (running samba) and an ftp upload location on the penuintutor.com webserver.

After editing and saving the next time you view the bookmarks or the files and folders page then the list should be refreshed and re-ordered.