Remote desktop control in Linux

Source: Internet
Author: User
Tags pcanywhere
Article title: remote desktop control in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

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 runs very well on the LAN, so you don't have to try it when 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. linux vnc server improvement

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

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.