I’ve done so because no file or directory on my system has capital letters in it, so I don’t see why files in my $HOME should either.
However, whenever running snap packages (I’ve tested with Spotify today) these settings aren’t respected, and thus create the default directories. This makes my $HOME look very cluttered:
Thanks for reporting this. I suspect this may be down to the desktop helpers. I wonder if other snaps exhibit the same issue? Can you maybe try the scummvm snap which doesn’t use the desktop launchers. If it still happens, then it’s more likely snapd then the desktop helpers.
This same error happens with localized home directory names. I’m using Ubuntu 17.10 with slovak localization and every time I try a “snap install” it will generate new english language directories in my home. It’s extremely annoying! (Did happen e.g. with Spotify, Brave…)
If this is happening immediately upon issuing a snap install then the issue isn’t with the desktop helpers, as they will not run until the command within the snap itself is executed, which doesn’t happen on the install step.
Tested it and I can correct my previous post: it does indeed happen after launching the app. The install process in itself doesn’t do anything to the home directory…
I’m not sure of the exact cause, but there are likely a few things going on here:
strict confined snaps have $HOME set to ~/snap/<pkgname>/<rev>, so would not generally find the host system ~/.config/user-dirs.dirs file by default:
james@scruffy:~$ echo ~/.config/user-dirs.dirs
/home/james/.config/user-dirs.dirs
james@scruffy:~$ snap run --shell iagno
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
james@scruffy:/home/james$ echo ~/.config/user-dirs.dirs
/home/james/snap/iagno/14/.config/user-dirs.dirs
snapcraft-desktop-helpers does run xdg-user-dirs-update to generate a user-dirs.dirs file for the confined application. But the paths in that file are all $HOME relative, so shouldn’t alter anything in the user’s home directory:
james@scruffy:~$ snap run --shell iagno
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
james@scruffy:/home/james$ /snap/iagno/current/gnome-platform/usr/bin/xdg-user-dir DOCUMENTS
/home/james/snap/iagno/14/Documents
So I wonder if the application in question is resetting $HOME itself? It would still see its own user-dirs.dirs file because snapcraft-desktop-helpers sets $XDG_CONFIG_HOME, but would treat those paths as relative to the real home directory.
When I launch VLC now (after removing the english-named directories), I get the following lines in Journal:
jan 16 19:47:50 mobileaeris vlc_vlc.desktop[26340]: /home/michalmaria/Desktop was removed, reassigning DESKTOP to homedir
jan 16 19:47:50 mobileaeris vlc_vlc.desktop[26340]: /home/michalmaria/Downloads was removed, reassigning DOWNLOAD to homedir
jan 16 19:47:50 mobileaeris vlc_vlc.desktop[26340]: /home/michalmaria/Templates was removed, reassigning TEMPLATES to homedir
jan 16 19:47:50 mobileaeris vlc_vlc.desktop[26340]: /home/michalmaria/Public was removed, reassigning PUBLICSHARE to homedir
jan 16 19:47:50 mobileaeris vlc_vlc.desktop[26340]: /home/michalmaria/Documents was removed, reassigning DOCUMENTS to homedir
jan 16 19:47:50 mobileaeris vlc_vlc.desktop[26340]: /home/michalmaria/Music was removed, reassigning MUSIC to homedir
jan 16 19:47:50 mobileaeris vlc_vlc.desktop[26340]: /home/michalmaria/Pictures was removed, reassigning PICTURES to homedir
jan 16 19:47:50 mobileaeris vlc_vlc.desktop[26340]: /home/michalmaria/Videos was removed, reassigning VIDEOS to homedir
Hi! Are there any news about this issue? It’s very annoying for those not using English localization, is there something that can be done to help fixing this (for example system logs etc.)?
Yes… i really hope that it will be fixed before Ubuntu 18.04 release, i think that problems like this are a big hindrance to snap adoption, it makes a good software look unpolished and unfinished.
now install the new version of libreoffice as snap and update snapd and continue with the same error of the home folder, that shame, that incredible of Canonical (again)