我试着打开vlc或snap-商店,但它们没有打开。在尝试打开终端之后,我得到了如下错误: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.快速存储错误:
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请任何人分享一些关于如何修复这些被拒绝的权限错误的见解。
发布于 2020-10-10 11:56:52
对于大多数X11 gui应用程序,您可以导出运行Xserver的用户的相同显示变量,并运行xhost +作为该用户允许其他用户访问Xserver。
对于snap,必须将export DISPLAY=$YourDisplayValue添加到运行snap命令的用户.bashrc中。
我不记得如何通过编程实现这个值,以使其更可移植,但它通常不会改变那么多。显然,通过环境来抓取应用程序是一项任务。
但这件事对我来说很管用
https://askubuntu.com/questions/1267177
复制相似问题