Ubuntu 14.04: Add links to places in menu
I would like to add custom links to the places window on the top of the left pane in every nautilus window. I found solutions that suggest to just drag and drop it over the left pane, but that does not work with my Ubuntu 14.04.
Does anybody know how it works here?
Sorry for bringing up an old question, but the accepted answer explains how to add items to Bookmarks, not Places. Sadly, you can't add to the Places list.
The items in Places are defined in .config/user-dirs.dirs
. Mine looks like this:
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"
You can freely add more directories but they are not listed in Nautilus. You can change the folders to point to different directories or you can set them to "$HOME/" to remove them (see man xdg-user-dirs-update
) but you are not able to add to them. That's because the xdg tools (eg xdg-user-dir
) have a fixed list of "Places" directories that can be set. You can see this list with man xdg-user-dir
:
This command expects the name of an XDG user dir as argument. The
possible names are:
DESKTOP
DOWNLOAD
TEMPLATES
PUBLICSHARE
DOCUMENTS
MUSIC
PICTURES
VIDEOS
Sorry, but you are not able to add new entries to the Places menu and have it recognized by the xdg-* tools. Bookmarks are changeable. Depending on the version and flavor of Linux you can find a menu item to add/edit bookmarks, press Ctrl-D, or press on a gear symbol to add a location as a bookmark. Your bookmarks are stored in .config/gtk-3.0/bookmarks
. It appears that duplicate entries (ones in both Bookmarks and Places) only show up in Places, at least in Nautilus.
There are a number of ways to add a link to places. It's called bookmark. While in the directory that you want added click on the bookmark menu and mark it as a book mark.
you can add your own item by modify the user-dirs.dirs file just create a folder in home directory then add your location to the file like following
cd .config
sudo nano user-dirs.dirs
i add programs to the list
XDG_DOCUMENTS_DIR="$HOME/programs"
you can change the icon by mofdi the XDG_{icon name}_DIR
then just reopen the file manager and that's it
my final file is
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"
XDG_DOCUMENTS_DIR="$HOME/programs"