以其他用户身份运行X Apps时无法打开显示 [英] Cannot open display while running X Apps as another user

查看:98
本文介绍了以其他用户身份运行X Apps时无法打开显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前以root用户身份使用 X11RDP 连接到 RHEL 6.5端点.所有X应用程序都可以正常运行,并且可以正确地定向到正确的显示(例如11.0).

I am currently using X11RDP to connect to a RHEL 6.5 endpoint, as root user. All X apps work fine, and directed properly to the right display (say 11.0).

现在,如果我切换到另一个用户( su-user1 ),那么我尝试打开任何X应用程序(例如xterm),将无法打开显示 (即使它也是11.0).

Now if I switch to another user (su - user1), then I try to open any X app (say xterm) it will be unable to open the display (even though it is also 11.0).

我不认为问题出在 xauth (魔术cookie等),或者 DISPLAY 环境变量设置不正确,或者不允许与 xhost + ;而是使用 XRDP .

I do not believe the problem to be with xauth (magic cookies, etc), or the DISPLAY environment variable not being set correctly, or allowing connection with xhost +; but rather something with XRDP.

任何帮助将不胜感激.

推荐答案

我的问题的解决方案实际上是x11rdp的启动方式.

The solution to my problem was actually in how x11rdp was starting.

它使用 -nolisten tcp 启动x服务器.

如果在/etc/xrdp/sesman.ini 中将该部分注释为 x11rdp ,那么上述问题将消失.

If that part is commented out in /etc/xrdp/sesman.ini for x11rdp then the problems described above will be gone.

希望这可以帮助其他经历相同问题的人.

Hope this helps other people experiencing the same problems.

这篇关于以其他用户身份运行X Apps时无法打开显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