有了 Xorg,我就可以做到
xhost +si:localuser:foxy
以 Foxy 用户身份运行 GUI 应用程序。
但我可以在 Wayland 上做到这一点吗?我尝试了以下操作:-
chmod o+rw /run/user/1000/wayland-0
但它仍然给出权限被拒绝
[foxy@titan levi]$ QT_QPA_PLATFORM=wayland XDG_RUNTIME_DIR=/run/user/1000 konsole
Failed to create wl_display (Permission denied)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: wayland-org.kde.kwin.qpa, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
Aborted (core dumped)
我正在使用 kwin_wayland 5.20.2
编辑:我不想使用 root
答案1
切换到用户 sudo su username 或 sudo su - username,然后键入应用程序的名称。这是简单的方法。