Xming

Trouble with Xming?

Access control

Only use Xming option -ac or 'xhost +' on trusted networks, never on public ones i.e. be careful as they grant access to everyone. The X protocol network traffic is only encrypted if using X-Forwarding with SSH and this is therefore the recommended method for access control, all others method are potentially unsafe (e.g. using xhost or xauth and especially working via the defunct Telnet or Rsh/Rlogin protocols).

Environment variables

The following Windows environment variables are created or used by the server

Variable Description
DISNO The display-number (an Xming specific convenience environment variable).
DISPLAY The [Host IP address]:display-number[.screen]. The -display option can be used by most clients to override this variable.
HOME Defaults to %USERPROFILE%.
XERRORDB Defaults to the 'path-to-Xming.exe'\XErrorDB file.
XHOSTPREFIX Defaults to the 'path-to-Xming.exe'\X and used as the file prefix for Xn.hosts files (an Xming specific convenience environment variable).
XKEYSYMDB Defaults to the 'path-to-Xming.exe'\XKeysymDB file (the file is no longer required, but a custom one can still be used).
XLOCALEDIR Defaults to the 'path-to-Xming.exe'\locale directory.

Where 'path-to-Xming.exe' is the location of the Xming executable, typically C:\Program Files\Xming.

If you run keychain for key management with SSH: you additionally get variables SSH_AUTH_SOCK and SSH_AGENT_PID. If the latter is detected by XLaunch (Run Remote/Use SSH), it runs without a Command Prompt console as an interactive password entry should not be needed.

If you mix Cygwin and Xming variables, and/or have Cygwin directories in your %PATH%, you may get unpredictable behaviour. Xming installations can co-exist with Cygwin or MSYS, but I don't support Xming run from, or concurrent with, any Linux-like environments on Windows.

Files and locations

The following files and locations are used by Xming, often in a way different from X on Linux/Unix. They are in the Xming install directory unless stated otherwise and, if customisable, are not deleted by the uninstaller.

File or Directory Description
app-defaults The directory for X client resource files.
bitmaps The directory for standard bitmap files.
font-dirs A file containing a comma-separated list of directories to add to the default font path.
fonts The directory containing Xming-fonts (if installed).
locale The directory for locale files. This is the latest list of locales.
protocol.txt The registry of protocol names used by the X server.
twmrc Tom's [sic] window manager control file, renamed from .twmrc.
Xn.hosts The initial access control list for display-number n.
Xauthority The .Xauthority file renamed and in the %HOME% directory. Empty lock files Xauthority-c and Xauthority-l are used in %HOME%, but these should not persist.
Xcms.txt The sample colour name database file.
Xdefaults                        
Xdefaults-<hostname>
The .Xdefaults file renamed and in the %HOME% directory. These files resources are loaded before app-defaults. Xdefaults can be relocated using the XENVIRONMENT variable e.g. 'set XENVIRONMENT=C:\test\Xdefaults' or just 'set XENVIRONMENT=Xdefaults' (the latter is useful if running Xming portable, when Xdefaults can be moved onto the portable device).
XErrorDB The X error message database file.
xkb The directory for xkb database files. This is the latest list of keyboard models, layouts and variants.
XLaunch.VisualElementsManifest.xml The XML document used to deploy a custom XLaunch Start screen tile on Windows 8 onwards
XLaunch.xsd The XLaunch XML Schema Definition file.
Xmingrc The Xming server resource configuration file(s).
Xming.VisualElementsManifest.xml The XML document used to deploy a custom Xming Start screen tile on Windows 8 onwards
X.Org.png The image used as the Start screen tile on Windows 8 onwards

font-dirs is typically supplied containing...

# font-dirs
# comma-separated list of directories to add to the default font path
# defaults are misc, TTF, 100dpi, 75dpi
# also allows entries on individual lines
C:\Program Files\Xming\fonts\dejavu,C:\Program Files\Xming\fonts\cyrillic
C:\Windows\Fonts
Note: font-dirs contents are matched to the actual paths found during installation (using font-dirs.exe); if an existing file does not exist.

putty.conf, the configuration file used by portable Plink (if this is selected during Xming installation), is supplied containing...

;Xming putty.conf
sshk&sess=%APPDATA%\Portable PuTTY
Note: that an Xming-portablePuTTY installation has its own separate putty.conf.

