Is it safe to rename special user folders?
Solution 1
According to the Filesystem Hierarchy Standard in regard to /home
directory, you can read:
/home
is a fairly standard concept, but it is clearly a site-specific filesystem. The setup will differ from host to host. Therefore, no program should rely on this location.
Therefore an application that needs /home
or even subfolders like /home/user/Music
to run needs to be considered to have a bug.
Nevertheless, there may be applications that look up standard directories as defined by xdg-user-dirs
, as BTW does your system when you change locale.
It may most likely be safe to simply rename standard folders in your home, but it is a much better idea to notify xdg-user-dirs
the way lukasz already pointed out to avoid unwanted side effects from applications that rely on existing standard paths.
Solution 2
You can rename the folders in the file $HOME/.config/user-dirs.dirs
. Here's the default:
# 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"
Solution 3
I'm currently using Ubuntu 11.10 in German. I noticed, that the Desktop folder's name is "Arbeitsfläche". Unfortunately I am used to "cd Desktop" instead of "cd Arbeitsfläche". Is it possible to rename my Arbeitsfläche to Desktop without breaking my system? source
Create A Symbolic Link
You could either do a simple trick which would be to create a symbolic link to Arbeitsfläche
. This is guaranteed to work!
cd ~; ln -s Arbeitsfläche Desktop
Modify the naming
The naming of these special folders can be specified by a set of variables. You would need to open the file ~/.config/user-dirs.dirs
for editing and change the following line:
XDG_DESKTOP_DIR="$HOME/Arbeitsfläche"
to
XDG_DESKTOP_DIR="$HOME/Desktop"
Then you would need to create the appropriate directory and move your data from the old one to the new one. A log-in and log-out should be enough. Hopefully ;)
But with this solution, it is not impossible that some weirdly developed applications gets confused. Whereas with a symbolic link, this will always work!
Solution 4
I'm currently using Ubuntu 11.10 in German. I noticed, that the Desktop folder's name is "Arbeitsfläche". Unfortunately I am used to "cd Desktop" instead of "cd Arbeitsfläche". Is it possible to rename my Arbeitsfläche to Desktop without breaking my system? source
You can, see here.
You can just make a symbolic link.
ln -s ~/Arbeitsfläche ~/Desktop
Related videos on Youtube
htorque
Updated on September 17, 2022Comments
-
htorque over 1 year
I'd like to know if it's safe to rename user folders such as
Desktop
,Documents
,Music
(I want them to start lowercase).Are there any programs in a default installation of Ubuntu (10.10/11.04) that expect those folders to exist and that cannot be configured to use different ones?
-
Wauzl about 12 yearsYes, I kindof asked the same thing, just more specifically. But lorenzo-s's idea with the link is what I was looking for.
-
-
lukasz over 13 years@htorque, You're right, the file name is user-dir.dirs, sorry for a mistake
-
htorque over 13 yearsSo basically a program either follows the XDG specs or it's worth a bug report. Sounds good to me - accepting, as the FHS quote seems important when answering this question (and lukasz already got 10 upvotes). ;-)
-
Peter.O over 13 yearsYou've got my +1, because of (hard-coded /home/* names "...need to be considered to have a bug.. It doesn't mean that it's an "all-clear", but more like an evolution.. It seems that Nautilus is using it .. but who is not ..:)
-
Peter.O over 13 years@htouque ... I think you'll find that the "worth a bug-report" applies to anyone using a hard-coded /home ... and is not related to the XDG specs which would themselves break this "rule" if they hardcoded /home
-
Wauzl about 12 yearsThe link solution is easy and will definetly not break my system. I made a symbolic link and after hid the Desktop link by putting "Desktop" in ~/.hidden. Now I can cd to Desktop and also see the fancy "Arbeitsfläche". Thanks ;)
-
lorenzo-s about 12 yearsTell me a little bit more about the
~/.hidden
folder. How can you~$ cd Desktop
if the folder is not in the home directory? -
Rinzwind about 12 years~/.hidden is a file. If you include something in there Nautilus acts like that file or dir is hidden.
-
lorenzo-s about 12 years@Rinzwind Thank you! Never heard about it. Unfortunately I'm a Xubuntu user, Thunar does not seems to implement this feature at the moment.