1.安装xhost
[root@oracle11 ~]# yum whatprovides "*/xhost"
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base/7/x86_64/filelists_db | 7.2 MB 00:00:01
extras/7/x86_64/filelists_db | 226 kB 00:00:00
updates/7/x86_64/filelists_db | 3.4 MB 00:00:00
xorg-x11-server-utils-7.7-20.el7.x86_64 : X.Org X11 X server utilities
Repo : base
Matched from:
Filename : /usr/bin/xhost
[root@oracle11 ~]#
xorg-x11-server-utils-7.7-20.el7.x86_64 可以安装
yum install -y xorg-x11-server-utils-7.7-20.el7.x86_64
2.配置$DISPLAY
[root@oracle11 ~]# xhost +
xhost: unable to open display ""
[root@oracle11 ~]#
3.安装x-server
[root@oracle11 ~]# yum -y groupinstall "X Window System"
[root@oracle11 ~]# startx
4.xmanager
xstart填写执行命令为:
/usr/bin/xterm ls -display $DISPLAY
在xshell上设置,192.168.248.1是windows主机,要用这个地址连接192.168.248.134
[root@oracle11 ~]# export DISPLAY=192.168.248.1:0
[root@oracle11 ~]# xhost +
access control disabled, clients can connect from any host
[root@oracle11 ~]#
xclock正常显示时钟