After installing Xubuntu 22.04 on a laptop previously running with Xubuntu 18.04 (not altering its existing partition /home
, I just designated its existing partition as /home
during install), I had to repeat all configurations (panel, appearance of the desktop, configuration of Firefox, Shortcuts, automatically started applications…). I also had to create users and groups as they were before on the old system (I hope did it without creating new home directories for them).
In order to save all this configuration work for the second user, I just copied the hidden folder .config
from the home directory of the first user, for whom I had established all these settings. Of course I adjusted owners and access rights to the user's home directory before proceeding.
This method worked well in other cases, only few fine tuning operations became necessary for the other user (like modifying the desktop backdrops appearance and other user-specific things).
But one thing is really strange and I don’t know how to cope with it:
All the basic folders from that user’s home directory are shown on the desktop as if they were part of that user’s directory ~/Arbeitsfläche
(desktop)!
Those directories are not shown as links but rather as if they are really situated in his personal folder desktop
but they are not there, as Thunar shows. However, if I delete one of those directories to the trash can, it also is deleted from that user's home directory!
In a German localization, the folder desktop is sometimes called Arbeitsfläche
, in some other cases it is called Schreibtisch
. I have already placed question 1466339 what really defines the name of this folder.
I have no idea what causes this strange behavior, nor do I have any idea, how to prevent folders like Bilder
, Dokumente
, Downloads
, Musik
, Öffentlich
, …, snap
, Vorlagen
being shown there, whereas the content of the folder Arbeitsfläche
or Schreibtisch
is not shown, but the folder itself is shown instead!
How can I fix this?
The culprit is the file
~/.config/user-dirs.dirs
. Its content is (when it is right):The line about XDG_DESKTOP_DIR read
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 fileuser-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 lineXDG_DESKTOP_DIR="$HOME/Schreibtisch"
. After deleting~/.config/user-dirs.dirs
, callingxdg-user-dirs-update
created a new version of it with the corresponding lineBefore 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
touser-dirs.dir.bak
and then I invokedxdg-user-dirs-update
. I checked for the name attributed to the desktop directory. In my case it had becomeSchreibtisch
(which differs fromArbeitsflä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 toSchreibtisch
.(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 folderSchreibtsch
of the second user toArbeitsfläche
. I was amazed, that it took longer than expected. After the repair on~/.config/user-dirs.dirs
where the folder name had becomeSchreibtisch
, 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 fileuser-dirs.dir
became effective. The content of the previous folderSchreibtisch
was shown as desktop and the standard folders of the second user had vanished from his desktop. I deleteduser-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.