The culprit is the file ~/.config/user-dirs.dirs
. Its content is (when it is right):
# 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/Schreibtisch"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Vorlagen"
XDG_PUBLICSHARE_DIR="$HOME/Öffentlich"
XDG_DOCUMENTS_DIR="$HOME/"
XDG_MUSIC_DIR="$HOME/"
XDG_PICTURES_DIR="$HOME/Bilder"
XDG_VIDEOS_DIR="$HOME/"
The line about XDG_DESKTOP_DIR read
XDG_DESKTOP_DIR=“$HOME/”
As the prefix of the file says, all changes to it are retained at the next startup, but I have observed that they are rolled back. Has someone stumbled over a language hurdle? The comment first mentions xdg-user-dirs-update
. Looking at the manpage of it, it updates the current state of the file user-dirs.dir
. If none exists before calling it, then one is created based on the system default values, or falling back to the old non-translated filenames if such directories exists. The list of old directories used are: ~/Desktop
, ~/Templates
and ~/Public
.
In my case the word Schreibtisch
was missing in the line XDG_DESKTOP_DIR="$HOME/Schreibtisch"
. After deleting ~/.config/user-dirs.dirs
, calling xdg-user-dirs-update
created a new version of it with the corresponding line
XDG_DESKTOP_DIR="$HOME/Schreibtisch"
Before this sucessfull approach I had followed this suggestion: Log out, change this line and log in again. That did not work: The changes were gone because xdg-user-dirs-update
is invoked early in the login process.
In order to reset the file to the default value, I first renamed ~/.config/user-dirs.dirs
to user-dirs.dir.bak
and then I invoked xdg-user-dirs-update
. I checked for the name attributed to the desktop directory. In my case it had become Schreibtisch
(which differs from Arbeitsfläche
automatically given to the directory of the first configured user after installing Xubuntu 22.04). Therefore I reverted my renaming of the second unser's desktop folder back to Schreibtisch
.
(After installation the German name for the desktop folder of the first user was Arbeitsfläche
. In order to make it consistent with the installed system, I had renamed the existing desktop folder Schreibtsch
of the second user to Arbeitsfläche
. I was amazed, that it took longer than expected. After the repair on ~/.config/user-dirs.dirs
where the folder name had become Schreibtisch
, I had to revert my initial renaming of the folder.)
After renaming it consistent with what has been placed into user-dirs.dir
, logging out and in again, the newly created file user-dirs.dir
became effective. The content of the previous folder Schreibtisch
was shown as desktop and the standard folders of the second user had vanished from his desktop. I deleted user-dirs.dir.bak
and I was happy with the result.
My approach cloning ~/.config
from a well configured user to another one is not advisable. I searched ~/.config
for files containing the string /home/<first user>
and replaced them with /home/<second user>
. There were a few files where such a change was necessary.