一、查看是否安装VNC
1、安装桌面
yum groupinstall "Chinese Support"
2、安装中文支持
yum groupinstall "Desktop"
打开配置文件的目录:
1) cd /etc/sysconfig
2) 编辑配置文件: vi i18n
3) 用#号把第一行(LANG="en_US.UTF-8")注释掉,其实直接在这行改也是可以的,不过保险点的做法,还是先注释掉,等成功后再删除不迟。
在第一行下添加一行新行,输入(LANG="zh_CN.UTF-8"),然后保存文件,重启系统,就能见到亲切的中文啦。
3、关闭防火墙并改为开机不启动防护墙
[root@centos ~]# service iptables stop
[root@centos ~]# chkconfig iptables off
4、查看是否已经安装VNC
[root@centos ~]# rpm -qa |grep vnc 出现下面类似的说明已安装,否则进行下面的安装配置操作;
tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64
二、安装VNC
[root@centos ~]# yum –y install tigervnc-server
添加启动项
[root@centos ~]# chkconfig vncserver on
三、设置VNC 密码
[root@centos ~]# vncserver
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/centos:1.log
会在当前用户主目录下生成.vnc 目录和配置文件
[root@centos ~]# vncpasswd
Password:
Verify:
设置的密码会保存在/root/.vnc/passwd
三、VNC 配置
修改xstartup 文件把最后的twm & 删掉加上gnome-session &
[root@centos ~]#vi /root/.vnc/xstartup
xsetroot -solid grey
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
将twm &修改为gnome-session &
如果直接启动会失败
[root@centos ~]#service vncserver start
Starting VNC server: no displays configured [FAILED]
所以要修改/etc/sysconfig/vncservers 文件添加以下一条内容
VNCSERVERS="2:root"
# 桌面号:用户;
# 监听的端口为:590* ,星号代表桌面号
VNCSERVERARGS[2]="-geometry 800x600" 这样修改后,就算/etc/inittab 启动模式为3 也可以正常进入图形界面
注:修改默认启动界面为修改本行的数字,3为文本界面,5位图形界面:id:3:initdefault:
启动vncserver
[root@centos ~]#service vncserver start
正在启动VNC 服务器:2:root xauth: (stdin):1: bad display name "centos:2" in "add" command
New 'centos:2 (root)' desktop is centos:2
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/centos:2.log
Ok,现在可以通过VNC Viewer来远程连接了。
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
更新日志
- 邰肇玫.1981-雪歌(滚石25周年经典复刻系列)【滚石】【WAV+CUE】
- 《Duck Side of the Moon》特色玩法介绍
- 《刀郎 辉煌10年绝版珍藏 3CD》[WAV/分轨][1.6GB]
- 《张韶涵 全面沦陷》[WAV/分轨][370MB]
- 《极品汽车音乐 三十而立 一起走过的岁月 2CD》[WAV/分轨][990MB]
- 周冰倩1997-珍藏精选-真的好想你[WAV+CUE]
- 许廷铿2017《THEULTIMATECOLLECTION》2CD[星梦娱乐][WAV+CUE]
- 徐小明1983-再向虎山行(LP版)[文志][WAV+CUE]
- 《黑神话:悟空》石双双COS热潮持续升温 丝袜你喜欢么
- Qiddiya IRL游戏之旅在东京电玩展重磅登场
- 北京首家任天堂Switch体验店开业:国行机立减200元
- 张秀卿.1999-赢【神采】【WAV+CUE】
- 群星.1977-多多宝丽多(LP版)【宝丽金】【WAV+CUE】
- 刘德华.1989-永远...记得你(2012金碟复刻版)【EMI百代】【WAV+CUE】
- 《维纳斯璀璨假期死或生Xtreme》游戏特色玩法