CentOS下安装vncServer及应用
1.确认安装VNCSERVER(CentOS下)
输入命令:rpm -qa |grep vnc
如果有返回,刚安装,否则则没有安装
2.开始配置vncserver:
管理员:
[root@localhost/]# vncserver
password:123456
verify: 123456
普通用户:
[root@localhost/]# su admin
[root@localhost/]# vncserver
password:123456
verify: 123456
启动vncserver:
[root@localhost/]# vncserver :2
3.修改桌面相关配置:
vi /root/.vnc/xstartup
如下:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session gnome
twm &
设置分辨率:
vi /etc/sysconfig/vncservers
添加如下信息:
VNCSERVERS="1:root 2:admin"
VNCSERVERARGS[1]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
4.在windows下安装vnc客户端(相同版本的)
5.打开客户端输入:vncserveripaddress:2
回车再输入密码,就可以连接上了
6.如果要修改vcn密码:
vncpasswd