After applying changes to my default paths, which are on another drive, and a power cycle, the locations to all those custom paths have defaulted to /home/username/
I never want those paths to default automatically. but maybe itâs ok if I inserted a delay before the desktop environment paths are created. I have the drives automount at login, but I am afraid that isnât fast enough. Either that or my paths arenât persisting due to setting them without being a sudoer.
The folders is read by xdg and is stored in ~/.config/user-dirs.dirs - so editing that file will override what is set for the locale.
â ~ cat .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"
My personal approach is to convert the folders in $HOME to symlinks e.g.
I wonder though, if the âLocations â System Settingsâ routine is supposed to be for creating any location you want for Desktop, Documents, Downloads, Videos, Pictures and Music, then why doesnât it retain the data I type into those fields and apply them? I read the link and I didnât see an explanation. I think whatâs happening is that the drives are being mounted after the custom directories are being read, and if so then I see it as unexpected behavior unless that is on some to-do list to put those actions in the right order: 1) mount drives 2) check for the existence specified folder locations otherwise default them.
Whatâs your theory on the issue from the perspective of expected behavior of the âlocations system servicesâ paths dialog? Can I still use the beautiful âlocations â system settingsâ dialog window if I zero the sdg-user-dirs-update bool? If this is âjust the way Manjaro isâ then perhaps there can be a note that says you canât use custom paths that are on another drive than the system one, which does seem weird.
I think âmount drives at loginâ isnât soon enough. I suspect that the directories are already made before login has happened. What needs to happen is that drives need to be mounted before KDE is spawned for KDE to find the folders in other drives. Thatâs at least my theory.
but maybe itâs a security issue. if so, then there needs to be a delay after login and drive auto-mounts, and then run the bit of code that checks if paths exist after a few hundred milliseconds has elapsed.
Persistent mountpoints - I assume this is what you have created - and is what you need - are mounted before login.
The xdg user-dir service is run as a the user logging in - which in turn will create the folders using the locale defined in ~/.config/user-dirs.locale so you are barking up the wrong tree.
I am not a KDE user but within KDE I think the location defined in system settings is created for the exact purpose you are intending - but I have no knowledge of how KDE works - I only know that they stray a lot in their quest to make everything super customizable and that includes adding non-system locales.
I think the real issue may be the locations is pointing to a device which is not made available using either fstab or a mount unit.
If your location setting is pointing to a mount in /run/media/$USER tree you should know this is a volatile structure which is recreated on user login and then your targets does not exist which will lead to the folders to being recreated by the xdg user-dir service.
As that answered your primary question, Iâve marked this answer as the solution to your question as it is by far the best answer youâll get.
However, if you disagree with my choice, please feel free to take any other answer as the solution to your question or even remove the solution altogether: You are in control! (If you disagree with my choice, just send me a personal message and explain why I shouldnât have done this or or if you agree)
P.S. In the future, please donât forget to come back to your question after your issue has been solved and click the 3 dots below the answer to mark a solution like this below the answer that helped you most:
so that the next person that has the exact same problem you just had will benefit from your post as well as your question will now be in the âsolvedâ status.
Hi, thanks for your service. If youâd like to interpret it that way then thatâs fine, since this issue is open to interpretation and personal preference (like setting up an automount in fstab vs the more volatile âat loginâ automount method). I donât have a preference myself since I am still establishing a periphery of understanding the Manjaro distribution as well as Arch, and of course, the intricacies of the Linux Way.
Iâve emailed part of the KDE team about it so at least the documentation for that particular KDE Locations module I mentioned could be updated, since it was out of date.