To install the specific steps for configuring VNC under Centos5 _unix Linux

Source: Internet
Author: User

Today in the company installed a bit VNC, the evening is fine, just record it, or the next installation will have to Google ^_^

Introduction to VNC
Can not exception, simply introduced under VNC bar.
VNC, all known as virtual network Computing, is a desktop sharing system. It features similar to Remote Desktop features in Windows. VNC uses the RFB (remote framebuffer-frame buffer) protocol to remotely control another computer. It sends the keyboard, mouse action to the remote computer, and sends the remote computer's screen back to the local.

VNC technology has nothing to do with platforms, and VNC viewer can be on different operating systems with VNC server. VNC supports almost all operating systems and Java, and can even access VNC Server through Java-enabled browsers. Multiple VNC clients can connect to a VNC server at the same time.

Install the configuration VNC under Centos5

1. Check that VNC client and server side are installed
Execute the following command:

Copy Code code as follows:

Rpm-q VNC Vnc-server If you return a message similar to the following,

Package VNC is not installed
vnc-server-4.0-8.1


The system has installed the VNC server side by default (typically, VNC servers are installed by default).

2. Add the user name to the configuration file
Use the following command to edit the configuration file and add the account information:

Copy Code code as follows:

Vi/etc/sysconfig/vncservers make the following modifications (the Red section is added):

Make the following modifications (the Red section is added):
Copy Code code as follows:

#
# Uncomment the line below to start a VNC server on display:1
# as my ' myusername ' (adjust this to your own). You'll also
# need to set a VNC password; Run ' Mans vncpasswd ' to
# to doing that.
#
# do don't RUN this SERVICE if your the local area network is
# untrusted! For a secure way of using VNC, the
# <url:http://www.uk.research.att.com/vnc/sshvnc.html>

# 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 root user's password

Use the following command to set the password:

Copy Code code as follows:

VNCPASSWD when you are prompted to verify, enter your password confirmation again.

4. Start VNC Service
Start VNC SERVER with the following command
Copy Code code as follows:

Sbin/service vncserver Start

When the following message is displayed, the startup success is indicated:
Copy Code code as follows:

Starting VNC Server:2:root [OK]

5. Modify the Windows Manager for VNC server
The default window manager used by VNC server is TWN, a very simple window manager that we can change to a common gnome or KDE.

First use the following command to enter the user's home directory:

Copy Code code as follows:

CD ~/.vnc

To edit a startup item:
Copy Code code as follows:

VI Xstartup

Modify the startup entry as follows:
Copy Code code as follows:

#!/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作为VNC的窗口管理器
#startkde & #kde Desktop
#twm & #注掉系统默认的窗口管理器


6. Restart VNC SERVER
Copy Code code as follows:

/sbin/service vncserver Restart

The reboot is successful when prompted with the following information:
Copy Code code as follows:

Shutting down VNC server:2:root [OK]
Starting VNC Server:2:root [OK]

Windows log on to VNC SERVER

1. Login from IE
Enter the following address directly from IE browser:
http://xxx.xxx.xxx.xxx:5802
Enter a password to use.

2. Login from VNC view
Install VNC view on Windows, then enter Xxx.xxx.xxx.xxx:2, connect to login, and enter a password.

Remarks: If you are prompted to connection refused (10061) when you log on from VNC view, you are logged on to the CentOS system because of a problem with the Linux firewall. Select System-->preferences-->remote Desktop, check the sharing of the two items, security two do not tick, click Close, and then again with VNC view login can.

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.