Xming + PuTTY remote Linux host under Windows

Source: Internet
Author: User
Tags fontstruct xming

Xming + PuTTY remote Linux host under Windows

First, the principle
The Linux/unix X window has network transparency. The X window System has a unified server that is responsible for each program's interaction with input such as displays, keyboards, and mice, and each GUI-based application interacts with the server through a network protocol. So for any application, the difference between running locally and running remotely is that the X server has a different address than the other. So running an X Server in Windows makes it easy to run Linux applications with GUIs remotely. At the same time, OpenSSH has the X-forwarding function, which can forward the X program of the Linux host to the client through the SSH pipeline. Thus, through the putty to the host, and then the received host forwarded by the X program's interaction with the local Windows system running under the X server to manage and display, in principle, this can be implemented remotely using Linux GUI program.

Configuration required on the host:
#vi/etc/ssh/sshd_config

Uncomment this line-if you do not have this line, add it manually:
x11forwrding Yes

The purpose of this configuration is to allow the X-forwards of SSH. In essence, this is a certain security risk, SSH does not guarantee the security of your data, but, in general, this is enough.

Second, installation xming
You need to run an X Server on your local windows. There are many options: Cygwin x server is probably the most famous, but for such a small thing to install a "relatively large" cygwin, it seems a bit exaggerated, in addition to Cygwin, there are two famous commercial software can choose, Xwin32 and Xmanager, Last semester IC experiment with is xmanager, feel very smooth very good, however, although Xmanager can try, but after all, still is commercial software; There is also a choice, is here to speak, open source software xming.

Download Xming-setup.exe (the latest version is 6.9.0.31), installed locally. The first runtime uses the Xlaunch in the Start menu to start, producing an initial configuration file. For simple use, no special configuration is required, and everything is used by default. The specific configuration and use of xming can refer to Xming's manual. Remember the numbers in the "Display number" indicated in, using the default 0.

When the boot is complete, an "X" icon appears in the tray area, which means that the xming is already running, hovering over it and seeing the "Display number" currently in use.

Third, configuration putty
Windows has a lot of support ssh/telnet and other remote login protocol clients, such as SECURECRT, Xshell, Putty, and so on, even everyone used to login BBS irrigation with the fterm have SSH features, Just not as Putty software professional and powerful.

I use the famous free putty, I believe many people's choice is also like me. Therefore, we will not repeat the configuration and use of putty. The point here is to add Putty support for x forwarding. Run putty, in the configuration screen, select "Connection-ssh-x11", select "Enable x11forwarding", "X display Location" in the first step of "display number" in the numbers (here is "localhost:0").

Then connect to log in to the remote host and look like everything looks normal.

iv. Problems and Solutions
So try to run Emacs! Hey! The graphical interface did come out, just, I can not see the text, all are some squares ah?

Look at the output information of the terminal:
-bash-2.05b$ Emacs
Warning:cannot Convert string "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*" to type Fontstruct
Warning:cannot Convert string "-*-helvetica-medium-r-*--*-120-*-*-*-*-iso8859-1" to type Fontstruct

Oh, the original is xming no corresponding font!

Go to Xming's homepage to check Manual, you can add Windows system fonts for xming, or you can use the fonts provided by Xming.

Using the fonts provided with Xming is very simple, download xming-fonts-setup.exe from the SourceForge page of Xming (the latest version is 7.3.0.15) and install to the Xming installation path. My Xming installation path is D:\Program\Xming\, the font path after the font is installed is D:\Program\Xming\fonts\. After testing, this installs the font, the running Emacs font can display normally.

If you don't want to install fonts, you can naturally let xming use Windows system fonts. But how to configure it?

Remember how to add fonts under Linux? By the way, to generate the cache file for fonts, the tool used is mkfontscale.

To do this, download the xming-tools-and-clients from the Xming SourceForge page and unzip the installation path to xming. Switch to the Windows cmd (Command Prompt), CD-to-xming directory, and execute the following command:

>mkfontscale c:/windows/fonts
>mkfontscale-b-s-l c:/windows/fonts #ignore the ' couldn ' t...fon ' messages

Then edit | Xming the Font-dirs file under the installation path, add the font path:
C:\WINDOWS\Fonts

Remember: While under Windows, it's still a good practice to be aware of case sensitivity.

Ok! Try again, hey, is this emacs more normal?

Little tips: Use your firewall to block xming access to the network. Because such an X server is inherently unsafe, and you don't need it to be networked, because you're only using it natively.

