linux redhat 9.2 vnc 安装

1、使用X11 窗口系统

2、VNC Viewer 下载地址

https://www.realvnc.com/en/connect/download/vnc/    

3、安装tigervnc-server

rpm –qa | grep vnc 	#查看是否已经安装了vnc	
yum install tigervnc-server
vncserver :1  	#:1 代表启动vncserver 的端口号 5900 + 1
#第一次需要输入密码,要记住此密码,VNC Viewer 链接的时候需要
vncserver -list 	#查看启动的服务
sudo systemctl disable firewalld --now	#关掉防火墙


vncserver的其他命令
vncserver -list 			#查看启动的端口号
vncserver -kill :2 			#关掉nvcserver的进程和端口
ps -ef|grep vnc				#查看vnc有关的进程号
netstat -anpt|grep 5902 	#查看服务状态
ifconfig 					#参看主机的ip

使用VNC Viewer 链接 VNC Server 
输入ip :5900+端口			#列如 192.168.0.112:5902

4、安装 X11VNC

1、X11VNC源码下载

http://sourceforge.net/projects/libvncserver/files/x11vnc/0.9.13/x11vnc-0.9.13.tar.gz/download

2、解压

gzip -dc x11vnc-0.9.13.tar.gz | tar -xvf -

3、此步骤不需要进行操作:X11VNC需要其他库和编译工具
参考链接:https://www.cnblogs.com/cxchanpin/p/6789013.html

sudo yum intsall gcc make libXext-devel.x86_64

4、编译
进入解压的VNC Server源码里,打开终端

./configure 			#注意中间有等待时间 
make
make install
将会在x11vnc 下 生产x11vnc的执行程序,cd x11vnc 启动 ./x11vnc
程序将打印相关的信息

5、 关掉防火墙

sudo systemctl disable firewalld --now

6、启动X11VNC

./x11vnc -display :0 -passwd 123456 -shared -forever
Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