Xdefaults is supplied containing...

#ifdef COLOR
*customization: -color
#endif
xhost.bat is supplied containing...
@echo off
xhost
pause
Xmingrc is supplied as a system-wide default containing...
# Xming Server Default Resource File
# follow.exe and xhost.bat are in "Tools and clients"
Menu apps {
        "&View the log" viewlog
        "&Tail the log" execd follow
        "&Reload Xmingrc" reload
        &Usage execd "Xming :999 -help"
        "Access Control &Status" execd "xhost.bat"
        "&Command Prompt" execd cmd
        "Host &Finder" finder
        separator
}
RootMenu apps
SilentExit
Debug "Using the default Xmingrc configuration file."
X0.hosts is supplied containing...
localhost
inet6:localhost
twmrc is supplied containing [WWW]jim.twrc from X.Org's twm source code.

The following files, when they exist, are located in directories other than the Xming install directory...

File Directory
fonts.dir
fonts.scale
Windows System fonts directory (i.e. %WINDIR%\Fonts).
Xauthority %HOME%
Xdefaults                        
Xdefaults-<hostname>
%HOME%
xkb temporary files e.g.
xkb_a00560 server-0.xkm
%TMP% or %TEMP% or %USERPROFILE% or 'The Windows Directory'. First path found is used.
Xming.n.log %TMP% or %TEMP% or %USERPROFILE% or 'The Windows Directory'. First path found is used.
XmingViewLog.txt %TMP% or %TEMP% or %USERPROFILE% or 'The Windows Directory'. First path found is used.
Xmingrc %HOME% (per-user) as well as one in the Xming install directory (system-wide).

Java clients

If you are having a problem with -multiwindow mode and remote Java clients try setting the environmental variable
AWT_TOOLKIT=MToolkit
on the remote machine (untested solution for rendering some Java components on JDK 6 and earlier...widely found on the internet).

Keyboards and a change for big-endian machines

Xming keyboard data originates from the [WWW]X Keyboard Configuration Database Project.
The current list of keyboard models, layouts and variants is here.

If the keyboard doesn't work for your locale please email the part of the Xming log that looks something like

(--) winConfigKeyboard - Layout: "00000424" (00000424)
(EE) Keyboardlayout "Slovenian" (00000424) is unknown
so that the entry can be added to the known keyboard layouts.

Also try using setxkbmap, when Xming is running, if you have the wrong language variant

>setxkbmap ch -variant fr
this is equivalent to starting Xming
>Xming -multiwindow -clipboard -xkblayout ch -xkbvariant fr
I use -xkbvariant extd to get United Kingdom extended keys to work with a -xkblayout gb Microsoft keyboard.

Only on release 6.9.0.31: use the Finnish keyboard instead of the faulty Swedish one

>Xming -multiwindow -clipboard -xkbmodel pc104 -xkblayout fi

NumLock

Some Unix flavours cannot have NumLock enabled when running Xming. Disable NumLock with remote AIX, SUN Solaris and HPUX, if keys or mouse buttons are not working, using numlockoff. The numlockoff 32-bit & 64-bit zip files contains the code and executables to check the state of the NumLock key and synthesize a keydown/keyup sequence of the NumLock key if it's down.

AIX

AIX logs in using /usr/dt/config/Xsetup (used only if using dtlogin as the XDMCP client) and /usr/dt/bin/Xsession (used when logging in to CDE). These contain a call to xmodmap (for IBM keyboards) which makes the Xming keyboard go wrong. Commenting out these two calls allows you to use Xming on AIX.
Note that the XKB extension is now always enabled in the X.Org X server and that the AIX X server has the XKB extension, but it is disabled by default in favour of xmodmap methods.

In order for X-Forwarding to work sshd_config may need

XAuthLocation /usr/bin/X11/xauth
Change: AIX, and other big-endian client machines like Linux s390x, now need option +byteswappedclients when starting Xming (since release 7.7.0.87).

Mouse

If you use the Logitech Mouse Drivers: uncheck the option 'Disable Acceleration In Games' or your mouse will be slow in Xming.
Logitech web-cam drivers can also cause 'Can't open display' problems.
Zone Alarm can cause Xming to freeze right after startup.

