Remote centOS desktop control

Source: Internet
Author: User

Remote ControlCentOSDesktop?

How to use windows Remote ControlCentOSDesktop?

 

1. Check whether the local machine is installedVnc(CentOS5 installed by defaultVnc)

Rpm-q vnc-server

If the result is:

PackageVncIs not installed
VncServer-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. EnableVNCPort

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. StartVncService

/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. Automatic Start upon startupVnc

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.