How to change your user folder locations with Cinnamon or Gnome 3
-
Before I switched to Korora 25 for my desktop OS, I used Windows 10 like most of you.
To make my personal documents always available I had right clicked on the documents folder and changed the location of it to be inside my OneDrive.
Now that I am on Korora 25 with the Cinnamon desktop experience, I wanted to do that same thing using Nextcloud.
I knew right away that I could simply change all the folders to Symlinks that pointed to the new location, but that is messy IMO. When you do this in Windows, the folder is moved completely.
So I did a little search and asking and found what I feel is the better answer.
If you have a Gnome 3 based Desktop Experience installed (Cinnamon is one) then you will have a file in your hidden config folder of your home directory.By defualt your user folders are in
/home/username
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"
I copied everything to the Nextcloud sync'd folder then edited the
~/.config/user-dirs.dirs
file appropriately and rebooted.XDG_DESKTOP_DIR="$HOME/Nextcloud/Desktop" XDG_DOWNLOAD_DIR="$HOME/Nextcloud/Downloads" XDG_TEMPLATES_DIR="$HOME/Nextcloud/Templates" XDG_PUBLICSHARE_DIR="$HOME/Nextcloud/Public" XDG_DOCUMENTS_DIR="$HOME/Nextcloud/Documents" XDG_MUSIC_DIR="$HOME/Nextcloud/Music" XDG_PICTURES_DIR="$HOME/Nextcloud/Pictures" XDG_VIDEOS_DIR="$HOME/Nextcloud/Videos"
-
Having a few issues related to applications that I had already setup to use specific folders. Had this been done right after install I suspect no issues would have occurred.
-
Honestly this seems more messy than symlinking imho
-
@matteo-nunziati said in How to change your user folder locations with Cinnamon or Gnome 3:
Honestly this seems more messy than symlinking imho
Just different opinions on what is messy. Both are perfectly valid methods.
-
@JaredBusch yes both work according to a standard in linux. I usually prefer symlinks because they are more transparent: it is a fs level thing not an app thing.
-
More clear: xdg is a desktop standard. Any cmd line app will not mind about it. sym Links fix this.
-
As someone upvoted this post recently, I thought I would circle back. I am using simlinks in all my Fedora systems now.
This just never worked exactly as advertised. It mostly worked, but never completely.
-
@jaredbusch said in How to change your user folder locations with Cinnamon or Gnome 3:
As someone upvoted this post recently, I thought I would circle back. I am using simlinks in all my Fedora systems now.
This just never worked exactly as advertised. It mostly worked, but never completely.
I also use symbolic link with Linux and Windows too. For Windows, it keeps me from messing with the default user shell folders / shell folders path or the need to move the locations. And with Linux, I don't have to mess with the user-dirs.dirs file.