Install Remote Desktop in centos

Source: Internet
Author: User
Centos Remote Desktop

How can I remotely control the centos desktop?

How does one remotely control the centos desktop using Windows?

1. Check whether VNC is installed on the local machine (VNC is installed on centos5 by default)

Rpm-q vnc-Server

If the result is:

Package VNC is not installed
Vnc-server-4.1.2-14.e15_3.1

Congratulations! VNC has been installed on the machine. If not, you have to install it on your own. Here we will not talk about how to install it. It is very simple. Search for it in the centos software library and click Install.

2. Add the Remote Desktop user to the configuration file.

VI/etc/sysconfig/vncservers

Use the VI editor to open the configuration file and add the following two lines of commands to the file:

Vncservers = "1: Root" -- specify a remote user

Vncserverargs [1] = "-geometry 1024x768" -- specify the Remote Desktop resolution

3. Set the password for the Remote Desktop user root you just set

Vncpasswd

4. Enable the VNC Port

VI/etc/sysconfig/iptables

Use the VI editor to open the configuration file and add the following command to the file:

-A rh-firewall-L-input-p tcp-m tcp -- dport 5900: 5903-J accept

5. Restart the Firewall

Service iptables restart

6. Modify the remote desktop display configuration file (it is very easy to modify the Remote Desktop without modifying this file, which is equivalent to a command line operation. To perform remote operations, make sure to modify the configuration file by referring to the following methods)

Cd ~ /. VNC/

VI xstartup

Open the configuration file in the VI editor and make the following changes:

# Xterm-geometry 80x24 + 10 + 10-ls-title "$ vncdesktop desktop" & -- comment it, and add # To indicate comment

# TWM & -- annotate it

Gnome-session & -- add it

After reading this code, you should understand what is going on.

7. Start the VNC service

/Sbin/service vncserver start

8. remote connection

Open the VNC client and enter IP address 1 in the server box (1 indicates the remote user code configured above. Multiple remote users can be configured in the configuration file ), then you can easily control centos through a friendly Remote Desktop.

9. Automatically Start VNC upon startup

VI/etc/rc. d/rc. Local

Open the configuration file in the VI editor and make the following changes:

/Etc/init. d/vncserver start -- add a row

Add VI editor usage:

VI editor is divided into several modes

Command mode: The cursor can be moved and copied or deleted.

Insert mode: In this mode, you can enter text (press I to enter this mode in command mode, and Press ESC to exit this mode)

Bottom row mode: Save the file and exit the VI Editor (Enter: Number, followed by W fname -- specify the file name to save WQ -- save and exit Q! -- Do not save and Exit)

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.