Use VNC to access a remote Linux image Desktop

Source: Internet
Author: User

1. Check whether your Linux system has VNC installed.

[Root @ serv1 ~] # Rpm-q vnc-Server

Vnc-server-4.1.2-14.el5_6.6

The above information indicates that the VNC service has been installed.

2. Start the VNC service

[Root @ serv1 ~] # Vncserver: 1
You will require a password to access your tops.
Password:
Verify:
Xauth: creating new authority file/root/. Xauthority
New 'serv1 .ganjh.com: 1 (Root) 'desktop is serv1.ganjh.com: 1

Creating default startup script/root/. VNC/xstartup
Starting applications specified in/root/. VNC/xstartup
Log File is/root/. VNC/serv1.ganjh.com: 1.log

The system prompts you to enter the password, which is the password for the client VNC to log on to Linux.

3. Check whether port and port 5901 are enabled in Linux.

[Root @ serv1 ~] # Iptables-I input-P TCP -- dport 5901-J accept
[Root @ serv1 ~] # Iptables-I input-P TCP -- dport 5801-J accept

4. Use the VNC Viewer software to log on to the test. The procedure is as follows: Start the VNC Viewer software -->

Server Input "172.25.6.249: 1" --> click "OK" -->

Enter the login password --> click "OK" to log on to the X-Window Graphic desktop environment --> the test is successful.


5. The preceding method only configures the character interface. If you want to see the gnome interface, you must modify the Linux configuration file.

VI/root/. VNC/xstartup

Delete the content and replace it with the following

#! /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 "&

TWM &

6. Restart the VNC server.

[Root @ serv1 ~] # Vncserver-kill: 1
Killing xvnc process ID 4046.
[Root @ serv1 ~] # Vncserver: 1

New 'serv1 .ganjh.com: 1 (Root) 'desktop is serv1.ganjh.com: 1

Starting applications specified in/root/. VNC/xstartup
Log File is/root/. VNC/serv1.ganjh.com: 1.log

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.