Understanding Linux Remote Desktop Control

Source: Internet
Author: User
Tags pcanywhere

What I want to talk about here is not remote control tools such as telnet and rsh, but remote control of desktop applications.

X window is more advanced than MS windows. X window is a network-based graphical windows System with powerful remote control functions. log on to the remote system and run the X application. Then, the Xclients execution result is returned to the local host. this is the Remote X

I. Remote X

Assume that the local host ip address is 172.16.1.1 and the remote host ip address is 172.16.1.2.

Step 1: Execute xhost in any xterm on the local host to allow remote hosts to connect to the X server on the local host:

Xhost + 172.16.1.2

If you do not specify any IP address, it means that the permission is completely open, which may cause security problems. Be careful!

Step 2: Check whether the xfs of the local host is running. Use ps to check the process.

Step 3: log on to the remote host 172.16.1.2 through the network on the local host (172.16.1.1). You can use telnet, ssh, or rsh to set the DISPLAY variable.

Export DISPLAY = 172.16.1.1: 0

Step 4: Now you can use the X application on the remote host.

This is convenient, but you still have no control over the entire desktop environment. You can leave this job to vnc! Remote X works very well on the LAN. You don't need to try dialing a common phone. The speed is too slow.

Ii. vnc

I believe many people have used pcanywhere in windows, but do not want to use a free pcanywhere which can be used in linux, win9x/nt. This is vnc.

Vnc is short for vitual network computing. It supports many operating platforms and can even be operated in browsers.

I will introduce the usage of vncviewer and use linux to remotely control linux or nt.

The vnc client communicates with the vnc server through the vnc protocol in the TCP/IP architecture. After authentication, the desktop environment, input devices, and X resources of the X server are handed over to the vncserver for control, the vnc server sends the desktop environment to the vnc client through the vnc protocol. allows the vnc client to manipulate the vnc server desktop environment and input devices.

First download to the linux and windows versions of vnc.

The current linux version is vnc-3.3.3r1_x86_linux_2.0.tgz

The current Windows environment is vnc-3.3.3r7_x86_win32.zip.

1. Install vnc for linux

(1) Installation

Tar zxvf vnc-3.3.3r1_x86_linux_2.0.tgz

Cd vnc_x86_linux_2.0

Cp * vnc */usr/local/bin/

Mkdir/usr/local/vnc

Cp-r classes // usr/local/vnc/

(2) set the vnc server access password

Vncpasswd

(3) Start the vnc server

Vncserver

Note the information displayed after running, and write down the port number, generally starting from 1, because 0 is occupied by x server. now you can provide the vnc service. vnc client usage will be introduced.

2. Install vnc for nt

1) Installation

After the vnc-3.3.3r7_x86_win32.zip package is released, two directories, winvnc and vncviewer, are generated. the winvnc directory contains the installation program of the vnc server, and the vncviewer directory contains the installation sequence of the vnc client. I only care about the vnc server. simply execute setup in the winvnc directory.

2) settings

First Run install default registry settings.

Run winvnc (app mode) is to execute vnc server

At this time, you can see the small icon running winvnc, right click the icon, set the password in properties/incoming connections. The default configuration is enough.

Now, your nt can provide the vnc service.

3. Use vncviewer

After the vnc server is started successfully, you can use vncviewer to remotely control the desktop.

Vncviewer xxx. xxx: display number

For example, vncviewer 172.16.1.2: 1

Enter the password as required to view the Remote Desktop.

Note: viewers must work in 16-bit display mode. If your operating system does not have 16-bit color, adjust the display mode of your computer in time. Otherwise, vncviewer cannot work normally.

4. Improvement of vnc server for linux.

The Desktop Management Environment set by the vnc server on linux is twm, which is too simple.

Modify the $ HOME/. vnc/xstartup file.

Add # To the front of all content rows, and add the following at the end:

Startkde &

Of course, you can replace it with your preferred desktop. I use kde to replace twm, and the speed will be slower, but it is much more convenient to use.

Note that you must restart the vnc server.

5. Use vnc in a browser

When using vnc in a browser, pay attention to the changes in the port number.

If the vnc server is 172.16.1.2: 1, you can access http: // 172.16.1.2: 5801 using a browser.

Port number = display number + 5800

Well, the heart is better than action, just do it!

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.