xhost

简介: xhost 是用来控制X server访问权限的。 通常当你从hostA登陆到hostB上运行hostB上的应用程序时,做为应用程序来说,hostA是client,但是作为图形来说,是在hostA上显示的,需要使用hostA的Xserver,所以hostA是server.

xhost 是用来控制X server访问权限的。

通常当你从hostA登陆到hostB上运行hostB上的应用程序时,做为应用程序来说,hostA是client,
但是作为图形来说,是在hostA上显示的,需要使用hostA的Xserver,所以hostA是server.(执行xhost +后,得到提示“access control disabled, clients can connect from any host”)
因此在登陆到hostB前,
需要在hostA上运行xhost +来使其它用户能够访问hostA的Xserver.

xhost + 是使所有用户都能访问Xserver.
xhost + ip使ip上的用户能够访问Xserver.
xhost + nis:user@domain使domain上的nis用户user能够访问
xhost + inet:user@domain使domain上的inet用户能够访问。
http://blog.csdn.net/dysh61301601/article/details/3208326


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

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

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

linux下的操作日志如下:

[root@localhost ~]# vncserver

New 'localhost:1 (root)' desktop is localhost:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost:1.log

[root@localhost ~]# export DISPLAY=localhost:1
[root@localhost ~]# xhost +
access control disabled, clients can connect from any host
在设置xhost时,出现了unable的问题。

使用上诉方法就可以搞定。

http://tech.ccidnet.com/art/302/20080418/1425235_1.html

http://blog.sina.com.cn/s/blog_67a4ef290100je9y.html





相关文章
|
5月前
|
Linux 网络安全
linux免密登录报错 Bad owner or permissions on /etc/ssh/ssh_config.d/05-redhat.conf
linux免密登录报错 Bad owner or permissions on /etc/ssh/ssh_config.d/05-redhat.conf
240 1
|
4月前
|
网络安全 开发工具 数据安全/隐私保护
openssh 升级后ssh远程登录报错Permission denied, please try again.
openssh 升级后ssh远程登录报错Permission denied, please try again.
875 3
|
5月前
|
Shell 网络安全 开发工具
配置SSH时候,Permission denied问题解决方法
配置SSH时候,Permission denied问题解决方法
317 4
|
5月前
|
Ubuntu Linux 网络安全
SSH 远程登录报错:Permission denied, please try again. 解决办法
SSH 远程登录报错:Permission denied, please try again. 解决办法
1662 0
|
网络协议 Unix Linux
Symantec Backup Exec Agent For Linux防火墙问题
如果在Unix或Linux安装配置好了Symantec Backup Exec Agent For Linux,但是在Symantec Backup Exec服务端无法访问Symantec Backup Exec Agent,那么此时你首先应该检查Unix或Linux上的Symantec Backup Exec Agent服务是否启动。
975 0