Linux 下 VNC配置和使用(本机控制本机)
1》配置yum源
https://blog.csdn.net/weixin_42167759/article/details/81143066
因资源有限,接下来自己控制自己terminal1为控制端, terminal2为服务端
2》terminal1【控制端】安装vncviewer
[root@localhost yum.repos.d]# yum install tigervnc
3》terminal2【被控制端】安装vncserver
[root@localhost yum.repos.d]# yum install tigervnc-server
4》产看是否安装成功
[root@localhost yum.repos.d]# vnc 【按teb键 补齐】
vncconfig vncpasswd vncserver vncviewer
5》terminal2【被控制端】启动server
[root@localhost yum.repos.d]# vncserver You will require a password to access your desktops.Password: 【输密码】 Verify: 【输密码】 Would you like to enter a view-only password (y/n)? y Password: 【输密码】 Verify: 【输密码】New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1Creating default startup script /root/.vnc/xstartup Creating default config /root/.vnc/config Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/localhost.localdomain:1.log启动 VNC Server: 打开终端执行:vncserver 第一次运行 vncserver,将会要求输入两次密码,会看到如下提示信息
New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1
上边信息中的“:1”表示启动的第一个vnc桌面。
6》启动服务端terminal2
[root@localhost yum.repos.d]# vncviewer
【此时并非后台模式控制,若想后台模式执行命令 [root@localhost yum.repos.d]# vncviewer &】
[root@localhost yum.repos.d]# vncviewer
TigerVNC 查看器 64 位 v1.8.0
构建于:2018-04-11 06:05
版权所有 1999-2017 TigerVNC 团队及众多开发者(参见 README.txt)
访问 http://www.tigervnc.org 以获取更多关于 TigerVNC 的信息。
Fri Mar 1 22:05:24 2019
DecodeManager: Detected 1 CPU core(s)
DecodeManager: Decoding data on main thread
CConn: 已连接到主机 192.168.1.231 的端口 5901
CConnection: Server supports RFB protocol version 3.8
CConnection: Using RFB protocol version 3.8
CConnection: Choosing security type VeNCrypt(19)
CVeNCrypt: Choosing security type TLSVnc (258)
Fri Mar 1 22:06:42 2019
CConn: 正在使用像素格式 depth 24 (32bpp) little-endian rgb888
CConn: 使用 Tight 编码
CConn: 已启动持续更新
7》停止 vncserver:
[root@localhost yum.repos.d]# vncserver -kill :1
Killing Xvnc process ID 35571
总结
以上是生活随笔为你收集整理的Linux 下 VNC配置和使用(本机控制本机)的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 如何解决 “ 段错误(吐核) ” ???
- 下一篇: Linux开启路由转发功能(透明代理环境