Feel: xming overall is not as good as xmanager, running smooth degree or there is no small gap, especially the mouse movement, feel a meal, even in the LAN, the situation is not particularly much.

PuTTY + Xming remotely using the Linux GUI by zw1840 on October, 10:01 AM | No Comments | No TrackBacks

Using VMware as a database for Oracle Enterprise Linux VMS on your PC, virtual machine OEL does not have a graphical interface enabled, so you need to have an X Window server on your PC to use the GUI.

See the wiki for a systematic look at the X Window System. The X Window System (commonly referred to as X11 or X) is a set of windowing System,x GUI environments based on the X Display protocol, including window drawing, movement, and interaction with input devices such as the mouse and keyboard. The current version of the X protocol is the 11 edition that MIT made in September 1987----This is the origin of X11, the latest edition is the x11r7.4 released in September 2008.

X takes the C/S model: one x Server and multiple application (client) communications. The server receives the client's request drawing window and passes the input from the mouse, keyboard, and other devices to the client.

Novice x users are often described how to remotely use the Linux GUI environment of documents confused: The application on the Linux host is called the client, and the user terminal computer is called the server, it seems that the reverse. In fact, X is described from the perspective of the program structure rather than the user or hardware environment, and X server working on the user terminal serves the application, so it is considered a server, and the application on the Linux host receives the service, so it is considered a client.

X server and client can reside on the same computer, such as a desktop environment such as KDE, which is used on a Linux host. X server can also communicate with the client through homogeneous networks, heterogeneous networks, or the Internet.

The communication between X server and client is not encrypted, and this problem can be solved by SSH. SSH is the short name of Secure shell, and SSH can be seen as a communication encrypted compressed version of Telnet. I need to use the forwarding function of SSH, when x server and client computer both support the SSH protocol, the unsecured TCP/IP connection between x server and client can be forwarded to the SSH connection established between the two (forwarding).

Having said a bunch of concepts, you can now pull up your sleeves and work. Linux hosts (A, ip:192.168.1.201) and Windows clients (B, ip:192.168.1.101) are all installed, and all I have to do is install an X server on B, an SSH client, and SSH enabled on a X11 Forwarding

1 on the installation configuration B X Server

X server I chose Xming, which is a free x server on the Windows platform. Need to install two components, main program and font

    • Xming X Server, Xming-6-9-0-31-setup.exe
    • Xming Fonts, Xming-fonts-7-3-0-22-setup.exe

Run Xlaunch configuration xming X Server and save the configuration as a. xlaunch file. You can use the default settings.

Display represents a set of I/O devices, including displays, mice, keyboards, and display number is the code for this I/O device, and display numbers also determines the TCP port for Xming X server with the port 6000 + Di Splay number. The application on the Linux host establishes a connection to the Xming X server through this port.

Save the configuration as Xming.display.0.xlaunch. Double-click on this file to start X server, with a xming icon in the system bar.

2 Installing SSH on configuration b

SSH client using Putty,putty is Freeware+greenware, just an EXE file.

Configure Session: Configure host IP, connect as SSH

Connection\data: Save the user name used by the connection

Connection\ssh\x11:enable X11 forwarding,x Display location is localhost:0, where 0 is the display number specified when configuring Xming X server.

Save the setting to VSERVER01.

3 Configuring SSH on a

To allow SSH x forwarding on a Linux host, view the/etc/ssh/sshd_config file, add the following line,

x11forwrding Yes

the configuration is complete. Use putty on B to connect to a, enter Xclock &, and you can see the effect of X server working.

Reference

"1" X window System
Http://en.wikipedia.org/wiki/X_Window_System

"2" SSH

Http://en.wikipedia.org/wiki/Secure_Shell

"3" Xming http://www.straightrunning.com/XmingNotes/"4" PuTTY http://www.chiark.greenend.org.uk/~sgtatham/putty/"5 "Putty + Xming convenient remote Linux guihttp://cluno.blogspot.com/2007/04/putty-xming-linux-gui.html" 6 "Xming + Putty Programs that use the graphical interface for remote Linux hosts under Windows
Http://hi.baidu.com/mooncold/blog/item/8e0dfddc4f29a3a4cd11663a.html Tags:
    • Freeware,
    • Unix
No TrackBacks

TrackBack URL:HTTP://WWW.ZW1840.COM/MT/MT-TB.CGI/8

Leave a commentsign in to comment.

Xming + PuTTY remote Linux host under Windows

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.