配置使用vnc服务

配置使用vnc服务

需要的软件包

tigervnc-server

安装步骤

安装
yum install tigervnc-server
为当前用户设置密码
vncpasswd
[root@tm ~]# vncserver &
[1] 10615
[root@tm ~]# xauth: (stdin):1: bad display name “tm.myserver:1” in “add” command

New ‘tm.myserver:1 (root)’ desktop is tm.myserver:1

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

“tm.myserver:1” 表示桌面,类似于screen,在一个终端上可以有多个屏幕;一个VNC client只能连接一个桌面

添加开机自启动
[root@tm ~]#chkconfig vncserver on

杀进程命令,杀掉第一个桌面进程
[root@tm ~]# vncserver -kill :1

VNC启动后会在用户的家目录下生成一个.vnc目录,里面的文件如下

这些文件的作用
xstartup1
passwd 2
localhost.localdomain:1.pid3
localhost.localdomain:1.pid4


  1. A shell script specifying X applications to be run when a VNC
    desktop is started. If it doesn’t exist, vncserver will create
    a new one which runs a couple of basic applications.

  2. VNC PASSWD file

  3. The log file for Xvnc and applications started in xstartup.

  4. Identifies the Xvnc process ID

来源:你抱着的是只熊

声明:本站部分文章及图片转载于互联网,内容版权归原作者所有,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2019年6月19日
下一篇 2019年6月19日

相关推荐