IBM ThinkPad's with a TrackPoint mouse doesn't allow simulated mouse wheel scrolling. The TrackPoint driver tries to send scroll up/down messages to the default scrollbar in a window. Xming does not use Windows scrollbars for X client windows, so we must configure the TrackPoint driver to send standard WM_MOUSEWHEEL messages to the Xming window. This can be done by editing the TrackPoint configuration file tp4table.dat (you will have to find it). Add the following to the "Pass 0 rules" section and reboot:

; X Windows
*,*,Xming.exe,*,*,*,WheelStd,0,9

Multiplemonitors

Screens cannot be positioned on anything other than the first monitor with FullScreen Shadow DirectDraw4 (-engine 4), but are OK in Shadow GDI (-engine 1)...
>Xming -screen 0 @2 -fullscreen -multiplemonitors            renders incorrectly on the first monitor
>Xming -screen 0 @2 -multiplemonitors                        renders correctly on the second monitor
>Xming -screen 0 @2 -fullscreen -multiplemonitors -engine 1  renders correctly on the second monitor
Following on from the original [WWW]patch for multiple monitors it appears that FullScreen DirectDraw4 can only draw on the 'Windows Primary Display' irrespective of the use of SM_CXVIRTUALSCREEN etc in the code.

Network

Failure reports

any of these indicate failure of the X protocol. Maybe due to the presence of firewalls, or high network latency. The clipboard may also be failing with a buggy remote DM in XDMCP mode (you could try another DM or run without -clipboard) or, for the first two, the clipboard thread may just be about to restart. Ignore these reports during shutdown.

IPv6

IPv6 support is now built into Xming. Users of IPv4 should not be affected and can ignore log messages like...
_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/etc
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
XDMCP warning: INET6 UDP socket creation failed
Most tools, except the XDMCP interface matcher in DefineSelf(), should work with both protocols.

You can turn off IPv6 in Xming by starting it with option

-nolisten inet6         this is the default in XLaunch (when not using -find)

Network performance

SSH compression may be of some help on slower networks, but will slow things down on fast networks.

The encoding of network traffic used by the X protocol is optimised for LANs, where the time spent encoding and decoding the data is more important than minimizing the amount of data transmitted. While this is fine for an Ethernet, it becomes a problem for very slow networks like serial lines. X.Org have abandoned LBX, their own built-in compression system, in favour of using SSH compression on slow networks.

Operation via a personal firewall, VPN or any software that modifies the TCP/IP stack, will increase latency and make the X server appear unresponsive. Especially Webwasher, Symantec Antivirus and Zone Alarm. Disabling these products isn't sufficient, uninstall them to restore network performance with the X protocol. Some badly designed virus scanners aggressively interfere with all network traffic and can cause a serious processing overhead for X. Also check you are not using any of these [WWW]Intrusive Applications e.g. I turn off the Windows Defender service while running Xming.

You can use tool [WWW]autorunsc -mn to list third-party LSPs inserted in your TCP/IP protocol stack.

Nagle's algorithm is detrimental to X protocol transmission over a network and can cause a performance penalty for some applications.

See also Windows performance.

Supported transports

Only the first two connection types of the following X protocol transports are configured...

TCPCONN Enables the INET (IPv4) Domain Socket based transport
IPv6 Extends TCPCONN to enable IPv6 Socket based transport
UNIXCONN Enables the UNIX Domain Socket based transport
LOCALCONN Enables the SYSV Local connection transports

OpenGL with WGL (AIGLX)

If Xming's native Windows WGL interface for accelerated OpenGL (-wgl option) doesn't work with a program then you can switch on various diagnostic output. Start Xming with special environment variables set

Variable Description
GLWIN_ENABLE_DEBUG=1   Enable debugging output.
GLWIN_ENABLE_TRACE=1 Enable trace output.
GLWIN_DUMP_PFD=1 Output information on the requested visual and pixelformat.
GLWIN_DUMP_HWND=1 Output the window handles used in some operations.
GLWIN_DUMP_DC=1 Output the device context handle used in some operations.
GLWIN_ENABLE_GLCALL_TRACE=1 Output GL function call trace.
GLWIN_ENABLE_WGLCALL_TRACE=1 Output WGL function call trace.
GLWIN_DEBUG_ALL=1 Enable all of the above.

