linux vnc 安装配置

xiaoxiao2021-03-01  70

首先需要检查一下服务器是否已经安装了VNC服务,检查服务器的是否安装VNC的命令如下: rpm -qa | grep vnc 安装vnc可以使用下面命令进行安装: yum install tigervnc tigervnc-server

接下来就是安装之后的配置问题了。

使用下面的命令编辑配置文件:

vi /etc/sysconfig/vncservers 将下面的内容添加到配置文件内: VNCSERVERS="1:root" VNCSERVERSARGS[1]="-geometry 800x600 -nolisten tcp" 使用下面的命令为vnc设置密码(需要使用su 切换到要设置vnc密码的用户上,比如:su user1,其中user1就是在上面配置文件内写的帐号) vncpasswd 重启VNC服务就用下面的命令: service vncserver restart 设置VNC服务开机启动用下面的命令: chkconfig vncserver on 常见错误: [root@hn]# service vncserver restart 关闭 VNC 服务器: [确定] 正在启动 VNC 服务器:1:root WARNING: The first attempt to start Xvnc failed, possibly because the font catalog is not properly configured. Attempting to determine an appropriate font path for this system and restart Xvnc using that font path ... Could not start Xvnc. _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed _XSERVTransMakeAllCOTSServerListeners: server already running Fatal server error: Cannot establish any listening sockets - Make sure an X server isn't already running _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed _XSERVTransMakeAllCOTSServerListeners: server already running Fatal server error: Cannot establish any listening sockets - Make sure an X server isn't already running [失败] [root@hn]# 解决方案: [root@hn]# init 3 [root@hn]# service vncserver restart
转载请注明原文地址: https://www.6miu.com/read-4549949.html

最新回复(0)