This is a cache of https://www.uibk.ac.at/zid/systeme/hpc-systeme/common/software/putty-xming.html. It is a snapshot of the page at 2024-11-29T00:01:57.533+0100.
Setting up Your Windows PC With Putty and Xming

To access our HPC servers, you need a terminal emulator, an SSH client, and optionally (if you plan to use GUI programs on the server) an X11 server on your PC. These components are normally present on a Linux PC. For a Windos PC, we recommend Putty (SSH client with terminal emulator) and Xming (X11 server).

Setting up Putty

Download the Putty terminal emulator from
http://www.putty.org/
Install, start and enable X11 forwarding in Connection/SSH/X11. Save this to defaults.

Putty by default has key and mouse bindings different from Xterm. To get xterm-like behaviour (keyboard, mouse) in Putty, run the following registry file in your windows machine.
putty-settings.reg. For details about xterm, see below (Xterm Usage Notes).

Setting up the Xming X11 Server

Xming is the X11 server recommended by the ZID. It integrates GUI applications running on remote machines into your Windows desktop.

Install newest version of Xming from ZID

The University has a campus license for Xming.

To install, go to https://orawww.uibk.ac.at/apex/prod/f?p=swv (only available to University employees), log in and search for Xming. Order the Xming software and follow the download and install instructions you will receive by email.

Alternative version

On the official Xming web page http://www.straightrunning.com/XmingNotes/ you will find an older freely available version of Xming. Install this if you have no access to above software download. Some users have reported trouble with clipboard integration for earlier versions of this release. This seems to have been fixed.

Install Fonts from Xming Home Page

The Xming package comes with a minimal set of fonts suitable only for low resolution monitors. For any reasonable work, you need to download Xming-fonts from
http://www.straightrunning.com/XmingNotes/
and install them into the default target directory (which should already exist after installing Xming). Make sure that TrueType fonts are selected for installation.

Set Xming Screen Resolution

Estimate the DPI resolution of your monitor by dividing its number of horizontal pixels by its width in inches.
Example: 1920 pixels on a 44 cm wide monitor yields
( 1920 pixels ) / ( 44 cm ) * ( 2.54 cm/inch ) ~= ( 110 pixels/inch)

Attach Xming to the task bar. Call the context menu, select properties, and add the monitor resolution (-dpi nnn) to the xming command line.

Example:

"C:\Program Files\Xming\Xming.exe" :0 -resize -clipboard -multiwindow -nolisten inet6 -dpi 110

Modify the DPI value according to your needs.

Set Up X Client Initialization

By default, Xterm uses obsolete bitmap fonts. To ensure that Xterm uses the scalable TrueType fonts installed above, copy this Xdefaults file to $HOME/.Xdefaults (please note the dot and the capital X) on all hosts where you plan to run Xterm. Review this file according to your needs and modify the Xterm face-size setting if necessary.

Note that $HOME/.Xdefaults will be read by X clients and so needs to be copied to every host that you are planning to use. An alternative is to load these settings into the X Server once after it has started. By convention, the file containing these settings is called $HOME/.Xresources and needs to be loaded into the X server with the command xrdb -load $HOME/.Xresources after each start of the X server. This normally happens automatically when you log in to a Linux desktop.

However, so far, we are currently not aware of a method to automate this using only Xming methods (request for enhancement sent to developer). So on your preferred host, copy the .Xdefaults file to .Xresources and perform the command xrdb -load $HOME/.Xresources each time after you start Xming. After this, X clients will ignore any $HOME/.Xdefaults files and use the settings that you loaded with xrdb.

Start the Xming X11 Server

On first start, you will get a firewall warning. Accept. Any subsequent start will just cause a tiny Xming icon to appear in the right hand side of the taskbar. After a few seconds, this icon will disappear. Your PC is ready to display X clients.

To stop the Xming icon from bing hidden in the system icons tray, on Windows 10, go to < windows settings / taskbar / select which icons appear on the taskbar > and turn on the Xming Server icon. In Windows 7, customize the taskbar and select <icon and notifications> for Xming.

Remarks on Font Sizes