For example
>set GLWIN_ENABLE_DEBUG=1
>set GLWIN_DUMP_PFD=1
>Xming -wgl -multiwindow -clipboard
When testing with remote Linux clients it seems that Mesa's libGL prefers to use client-side swrast and transfer the image to the server using Xlib. To force the use of GLX so rendering is indirect (takes place on the server), and thus can be accelerated, set the environment variable...
$ export LIBGL_ALWAYS_INDIRECT=1   or use any nonzero value
on the remote machine. Check that...
$ glxinfo | grep OpenGL
mentions your Windows machine's graphics card vendor, if it mentions Mesa, you still have software rendering.

Accelerated indirect GL does not occur with local clients.

Note: Xming releases (7.5 series), used without option -wgl (i.e. just with software rasterization), render with the Mesa library (latest version: OpenGL 2.1, GLX 1.4, Mesa 21.0.0-devel) and usually display even the most difficult clients.

Portable Xming

If a normal Xming (static) installation exists on a machine a portable version (e.g. run from a USB key drive) may find it and then confuse paths. This can be fixed by unsetting environmental variable %ProgramFiles% or %ProgramFiles(x86)% before starting the alternative Xming.exe...
>set ProgramFiles=                            Unsetting the location of the normal Xming installation
>cd /d X:\Portable Xming\Xming                Directory containing an alternative Xming.exe is here
>Xming -multiwindow -wgl -clipboard

Windows performance

If you insist on running the whole of KDE or Gnome in -multiwindow or -fullscreen mode: don't expect blistering performance. Use [WWW]coLinux or [WWW]XDMCP mode if you want a full Linux/Unix graphical environment on the Windows desktop.

To get the performance benefit of the -wgl option you need an OpenGL enabled graphics card on your Windows machine. To force indirect rendering (which takes place on the server), you must...

$ export LIBGL_ALWAYS_INDIRECT=1   on the remote machine
before starting the client application. There's a performance trade-off between rendering performance and network latency, so you should try both direct and indirect rendering and see which performs best in your specific circumstances. Generally, accelerated indirect rendering should be more performant for clients that render complex scenes.

Windows versions supported

Xming installs on Windows 7 with Service Pack 1 or Windows Server 2008 R2 with Service Pack 1 onwards.

Release versions prior to NT 6.1 sp1 are not supported.

Xming and Xming-portablePuTTY, compiled 32-bit, run on 32-bit Windows and via [WWW]WoW64 on 64-bit Windows (x64 and ia64). Native 64-bit (x64) versions are also available and are preferred on 64-bit Windows (x64).

Extensions, pseudocolor and bell

Xming doesn't support the MIT-SHM, XFree86-Bigfont or XVideo extensions. MIT-SHM only applies when the client and xserver are on the same machine: adding it would not improve network performance i.e. Xming is primarily designed to operate with clients over a network.

Xming also does not yet have a working -pseudocolor mode, for 8-bit colour use -fullscreen -depth 8 in one window mode which enables DirectDraw4 (-engine 4).

Xming just uses the Windows MessageBeep(MB_OK) function for the bell: so no fine control of volume, pitch and duration is possible. However the bell (beep) can be switched off with X server option -f 0, or when the server is running, with various 'xset b' options.

XDMCP mode (and others)

Note: some of these notes are more generally applicable than just for XDMCP mode. Also first read about XLaunch XDMCP remote settings.

Table of contents

  1. Access control
    1. X-Forwarding
    2. xhost program
    3. Xn.hosts files
    4. xauth program
  2. Environment variables
  3. Files and locations
  4. Java clients
  5. Keyboards and a change for big-endian machines
    1. NumLock
    2. AIX
  6. Mouse
  7. Multiplemonitors
  8. Network
    1. Failure reports
    2. IPv6
    3. Network performance
    4. Supported transports
  9. OpenGL with WGL (AIGLX)
  10. Portable Xming
  11. Windows performance
  12. Windows versions supported
  13. Extensions, pseudocolor and bell
  14. XDMCP mode (and others)
Creative Commons License
The [WWW]Xming website, documentation and images are licensed under a
[WWW]Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales License.
Copyright © 2005-2024 Colin Harrison All Rights Reserved