How to install and configure VNC in Centos5

Source: Internet
Author: User

VNC, all called Virtual Network Computing, is a desktop sharing system. Its function is similar to remote
Desktop functions. VNC uses the RFB (Remote FrameBuffer, Remote frame buffer) Protocol to remotely control another computer. It sends keyboard and mouse actions to the remote computer and sends the screen of the remote computer back to the local computer.
VNC technology has nothing to do with the platform. VNC Viewer can be on a different operating system than VNC Server. VNC supports almost all operating systems, Java, and even Java browsers to access the VNC Server. Multiple VNC clients can connect to a VNC Server at the same time.
Install and configure VNC in centos5 1. Check whether the VNC client and server have been installed
Run the following command:
If rpm-q vnc-server returns the following information,
Package vnc is not installed vnc-server-4.0-8.1 indicates that the vnc server has been installed by default (vnc server is installed by default in general ).
2. Add the user name to the configuration file.
Run the following command to edit the configuration file and add account information:
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
#.

# VNCSERVERS = "1: myusername"

# VNCSERVERS = "1: gavin 2: john" # use the method for more user
VNCSERVERS = "2: root"

# VNCSERVERARGS [1] = "-geometry 800x600"
VNCSERVERARGS [2] = "-geometry 1024x768"

3. Set the password of the root user
Run the following command to set the password:
Vncpasswd enter the password again when Verify is prompted.
4. Start the VNC service
Run the following command to start vnc server sbin/service vncserver start:
Starting VNC server: 2: root [OK] 5. Modify the Windows Manager of the VNC SERVER
The default window manager used by the vnc server is twn, which is a very simple window manager. We can change it to common GNOME or KDE.
Run the following command to enter the user's home directory:
Cd ~ /. Vnc edit startup Item:
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 gray
Vncconfig-iconic &
Xterm-geometry 80x24 + 10 + 10-ls-title "$ VNCDESKTOP Desktop "&
Gnome-session & # Use GNOME as the Windows Manager of VNC
# Startkde & # kde desktop
# Twm & # Remove the default window manager of the system

6. restart vnc server/sbin/service vncserver restart. When the following message is displayed, the restart is successful:
Shutting down VNC server: 2: root [OK] Starting VNC server: 2: root [OK]
Windows login to vnc server (1). login from IE
Enter the following address in IE:
Http://xxx.xxx.xxx.xxx: 5802 enter the password to use.
(2). Log On from VNC view
Install vnc view on windows, enter xxx. xxx: 2, connect to log on, and enter the password.
NOTE: If connection refused (10061) is prompted when you log on from the vnc view, it is because of a linux Firewall problem. log on to the centos System and choose System> Preferences> Remote Desktop, check the two items in sharing. If the two items are not checked, click Close and log on again with vnc view.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.