3

Files app in Ubuntu 16.04 has a Download bookmark with a download icon beside it. The bookmark points to $HOME/Downloads.

I wanted to change where it pointed to, but discovered that it's not a bookmark listed under the Menu item, Bookmarks. Instead, it seems to be one of the "special" bookmarks, like Recent, and Desktop.

How can I change where the Downloads "bookmark" points to?

flymike
  • 287
  • 3
  • 13

2 Answers2

2

I'm sure there is a proper, clean way to do this by changing the default location of the Downloads directory. The proper, clean way to do this is given by Mook765 below. I suggest you use that.


A simple approach would be to just make $HOME/Downloads into a symlink pointing to wherever you want to keep it. For example, if you want it to point to $HOME/foo, you could do:

mv ~/Downloads ~/foo  ## rename the existing dir
ln -s ~/foo ~/Downloads ## create the link

Now, when you click on the Downloads bookmark, it will actually be going to $HOME/foo.

terdon
  • 98,183
  • 15
  • 197
  • 293
  • Your method works and is better if you use a file-manager which doesn't support bookmarks (like Thunar in Xubuntu), I use your method too. – mook765 May 09 '17 at 16:05
  • @mook oh, that's odd since this isn't about the bookmarks but about whether the XDG standard is used. Anyway, if yours works it's cleaner, but hey, we have both so all's well :) – terdon May 09 '17 at 16:08
  • What I mean: I replace the standard folders in my home-directory with links to folders on a different partition. When I open Thunar, all the links are immediately displayed and i don't need to browse to the real location of the folders, in this case your method is really more convenient. – mook765 May 09 '17 at 16:22
1

You can define the default user-directories in the file /home/<username>/.config/user-dirs.dirs.

# 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"

Just browse to the file in your file manager, open it with a double-click, and change the line you are interested in. Save the file. The changes will take effect after your next login.

Make sure that the destination-folder you specify exists!

You can also use the terminal-command

xdg-user-dirs-update --set DOWNLOAD $HOME/yyy   or
xdg-user-dirs-update --set DOWNLOAD /yyy

to achieve this.

mook765
  • 14,911
  • 5
  • 35
  • 67