I broke the "Location" setting for Documents, Music, etc, is it possible to fix it?

Hi, I’m new to Plasma, so I wasn’t aware that the “location” of Documents, Music, Pictures, Videos, etc directories can be changed, “redirected”, Windows style, using the Locations setting. I found it much later.

I have already replaced these folders with links to the corresponding folders inside /Nextcloud directory. And yeah, then I found the Locations settings, duh :slight_smile: So, I deleted the links and recreated the directories, reset Locations to defaults, then I tried to change the locations but it’s not working. I guess, the mechanism is broken. Is there a way to fix this so I can use the Locations setting to “redirect” these folders to those inside Nextcloud? Thanks!

If not, then it’s no big deal, this is a testing/learning machine and I’ll likely break many things and reinstall Fedora a bunch times before I know what’s what :slight_smile:

You didn’t explained how you “tried to change the locations”.
Try Settings> Session> Locations
(May differ, translated from French).

Yes, Settings> Session> Locations

It does not take effect if I change the location now, I guess I broke it by replacing the default directories with links in the first place. I clicked the Defaults button but it made no difference.

OK, so I created another user, logged in and changed the locations of Music and Picture folders and it doesn’t work. So, either this feature is broken or I don’t understand what it’s supposed to be doing :confused:

These paths are stored into ~/.config/user-dirs.dirs
Could you open it and verify the content?

So yes, the paths are there, but if I open any of those folders they’re just empty folders, they don’t show the actual content of the folders in ~/inCloud/*. I rebooted several times.

XDG_DESKTOP_DIR=“$HOME/Desktop”
XDG_DOCUMENTS_DIR=“$HOME/inCloud/Documents”
XDG_DOWNLOAD_DIR=“$HOME/Downloads”
XDG_MUSIC_DIR=“$HOME/inCloud/Music”
XDG_PICTURES_DIR=“$HOME/inCloud/Pictures”
XDG_PUBLICSHARE_DIR=“$HOME/Public”
XDG_TEMPLATES_DIR=“$HOME/Templates”
XDG_VIDEOS_DIR=“$HOME/inCloud/Videos”

Are you sure you deleted your symlinks?
So, when you are inside ~/inCloud/Music (for instance) there are files, but when you click on Location Music, it is empty? In this case, click on the address area in Dolphin, right click and click Modify to show the whole path.

Thanks for trying to help :slight_smile:

“Are you sure you deleted your symlinks?”

Yes, ~/Music, ~/Pictures, etc., are definitely folders, not links.

“So, when you are inside ~/inCloud/Music (for instance) there are files, but when you click on Location Music, it is empty?”

Yes, exactly.

“In this case, click on the address area in Dolphin, right click and click Modify to show the whole path.”

I configured Dolphin to always show the whole path.

/home/adam/inCloud/Music/ – has all my music in it

But when I double click on ~/Music or ~/Pictures then the path is still:

/home/adam/Music
/home/adam/Pictures

Could you add the Locations Panel in Dolphin (F9) and click on Music in the panel?

Oh, the location/places sidebar was there, I just didn’t include it in the screenshot. Same result, if I click on Music in the locations sidebar. This can be fixed though by removing the default Music and drag ~/inCloud/Music to the sidebar. I’m gonna install Fedora in a VM later so I’ll be able to check if it works right after a fresh install.

So it seems we’re wasting our time here. This feature appears to be broken. I’ve installed Fedora 41 (Plasma 6.2.1) and Kubuntu 24.10 (Plasma 6.1.5) in VMs and it does NOT work in either one.

Case closed, I guess.

Hi - I think walking through a bit of what the “Locations” function does might help here. That’s based on the underlying XDG user directories specs: XDG user directories - ArchWiki

The settings in ~/.config/user-dirs.dirs don’t change the structure of your filesystem - they won’t move files, move folders, create symlinks, or anything like that. The settings in that file basically just tell applications that ask the question “where does this user keep their Music/Downloads/Pictures/etc.?” which folders to look in.

On the other hand, the Places in the Dolphin panel that are setup by default point at filesystem directories, not XDG user directory assigned “locations” - so if you want a different filesystem directory to be accessed when you click “Music” in Dolphin, you’d need to specifically add the new one to “Places”.

If you want to put your Music in the folder ~/inCloud/Music, then you can go ahead and place it there, and set your Locations to point to that folder. Applications that respect the XDG user directory guidelines and are looking for music will then look in ~/inCloud/Music. Note that your ~/Music folder will still exist - it’s just not where applications “should” look anymore, but you are free to still leave it in place if you wish.

(One example of that - notice that the Places link there in Dolphin to ~/Music no longer has the special folder icon. If you add your newly designated Music folder, inside that inCloud folder to Places, you should see that it now has the special Music icon)

Hope that helps a bit,

Thank you. So I was mistaken to assume that this would work like Windows folder redirection, so when I open ~/Music it will get me to ~/inCloud/Music. But this is the first time I encountered something like this in Linux so I didn’t know what to expect, normally I’d just replace Documents, Pictures, Music, etc., with symlinks to the corresponding folders in the Nextloud sync folder.

So, as I understand, this setting is only to point applications to my default folders, not to actually redirect the ~/Music to some other location as probably there is no such mechanism in Linux other than symlinks.

This is fine as long as I know what it’s supposed to be doing. Thanks again, much appreciate your detailed explanation.

A mount point works fine for doing it.

root@9600k:~# grep -i Music /etc/fstab
# /Music is on /dev/nvme0n1p4 9600k machine
UUID=5a6278cb-79eb-424b-a6d5-c85add3e641a /home/zeus/Music          ext4    defaults        0		2
root@9600k:~# mount |grep -i Music 
/dev/nvme0n1p4 on /home/zeus/Music type ext4 (rw,relatime)

Works flawlessly for keeping that massive amount of data out of my home partition.

Yes, I was thinking about using separate disks for Nextcloud/storage and for boot/system/home and using mountpoints inside my home dir but I’d have to rethink my data storage habits and I’m not sure if it’s worth it. I’m used to having all my stuff on the same disk. Having data on a separate volume does have few other advantages though. Thank you!

PS. The way I understand this you can only have mountpoints to entire local volumes though or NFS shares, so that wouldn’t make it practical to have multiple volumes for Documents, Pictures, Music, etc.

Also, I became aware of another Plasma annoyance: links in Dolphin are shown in italics and it can’t be changed :frowning: