Dolphin automatically creating the Downloads directory

Hi,
Is there a way to prevent Dolphin to create default Downloads directory after I delete it?
The exact scenario I’m having is that I created the “downloads” directory because I want the first character to be lowercase and I deleted the Downloads dir because I dont need it and yet Dolphin creates on every boot it seems.

Are there any options to configure this behavior?

This is done by xdg-user-dirs I think.

You can try disabling the service with:

systemctl disable --now --user xdg-user-dirs-update

Might need sudo, but I don’t think it does, since it’s a user service.

You can also edit .config/user-dirs.dirs to remove the Downloads folder one.

You probably need to logout/login after making these changes.

2 Likes

The file header reads

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

Or just name/rename it …

XDG_DOWNLOAD_DIR="$HOME/downloads"
1 Like

This did not work. Tried first just editing the config file and then tried with the command , and then both.
The file gets recreated in either case with the XDG_DOWNLOAD_DIR="$HOME/Downloads" line added every time.

It seems this is my only option for now. But i really want to work it my way without renaming it but deleting it from config.

Any ideas?

Sorry - that are probably not going to happen - you will have to disable the xdg app which runs a login because the xdg app/service is the one responsible for creating the folder structure.

I don’t know much of KDE - so I am not able to deduct where it is a service or an autostarted app - running once at login.

I see, it just feels it should be so easy and its locked for customization. I guess I expected too much freedom from Linux environment and KDE.

Uninstall xdg-user-dirs.

The reason it exist is to create common foldernames using localized names - nothing more - it is a convenience.

But as I referred above the file .config/user-dirs.dirs can be modified to suit your specific requirements.

Freedom is whipped expression - it has any many meanings as there is people on earth.

  • Freedom is not about deciding how a given program is coded or it’s functionality.

The freedom you get is

  • Freedom to fork the code and make the changes to suit your preference
  • Freedom is to decide if you need the program or not and be able to remove the program
  • Freedom is to tweak it so suit your preference (edit the mentioned file)
1 Like

home Directories is in plasma settings gui “Personalization - Applications - Locations”

You are totally correct. I feel ashamed now and I come off as a spoiled brat.
I was mislead by being unable to customize the config file however I wanted right on the spot which was unreasonable thing to ask for in the first place, but it is more than enough to rename the automatically created directory or being able to just delete the program or fork it.

I’ll give it a go. Immediate thing I noticed without rebooting is that the user-dirs.dirs file got re-created but now not containing the comment section for example. This could be it. I will report back. (cant believe didnt find this GUI setting in Settings)

No problem :slight_smile:

I did some thinking - and you can actually keep xdg and disable the the xdg-user-dirs-update which is run at user login.

Systemwid
Edit the file /etc/xdg/user-dirs.conf and change the default value for enabled from True to False.

Per User
Copy the file /etc/xdg/user-dirs.conf to ~/config/user-dirs.conf and change the default value for enabled from True to False.

But as @papajoke mention - which I learned something from - you can use Plasma configuration to set your preferred locations.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.