首页 > √文章精选 > centos 5.4 vncserver安装配置
viyin.net

centos 5.4 vncserver安装配置

2010年3月10日 发表评论 阅读评论

yum -y install vnc-*

编辑VNC Server配置文件 vi /etc/sysconfig/vncservers

  1. # The VNCSERVERS variable is a list of display:user pairs.
  2. #
  3. # Uncomment the lines below to start a VNC server on display :2
  4. # as my ‘myusername’ (adjust this to your own). You will also
  5. # need to set a VNC password; run ‘man vncpasswd’ to see how
  6. # to do that.
  7. #
  8. # DO NOT RUN THIS SERVICE if your local area network is
  9. # untrusted! For a secure way of using VNC, see
  10. # .
  11.  
  12. # Use “-nolisten tcp” to prevent X connections to your VNC server via TCP.
  13.  
  14. # Use “-nohttpd” to prevent web-based VNC clients connecting.
  15.  
  16. # Use “-localhost” to prevent remote VNC clients connecting except when
  17. # doing so through a secure tunnel. See the “-via” option in the
  18. # `man vncviewer’ manual page.
  19.  
  20. # VNCSERVERS=”2:myusername”
  21. # VNCSERVERARGS[2]=”-geometry 800×600 -nolisten tcp -nohttpd -localhost”
  22.  
  23. VNCSERVERS=”1:root”添加的
  24. VNCSERVERARGS[2]=”-geometry 800×600″添加的

运行vncserver,首次运行会创建xstartup
vi /root.vnc/xstartup
 

  1. #!/bin/sh
  2. # Uncomment the following two lines for normal desktop:
  3. # unset SESSION_MANAGER
  4. # exec /etc/X11/xinit/xinitrc
  5.  
  6. [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
  7. [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
  8. xsetroot -solid grey
  9. vncconfig -iconic &
  10. xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
  11. #twm &          注释这条
  12. exec gnome-session 添加这条

连接的IP 192.168.18.211:1 。。注意后面的 :1

viyin.net
  1. 本文目前尚无任何评论.
  1. 2010年3月29日12:52 | #1