3

I am using Ubuntu 22.04. After one update, the file ~/.config/user-dirs.dirs has changed the lines

XDG_DESKTOP_DIR="$HOME/" 
XDG_PUBLICSHARE_DIR="$HOME/"

So the folder Desktop and Public are missing and the Home folder shows on the Desktop. I have manually changed to

XDG_DESKTOP_DIR="$HOME/Desktop" 
XDG_PUBLICSHARE_DIR="$HOME/Public"

after recreating new folders Desktop and Public, logged out and the problem looked solved. But after restart, the system has re-written the user-dirs.dirs file as it was before and the problem is there again.

Is there a way to fix the changes to this file?

Thank you

guiverc
  • 33,561
Gigiux
  • 877

1 Answers1

3

How to prevent the rewriting of ~/.config/user-dirs.dirs?

The following works for me on Ubuntu 22.04:

  • First change the system defaults: sudo nano /etc/xdg/user-dirs.defaults
  • Then change the config: nano ~/.config/user-dirs.dirs
  • Finally update: xdg-user-dirs-update
FedKad
  • 13,420