这是因为Xserver默认情况下不允许别的用户的图形程序的图形显示在当前屏幕上. 如果需要别的用户的图形显示在当前屏幕上, 则应以当前登陆的用户, 也就是切换身份前的用户执行如下命令

xhost +

 

 

远程访问时也会出现类似问题:

 第一步:用root登陆linux,启动vnc服务;

 第二步:根据vnc起来的端口,设置export DISPLAY=localhost:1(1表示vnc在第一个tty上启动的),vnc的启动信息见附件1;

 第三步:执行xhost +,并且提示“access control disabled, clients can connect from any host”才正确。

 

 

相关文章:

  • 2021-06-18
  • 2021-11-17
  • 2021-11-29
  • 2022-03-03
  • 2022-12-23
  • 2022-01-06
  • 2022-12-23
  • 2021-08-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案