1、windows安装xServer端,本例使用Xming X64,下载地址如下:
https://xming.en.softonic.com/
2、默认安装Xming,安装过程不再赘述,安装完成后打开Xlauch并配置如下:
3、RHEL7.5安装x11
yum install -y xorg-x11-server-Xorg xorg-x11-xauth xorg-x11-apps
4、打开 X11 Fowarding
grep -i X11Forwarding /etc/ssh/sshd_config
X11Forwarding yes //显示yes即可,如果值为no则 vi /etc/ssh/sshd_config修改为yes
5、设置转发到Windows Xserver(即Xming)
[root@localhost ~]# xhost + 66.0.3.83 // 66.0.3.83为xming所在计算机IP地址
66.0.3.83 being added to access control list
[root@localhost ~]# xhost
access control disabled, clients can connect from any host
INET:66.0.3.83
INET:192.168.231.1
LOCAL:
INET:localhost
或者修改用户bash_profile文件添加:
export DISPLAY=66.0.3.83:0 // 66.0.3.83为xming所在计算机IP地址
6、验证
RHEL7.5运行命令 xclock,Windows可以弹出时钟即可。
[root@localhost ~]# xclock
閱讀更多 Gorjing 的文章