How to set the origin of our default folders

When I had a computer at home, so that the rest of the family could use it, I added several users. At that time I used the system in English, but the others in Spanish.

The fact is that, as I installed in Spanish by default, when I enter my session in English for the first time, the system tries to change the name of the folders Desk, Documents..etc to its English version Desktop, Documents…etc. I said yes, to do it, but for some reason I did not take some of them as by default.

For those who have not yet understood. Usually we have by default the folders Desktop, Downloads, Documents, Music, Images, Templates, Public y Videos.

When we download something from a file, by default that should go to the folder Downloads, because it is the designated folder for this. When I did the language change, the folder changed its name to Downloads, but did not set it as the default for my downloaded files. The strange thing is that they weren't all ... So how do I solve it?

Simple, we open a terminal and with our favorite text editor we put:

$ vim /home/tu_usuario/.config/user-dirs.dirs

Or what is the same:

$ vim ~/.config/user-dirs.dirs

and we should get something 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/"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/"
XDG_MUSIC_DIR="$HOME/"
XDG_PICTURES_DIR="$HOME/"
XDG_VIDEOS_DIR="$HOME/Videos"

What you see is how I had that file. By default it should be as I show below:

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

So, if we want, for example, our folder Downloads default is not Downloads and either MyDownloads, we look for this line:

XDG_DOWNLOAD_DIR="$HOME/Downloads"

and we put it like this

XDG_DOWNLOAD_DIR="$HOME/MisDescargas"

As is logical, we have to have the folder created MyDownloads.

Done.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   left handed said

    In KDE it can be done directly from System Settings if I remember correctly, in Ubuntu you can use an Ubuntu Tweak option, but it will always be faster to directly modify the file

  2.   Hugo said

    Good post, thanks.

    1.    elav said

      You're welcome 😛

  3.   Blazek said

    To indicate the default names for all the users that are created on your system, you must modify the /etc/xdg/user-dirs.default file and change the names of the folders in the file, you can even comment "#" those that are not. you want them to appear. Then you run xdg-user-dirs-update without sudo !! and it generates your personal file in your home folder.

  4.   Let's use Linux said

    Friends: a piece of information that can be useful, especially for those who use Arch and its derivatives, is that for that file that you mention to exist, the xdg-user-dirs package must be installed.

    To install it, you just need to run:

    pacman -S xdg-user-dirs

    Cheers! Paul.

    1.    elav said

      Thanks for the information Pablo ^^

    2.    roberttt said

      Thank you! Very useful.

  5.   Carlos-Xfce said

    Thanks, Elav. This data is very useful for those of us who like languages ​​and install the operating system in a different one.

  6.   Miguel said

    And how would it be done if, for example, the folder that I want to default, is in another partition and this partition is not self-mounted at startup, let it be a backup.
    What I'm going to is that I have a partition and a backup HD, where I have my music, video and photo downloads. And I want to make these folders accessible to my wife and daughter, but in a simple way.