狮子的雄心,骆驼的耐力,孩子的执著!
分类: 系统运维
2008-12-13 19:05:08
Linux VNC Server
1.vncserver #初始化用户vnc配置,密码
[root ~]vncserver
passwd: //如果这个帐号是第一次运行vncserver,则会要求你输入连接的密码。
verify:
New 'server1.linux:1 (root' desktop is server1.linux:1
Starting applications specified in /root/.vnc/xstartup
2. ~/.vnc/xstartup #用户登陆环境设置,如下设置
[root ~] more /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 &
3. /etc/sysconfig/vncservers #系统VNCSERVER设置
[root@centos1 ~]# more /etc/sysconfig/vncservers
# The VNCSERVERS variable is a list of display:user pairs.
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
#