配置VNC

Posted losbyday

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了配置VNC相关的知识,希望对你有一定的参考价值。


1. 1在Linux平台安装VNCServer服务端软件包。
#yum -y install vnc *vnc-server*

2.修改VNCServer主配置文件
#vim /etc/sysconfig/vncservers
复制最后两行并去掉行首注释符,然后修改为
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1024x768"

3.设置VNCServer远程连接密码
#vncpasswd
输入两次相同的密码

4.启动vncserver服务
#/etc/init.d/vncserver start

解决RHEL6 vncserver 启动 could not open default font ‘fixed‘错误.
主要是缺少相关字体,通过yum安装即可
[cpp] view plain copy
yum install libXfont
yum install xorg-x11-xfs
yum install xorg-x11-xfs-utils
yum install xorg-x11-xinit
yum install xorg-x11-xdm
yum install xorg-x11-fonts*

5.上一步执行完毕会在root宿主目录下生成.vnc开头的隐藏目录,该目录下面的文件就是root用户的VNC桌面配置文件。打开xstartup配置桌面
#vim /root/.vnc/xstartup
将最后一行改为
gnome &
(使用GNOME桌面)

6.开启防火墙VNCServer端口
#vim /etc/sysconfig/iptables
在“-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT”下面添加一行
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT
重启iptables服务
#/etc/init.d/iptables restart

以上是关于配置VNC的主要内容,如果未能解决你的问题,请参考以下文章

Linux 配置 VNC 远程桌面

ubuntu配置vnc访问

vnc server配置启动重启与连接

RedHat 简易配置 VNC Server 与VNC View详细说明

怎样在CentOS 7.0上安装和配置VNC服务器

VNC SERVER配置