当我从原始帐户登录时,我可以从终端打开 x 窗口
但是,如果我创建一个新帐户并切换到该帐户,su account-name
则无法从终端打开 x 窗口。
我收到以下错误:
No protocol specified
Failed to connect to Mir: Failed to connect to server socket: Permission denied
Unable to init server: Could not connect: Connection refused
(gedit:26100): Gtk-WARNING **: cannot open display: :0
为什么是这样?
答案1
简单的解决方案似乎是以原始用户身份登录并执行以下操作:
xhost +[yourhostname]