安装与启动
[root@test /]# mount /dev/cdrom media/
mount: block device /dev/cdrom is write-protected, mounting read-only
|
[root@test Server]# rpm -ivh vnc-server-4.1.2-14.el5_3.1.i386.rpm
warning: vnc-server-4.1.2-14.el5_3.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186 Preparing... ########################################### [100%] package vnc-server-4.1.2-14.el5_3.1.i386 is already installed
|
vnc-server-4.1.2-14.el5_3.1 |
[root@test Server]# vncserver :1 //启动vnc服务
New 'test:1 (root)' desktop is test:1
Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/test:1.log
|
配置文件及信息
路径:/root/.vnc
文件test:1.log
Xvnc Free Edition 4.1.2 Copyright (C) 2002-2005 RealVNC Ltd. See http://www.realvnc.com for information on VNC. Underlying X server release 70101000, The X.Org Foundation
Sat Apr 28 06:33:34 2012 vncext: VNC extension running! vncext: Listening for VNC connections on port 5901 vncext: Listening for HTTP connections on port 5801 vncext: created VNC server for screen 0 |
文件test\:1.pid
4164 //进程号
文件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" & #twm & #startkde & //kde桌面环境 #gnome-session & //gnome桌面环境 |
常用命令
启动服务:vncserver :1
停止服务:vncserver -kill :1
设置密码:vncpasswd