Chapter 12. Managing bookmarks in GNOME

In GNOME, you can edit the bookmarks that are displayed in applications and dialogs that manage files.

12.1. Bookmarks in GNOME

Bookmarks integrate into GTK+ and in the GNOME desktop. Every application that presents a standard GTK+ Open and Save dialog (GtkFileChooser) lists bookmarks in the left panel of the dialog. Also, Files and its clones present bookmarks in a sidebar.

Besides bookmarks, GtkFileChooser lists all other available GVFS volumes and mounts in the sidebar.

While activating a bookmark for the first time, the GVFS subsystem looks for existing mounts and tries to mount the location if the mount does not exist yet. This way, you can authenticate even within the Open or Save dialog.

Bookmarks are located in the ~/.config/gtk-3.0/bookmarks file. In the following example, the bookmarked locations are ~/Music, ~/Pictures, ~/Videos, ~/Downloads, and ~/bin, so the content of the ~/.config/gtk-3.0/bookmarks file looks as follows:

file:///home/username/Music
file:///home/username/Pictures
file:///home/username/Videos
file:///home/username/Downloads
file:///home/username/bin
Note

Replace username with the user name you are logged in.

You can use this file to edit bookmarks based on your requirements.

12.2. Adding a bookmark in Files

You can save a reference to a location by bookmarking it.

Procedure

  1. Select the folder or file you want to bookmark.
  2. Do one of the following:

    • Press Ctrl+D or
    • Drag and drop the file or folder to the sidebar.

12.3. Bookmarks for all GNOME users

System administrators can set a group of bookmarks for all users at once by allowing access to file shares for the users. GNOME stores a list of file-sharing servers in the ~/.config/gtk-3.0/servers file in the XBEL format. XML Bookmark Exchange Language (XBEL) is an XML standard that allows you share URIs (Uniform Resource Identifiers). It is possible to add the list of file-sharing servers to that file to make file-shares easily accessible to multiple users.

In GNOME, XBEL is used to share desktop bookmarks in applications like Files. Here is an example of creating a bookmark titled GNOME FTP with the URI ftp://ftp.gnome.org/ in the ~/.config/gtk-3.0/servers file.

<?xml version="1.0" encoding="UTF-8"?>
<xbel version="1.0"
      xmlns:bookmark="http://www.freedesktop.org/standards/desktop-bookmarks"
      xmlns:mime="http://www.freedesktop.org/standards/shared-mime-info">
   <bookmark href="ftp://ftp.gnome.org/">
      <title>GNOME FTP</title>
   </bookmark>
</xbel>