How to use VNC to connect to a Linux server

Source: Internet
Author: User
VNC (VirtualNetworkComputing) Virtual Network Computing tool is essentially a remote display system. The administrator can not only view the desktop environment on the local machine where the program runs, in addition, you can view the running status of remote machines anywhere on the Internet, and it has cross-platform features. In Linux, Virtual Network Computing (VNC) Virtual Network Computing tool is essentially a remote display system. The administrator can not only view the desktop environment on the local machine where the program runs, in addition, you can view the running status of remote machines anywhere on the Internet, and it has cross-platform features.
To use remote desktop in Linux, you need to install VNC. Fortunately, Red Hat Enterprise Linux AS 4.0 already comes with VNC, which is also installed by default. you just need to configure it. However, the Windows client must be installed.
VNCServer configuration:
1. start VNC Server:
Open the terminal and run: vncserver
When you run vncserver for the first time, you are required to enter the password twice. the following message is displayed:
New localhost. localdomain: 1 (root) desktop is localhost. localdomain: 1
Starting applications specified in/root/. vnc/xstartup
Log file is/root/. vnc/localhost. localdomain: 1.log
": 1" in the preceding information indicates the first vnc desktop to be started.
2. stop vncserver:
To stop a vncserver, follow these steps:
Vncserver-kill: 1
Note ": 1" indicates that the first vnc desktop is stopped.
3. change the vnc password:
To change the vnc password, run vncpasswd and enter the password twice.
4. by default, the VNC Viewer can only view the command line of the VNC Server.
To see the Linux desktop on the VNC Viewer, you need to make the following settings:
On the machine where the VNC Viewer is located, cancel the following two lines of comments in the/root/. vnc/xstartup file:
Unset SESSION_MANAGER
Exec/etc/X11/xinit/xinitrc
5. VNCServer is automatically run after Linux is started.
1) Check the vncserver in System Settings> server settings> service.
2) open the configuration file/etc/sysconfig/vncservers and remove the comments in the following line,
VNCSERVERS = "1: root"
VNCSERVERARGS [1] = "-geometry 800x600"
1 indicates that VNC runs on desktop 1, so that the root desktop can be started.
6. VNC port
If you want to control a Linux instance on the intranet from the Internet, you need to open the corresponding port of the firewall and perform Port ING on the vro.
The port number that VNC gives to the browser is 5800 + N, the port number for vncviewer is 5900 + N, and N is the set display number.
Supplement: After you connect to the service through the graphical interface, you can set
Check the vncserver so that the vncserver will be automatically started
Or, # chkconfig vncserver on
Related Article

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.