Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

None of the snap symlink the home folders #153

Open
dietmarw opened this issue Sep 13, 2018 · 11 comments
Open

None of the snap symlink the home folders #153

dietmarw opened this issue Sep 13, 2018 · 11 comments

Comments

@dietmarw
Copy link

Based on the discussion in https://forum.snapcraft.io/t/none-of-the-snap-symlink-the-home-folders/7273 I'm filing this as an issue here.

On my machine none of the snaps manage to symlink the desktop folders and generate error messages like:

ln: failed to create symbolic link '/home/dietmarw/snap/gnome-calculator/222/snap/gnome-calculator/222/Documents': No such file or directory

Here the trace for gnome-calculator as an example:
https://paste.ubuntu.com/p/HrjvZ97x2Y/

@oSoMoN
Copy link
Member

oSoMoN commented Sep 17, 2018

The contents of /home/dietmarw/snap/gnome-calculator/222/.config/user-dirs.dirs don't look right.
The value of XDG_DOCUMENTS_DIR should be "/home/dietmarw/Documents", not "/home/dietmarw/snap/gnome-calculator/222/Documents".
Can you delete that file, run the application again and share the contents of the file after it's been recreated?

@dietmarw
Copy link
Author

dietmarw commented Sep 17, 2018

After deletion and running gnome-calculator again I get the same content:

# 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/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

@oSoMoN
Copy link
Member

oSoMoN commented Sep 17, 2018

Are these the contents of /home/dietmarw/.config/user-dirs.dirs or /home/dietmarw/snap/gnome-calculator/current/.config/user-dirs.dirs ?

@dietmarw
Copy link
Author

The latter:

~$ cat snap/gnome-calculator/current/.config/user-dirs.dirs 
# 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/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

@oSoMoN
Copy link
Member

oSoMoN commented Sep 27, 2018

This doesn't look right, there must be a problem with the code that writes user-dirs.dirs.

This has been reported separately here: https://forum.snapcraft.io/t/snap-apps-are-not-starting/7590.

@dietmarw
Copy link
Author

So is there any workaround I can do before this gets fixed in desktop-exports?

@kenvandine
Copy link
Member

@oSoMoN Maybe it's the line above that, where it calls can_open_file on both of those files.

Do you have $HOME/.config/user-dirs.locale and $HOME/.config/user-dirs.dirs ?

@dietmarw
Copy link
Author

In my case there is only a $HOME/.config/user-dirs.dirs

@oSoMoN
Copy link
Member

oSoMoN commented Sep 28, 2018

@dietmarw can you please share the contents of your $HOME/.config/user-dirs.dirs ?

@oSoMoN oSoMoN closed this as completed Sep 28, 2018
@oSoMoN oSoMoN reopened this Sep 28, 2018
@dietmarw
Copy link
Author

dietmarw commented Sep 28, 2018

@oSoMoN

~$ cat $HOME/.config/user-dirs.dirs
# 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_PUBLICSHARE_DIR="$HOME/Dropbox/Public"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_MUSIC_DIR="$HOME/Music"
XDG_VIDEOS_DIR="$HOME/Videos"
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOCUMENTS_DIR="$HOME/"
XDG_TEMPLATES_DIR="$HOME/.local/templates"
XDG_PICTURES_DIR="$HOME/Bilder"

@urbandroid
Copy link

urbandroid commented Dec 10, 2018

output snap shell cat $HOME/.config/user-dirs.dirs

XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

output from home

XDG_DESKTOP_DIR="$HOME/Masaüstü"
XDG_DOWNLOAD_DIR="$HOME/İndirilenler"
XDG_TEMPLATES_DIR="$HOME/Şablonlar"
XDG_PUBLICSHARE_DIR="$HOME/Genel"
XDG_DOCUMENTS_DIR="$HOME/Belgeler"
XDG_MUSIC_DIR="$HOME/Müzik"
XDG_PICTURES_DIR="$HOME/Resimler"
XDG_VIDEOS_DIR="$HOME/Videolar"

can this be the reason? If so what would be the workaround?

Also my locales in snap shell not working, non english characters printed as "??" but i doubt that this is related to problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants