Smi*_*mie 4 xorg root wayland 17.10
在 Ubuntu 17.10 中,当我使用 Wayland 登录并尝试使用 root 访问权限运行 GUI 应用程序时,它说
unable to copy the user's xauthorization file
Run Code Online (Sandbox Code Playgroud)
我试过
sudo chown sharif:sharif ~/.Xauthority
Run Code Online (Sandbox Code Playgroud)
但结果是
chown: cannot access '/home/sharif/.Xauthority': No such file or directory
Run Code Online (Sandbox Code Playgroud)
但在 Xorg 中,这些应用程序运行良好。
小智 5
查看https://bugs.launchpad.net/ubuntu/+source/synaptic/+bug/1551951,在评论 #9 中有解决方法。特别是:
pkexec 用来授予root(即运行其参数的用户)访问真实用户的X 显示的方法在Wayland 下不起作用,但仍然使用X(即使用Xwayland)。Xwayland(至少由 mutter/gnome-shell 启动)在没有“-auth”选项的情况下启动,因此只授予真实用户访问权限(采用 Wayland 的安全模型)。因此,没有 Xauthority 文件可以授予其他用户访问权限。解决方法是明确允许 root 使用以下命令访问用户的 X 显示
$ xhost +si:localuser:root
我刚刚在我安装的 Artful 上尝试了这个,突触终于成功运行了。Gparted 有点挣扎,但在第二次尝试时也成功运行。
上述解决方案适用于每个会话。该线程中的第 13 条评论显示了如何在每次登录时保持不变。
归档时间: |
|
查看次数: |
10532 次 |
最近记录: |