分类: LINUX
2008-03-19 20:22:00
/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 # # Use "-nolisten tcp" to prevent X connections to your VNC server via TCP. # Use "-nohttpd" to prevent web-based VNC clients connecting. # Use "-localhost" to prevent remote VNC clients connecting except when # doing so through a secure tunnel. See the "-via" option in the # `man vncviewer' manual page. # VNCSERVERS="2:myusername" # VNCSERVERARGS[2]="-geometry 800x600 –nolisten tcp -nohttpd" |
###############################配置后的############################### # 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 # # Use "-nolisten tcp" to prevent X connections to your VNC server via TCP. # Use "-nohttpd" to prevent web-based VNC clients connecting. # Use "-localhost" to prevent remote VNC clients connecting except when # doing so through a secure tunnel. See the "-via" option in the # `man vncviewer' manual page. VNCSERVERS="2:root" ##这里可以添加多个用户; VNCSERVERARGS[2]="-geometry 800x600" ##这里注意一下,默认系统配置里有 –nolisten tcp 和 –nohttpd ,这两个是阻止Xwindows登陆和HTTP方式VNC登陆的,如果需要图形界面,那就删除这部分。) 1表示VNC以桌面1运行,这样可以启动root的桌面。 |
/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" & twm & |
###############################配置后的############################### #!/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 & #set starting GNOME desktop #startkde & #kde desktop #twm & #Text interface |
设置用户marsaber的密码
[marsaber@centos ~]$ vncpasswd
Password:
Verify:
控制:
Windows平台下的VNC Viewer