Imagine yourself at Edgestream Partners, L.P.
0

I try to open vlc or snap-store but they are not opening. After trying to open through terminal, I got the following errors that shown below. Error for vlc:

snap run vlc
/snap/vlc/1700/bin/desktop-launch: line 51: /home/jd81197/.config/user-dirs.dirs: Permission denied
Error: unable to open display :0
VLC media player 3.0.11 Vetinari (revision 3.0.11-0-gdc0c5ced72)
xcb_connection_has_error() returned true
[000056540703fd50] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
ALSA lib conf.c:3916:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
[000056540704bbe0] main interface error: no suitable interface module
[0000565406f73b40] main libvlc error: interface "globalhotkeys,none" initialization failed
[0000565406f73b40] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[000056540704bbe0] skins2 interface error: cannot initialize OSFactory
[0000565406f703c0] main playlist: playlist is empty
[000056540704bbe0] [cli] lua interface: Listening on host "*console".
VLC media player 3.0.11 Vetinari
Command Line Interface initialized. Type `help' for help.

Error for snap-store:

snap run snap-store
/snap/snap-store/467/snap/command-chain/desktop-launch: line 50: /home/jd81197/.config/user-dirs.dirs: Permission denied
sed: can't read /home/jd81197/.config/user-dirs.dirs: Permission denied
/snap/snap-store/467/snap/command-chain/desktop-launch: line 238: /home/jd81197/.config/user-dirs.dirs: Permission denied
cp: cannot open '/home/jd81197/.config/user-dirs.locale' for reading: Permission denied
/snap/snap-store/467/snap/command-chain/desktop-launch: line 243: /home/jd81197/.config/user-dirs.locale: Permission denied
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
cp: cannot stat '/snap/snap-store/467/gnome-platform/usr/share/mime': No such file or directory
/snap/snap-store/467/snap/command-chain/desktop-launch: line 20: /snap/snap-store/467/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0: No such file or directory
ERROR: /snap/snap-store/467/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0 exited abnormally with status 127
Directory '/home/jd81197/snap/snap-store/467/.local/share/mime/packages' does not exist!
ERROR: update-mime-database /home/jd81197/snap/snap-store/467/.local/share/mime exited abnormally with status 1
/snap/snap-store/467/usr/bin/snap-store: error while loading shared libraries: libgdk_pixbuf-2.0.so.0: cannot open shared object file: No such file or directory

Can anyone please share some insights about how to fix these permission denied error.

Share a link to this question
CC BY-SA 4.0
0
0

For most X11 gui apps you can export the same DISPLAY variable of the user running the Xserver and run xhost + as this user to permit other users accessing the Xserver.
For snap you have to add the export DISPLAY=$YourDisplayValue to the users .bashrc running the snap command.
I cant remember how to do this value programatically to be more portable but its not changing that much usually. Apparently passing environment to snap apps is a bit of a mission.
But this worked for me on a current 20.04

Share a link to this answer
CC BY-SA 4.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.