Running the Linux graphical interface program using Xming+putty

Source: Internet
Author: User
Tags xming

Welcome to the big Data and AI technical articles released by the public number: Qing Research Academy, where you can learn the night white (author's pen name) carefully organized notes, let us make a little progress every day, so that excellent become a habit!

Cause
The next work to do some numerical simulation, so to Brother's workstation opened an account. The workstation is running RHEL4, to say remote SSH, even if the fterm is adequate, however, because I want to use the software to view the results of the graphical interface, this is more troublesome. With VNC, the cost of resources, and VNC in the performance of the win is not very well.
Reference
Remembering the computer experiments of the VLSI design last semester, dozens of people ran the Cadence toolset from a PC running Windows XP, using Xshell SSH to the lab Center's Sun workstation running Solaris, and that was with the GUI. So I thought, could I do the same? To the Debian Chinese and Ubuntu Chinese mailing list to send an e-mail, put forward this question, according to the list of replies, then Google a lap, organized a bit, basically understand how to do, the details of the problem is unclear, so first do it again.
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.
Xming is a simple and powerful open source x Server that can run under the m$ Xp/2003/vista operating system.
Xming's homepage:
http://www.straightrunning.com/XmingNotes/
Xming's SourceForge page:
http://sourceforge.net/projects/xming/
Download Xming-setup.exe from SourceForge (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 be consulted
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$ emacswarning:cannot Convert string "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*" to type Fontstructwarning: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.

If it doesn't come out, show no display
The following software needs to be installed:
Yum Install-y Xauth
Then quit, and then log back on.

can also be installed font
Yum-y Groupinstall Fonts

Running the Linux graphical interface program using Xming+putty

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.