Linux

How to manage bookmarks in Nautilus

There are a number of ways you can work with bookmarks in the Nautilus file manager, and Jack Wallen shows you them all.

 

Nautilus file manager
 

The Nautilus file manager is just one of the many file managers available for the Linux desktop. Although it may not be the most powerful or flexible, it is the default tool for Ubuntu Unity and GNOME 3. 

Out of the box, Nautilus has enough features to make it highly usable and user-friendly. One of those features is the included bookmarks system. Just like bookmarks in your web browser, you can save locations within Nautilus that enable you to quickly get to your most-used locations on your file hierarchy. There are a number of ways you can work with bookmarks, and I'm going to show you them all.

You can bookmark the following:

  • Local directories
  • Directories on connected external drives
  • Network drives via SMB

The bookmarking process can be done through both the Nautilus GUI or by editing the flat-text configuration file. I'll illustrate how this is done via the config file first, then we'll move onto the GUI.

The configuration file for the Nautilus bookmarking system is ~/.config/gtk-3/bookmarks. Open that file in your favorite text editor, and you'll see the structure looks like:

file:///home/jlwallen/Documents

file:///home/jlwallen/Music

file:///home/jlwallen/Pictures

file:///home/jlwallen/Videos

file:///home/jlwallen/Downloads

The format of the configuration line should be easy to figure out. For SMB shares, the structure looks like:

smb://IP_ADDRESS/SHARE_NAME SHARE_BOOKMARK_NAME

Where:

  • IP_ADDRESS is the IP address location of the SMB share
  • SHARE_NAME is the name of the share
  • SHARE_BOOKMARK_NAME is the human-readable name for the bookmarking

You can add as many bookmarks as you like within this configuration file. As soon as you save that file, the bookmarks will automatically appear in the bottom left pane of the Nautilus file manager (Figure A).

Figure A

 

Figure A
 

Bookmarks appear in the bottom left pane of Nautilus.

Now that we've brought the GUI into the picture, let's see how bookmarks are handled there. There are a couple of ways you can add bookmarks to Nautilus. The first is with a keyboard shortcut. Here's how:

  1. Navigate to the location you want to bookmark
  2. Press the [Ctrl]+[D] key combination
  3. Check the lower left pane to make sure the bookmark appears

That's it.

You can also use the GUI like so:

  1. Navigate to the location you want to bookmark
  2. Click on the gear icon in the upper right corner
  3. Select Bookmark This Location
  4. Check the lower left pane to make sure the bookmark appears

Moving bookmarks

Let's say the location of a bookmark has changed or you just want to re-order the bookmarks as displayed in Nautilus. To manage this, open up Nautilus and then click File | Bookmarks. From within this new window (Figure B), you can rename bookmarks, re-locate bookmarks, and re-order the bookmarks as they appear in the bottom left pane of the file manager.

Figure B

 

Figure B
 

The Nautilus Bookmarks window is where you can manage current bookmarks.

Renaming a bookmark only changes the human-readable name that appears in the file manager. To do this, select one of your bookmarks from the Bookmarks window and then change the Name field to reflect exactly what you want it to be. There is no need to “save,” because the changes are automatic.

From that same window, you can re-order the bookmarks as they are seen in Nautilus. This is done by simply selecting the bookmark (in the Bookmarks window) and then clicking either the up or down arrow (depending upon how you want the bookmark to move) until the bookmark is in the correct location. Again, no saving is necessary.

Finally, you can re-locate a bookmark in this window. If you've moved your Documents folder from ~/Documents to /media/DATA/Documents and you want the bookmark to reflect this, just open the Bookmarks window, select that particular bookmark, and change the path (no saving necessary).

One hiccup

I've come across instances where all bookmarks disappear from Nautilus. I can't explain why this happens, but when it does, there's a a simple trick to get them back.

  1. Open up Nautilus
  2. Create a new bookmark
  3. Watch your bookmarks re-appear
  4. Go back into the Bookmark window and remove the newly created bookmark (unless you want to keep it)

That should do it.

I'm a big fan of using anything to save me time. The Nautilus bookmarks feature is one such time-saving tool. Once you get used to using them, you'll wonder how you ever worked with a file manager that didn't have bookmarks. 

What file manager do you prefer? Share your opinion in the discussion thread below.

 

 

About

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.

4 comments
Shai Gluskin
Shai Gluskin

This is a great article, thanks.


Is there a way to add directories to bookmarks? I'd like to add all my client servers but don't want the list to be so long in the side bar. Having a folder named "Client servers" would allow me to hide them.


A bit of background on my use-case: I'm a Mac OSX refugee and a big fan of Panic's Transmit application. Filezilla is just awful. in my opinion.

What I especially like about Nautilus is the total support it has for SSH keys. It took some digging to figure out how to do it, but as long as you append "<username>@" in front of the server name, nautilus will access your installed SSH key for access to the server: For example:


sftp://username@myserver.com:<ssh port number>


In short, Nautilus is serving for me as a fine Transmit replacement... if I could only add folders to the bookmarks in the sidebar.


Thanks for the great tutorial.

LorinRicker
LorinRicker

Oh, almost forgot -- Also note that, if/when you want to reorder your bookmarks, you can just drag-&-drop one of them into a new position in its list (watch for the horizontal "target" line as you grab and move it). This part of the Bookmarks GUI seems to work pretty reliably, and drag-&-drop saves you a trip through your text editor just to change ordering...

LorinRicker
LorinRicker

Unless there's inconsistency among distros (wouldn't surprise me, what with Gnome's penchant for inconsistency in exposing/hiding config-files, etc.), the correct location of the Nautilus config file is ~/.config/gtk-3.0/bookmarks (not "~/.config/gtk-3/bookmarks" ... typo?).


And, when you open this file in your text editor, you should see lines like:


  file:///home/jlwallen/Documents Documents  (...etc)


where the second element of the bookmark entry is the display-name (as it appears in the left panel), and which is initially derived from the folder/location's name -- but you could change it (in your editor), for example:


file:///home/jlwallen/Documents Important Docs here


Nautilus picks up editing changes like this as soon as and each time you save the file.


Finally, I note that, although the Nautilus Bookmarks GUI works okay for simple things (like renaming the bookmark), I have had it balk on me for other actions such as deleting a bookmark.


Of course, directly editing the config file solves all such issues -- however, do note that Nautilus's config file is just one more contribution to the gazillion-and-seven Gnome-related things that you could (should?) stash into a personal backup directory for restoration after a full Linux (re)install, should you want things back the way they were before the install. Ah, but one could write volumes about the pitfalls and challenges of restoring your account's personalizations after any Linux distro's reinstall... ;-)


Thanks, Jack -- good article!

Editor's Picks