Three factors influence the display size of fonts:

  1. the Face-Size setting in your .Xdefaults or .Xresources file,
  2. the DPI setting of your Xming command line as described above, and
  3. the overall scaling of the display in Windows 10 settings < Settings / System / Display / Change the size of text, apps, and other items >

Note that the first setting can be modified individually for every program, whereas the second and third settings are global. The third setting can be automatically changed when you connect a different monitor or beamer and thus can be used to ensure satisfactory size of fonts across various displays or beamers.

Xterm Usage Notes

Xterm is a VT100/VT220-compatible terminal emulator which allows you to run an arbitrary number of local and remote terminal sessions on your display running an X11 server. Although countless terminal emulators are delivered with various Linux distributions, Xterm is still the most commonly accepted terminal emulator for typical HPC servers.

Xterm is quite powerful, but somewhat non-intuitive to use (MIT Athena widgets), because its usage model predates more recent generations of user interfaces (e.g. Motif, SAA and Ribbons) and does not offer the degree of visibility and discoverability of modern GUI driven programs.

When you try out the following while you are reading, start an xterm window and use a command such as ls -l /usr/bin and then cat some-c-program.c (or some other program in your preferred programming language) to get some output in the window.

Scrolling in the Text Buffer

The size of the grey area in the scroll bar is proportional to the visible size of the window relative to the current total size of the text buffer. Left/Right mouse click in the scroll bar allows you to scroll forward/backward in the buffer. The amount of lines scrolled depends exactly on how far the mouse pointer is from the top of the window: it scrolls as many lines. For example, with the mouse pointer at the top, you may scroll by individual lines, in the middle by half a window size, at the bottom by the entire window size.

Holding down the shift key, the PageUp and PageDown keys allow you to scroll by half a window size.

Dragging the middle mouse button in the scroll bar allows you to quickly navigate in the entire text buffer.

Please note that these scroll actions happen within the text buffer of the terminal. They do NOT allow you to scroll in programs that have their own scroll functions such as editors or less(1).

Copy/Paste Mouse Actions in Text Area of Xterm Window

The left mouse button selects text (drag or click). The right mouse button extends or reduces a selection in both directions and from both ends. This is similar to the (SHIFT + left mouse button) feature in newer GUI programs, but it also allows to modify the beginning of the selection.

The middle mouse button "pastes" the selection, i.e. the contents of the selection is written to the window's input stream as if typed. The mouse pointer's position in the text area is ignored in this case.

Single click selects (left) or extends (right) single characters. Double click selects/extends words. Triple click selects/extends lines. Paste with middle mouse button. By mixing typing, selecting and pasting, you can easily build commands using previous output. For pasting, you need not move the mouse pointer to the insert point.

What constitutes a word is configuration dependent. The original definition is quite convenient for programmers - a word is a syntactic token as in most modern programming languages. Unfortunately, many newer Linux distrubutions have messed with these definitions to make them more suitable for text processing, making selections in programs a pain. In the present description, you will find a .Xdefaults file with definitions that restore the classic behaviour.

Control key + left/middle/right button brings up three popup menus (Main Options/VT Options/VT Fonts). These allow you to set some terminal emulations options and behaviour serttings, to send signals to processes, set font size, etc.

Integration of Windows Clipboard

The X Window System has two separate buffers that allow Copy/Paste actions: the (older) Primary Selection and the Clipboard. Xterm - by default - uses the Primary Selection. Newer X clients use the Primary Selection for Copy/Paste actions initiated via the mouse buttons. When you use <CTRL-C>, <CTRL-X>, and <CTRL-V> (or the Copy/Cut/Paste GUI menu items) instead, these clients use the Clipboard. This distinction is important if you use a typical Linux X Server in its default configuration.

If you use the .Xdefaults file presented above, Xterm's selection will go to the X Clipboard, which improves its usability and integration with other X clients.

Xming's default settings (see above command line) connect the X Primary Selection as well as the X Clipboard with the Windows Clipboard, so the distinction between the three is irrelevant, any you get smooth interoperability between various types of X clients and Windows applications.

Nach oben scrollen