Detailed analysis: the process of installing and configuring VNC under CentOS

  
                  1. Check if the vnc client and server are installed: [gavin@centos ~]$ rpm -q vnc vnc-server package vnc is not installed vnc-server-4.0-8.1 cent os 5 already contains vnc installation package 2. will User name is added to the configuration file: (Note: "Username" here refers to the name of the Linux system user) [gavin@centos ~]# vi /etc/sysconfig/vncservers # # Uncomment the line below to start a VNC server on Display :1 # 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 # http://www.uk.research.att.com/vnc/sshvnc.html>. # VNCSERVERS="1:myusername" # VNCSERVERS=" 1: gavin 2: john" # use the method for more user VNCSERVERS="1:gavin 2:root 3:root" # VNCSERVERARGS[1]="-geometry 800x600" VNCSERVERARGS[1]="-geometry 1024x768" 3. Set the password for user gavin [gavin@centos ~]$ vncpasswd Password: Verify: 4. Start VNC service [gavin@cen Tos ~]# /sbin/service vncserver start Starting VNC server: 1:gavin [ OK ] 5. Enter the command [gavin@centos ~]$ cd ~/.vnc/[gavin@centos .vnc]$ vi 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 & #set starting GNOME desktop #startkde & #kde desktop #twm & #Text interface 6. Restart vncserver [gavin@centos ~]# /sbin/service vncserver restart Shutting down VNC server: 1:gavin [ OK ] Starting VNC server : 1:gavin [ OK ] 7. Windows login to VNC Server (1). Log in from IE and directly enter the following address from IE browser: http://xxx.xxx.xxx.xxx:5802 Enter the password to use. (2). Log in from VNC view Install vnc view on windows, then enter xxx.xxx.xxx.xxx:2, connect and log in, enter the password. Note: If you log in from the vnc view and prompt connection refused (10061), it is because of the Linux firewall problem, log in to the centos system, select System-->Preferences-->Remote Desktop, check the two items in the sharing. Security is not checked, click to close, and then re-login with vnc view

Copyright © Windows knowledge All Rights Reserved