I am interested in understanding the meaning of the display name, “
:0.0“, on Windows. Additionally, I would like to know where Xming puts its listener socket for others to discover, and where PuTTY connects to when I set the “Display location”.
Furthermore, I am curious about the Windows equivalent of a “unix domain socket”. Lastly, I am wondering who sets the standard for managing these displays on Windows and where I can locate it.
Xming and the Windows Equivalent of /tmp/.X11-unix/X0
Xming is an open-source X Window System server for Microsoft Windows that allows you to run graphical Linux applications on your Windows desktop. When using Xming, the Windows equivalent of “/tmp/.X11-unix/X0” is the display name “:0.0”. This display name is used to identify the X server instance that is running on your Windows machine.
The display name “:0.0” can be broken down into two parts: the display number and the screen number. In this case, the display number is “0”, and the screen number is “0”. The display number identifies the X server instance, and the screen number identifies the physical screen that is being used.
When you start Xming, it creates a listener socket on your Windows machine that other applications can use to connect to the X server. By default, Xming creates the listener socket at “127.0.0.1:6000”, which is equivalent to the UNIX domain socket “/tmp/.X11-unix/X0”. This means that other applications can connect to the X server by using the display name “:0.0” and specifying the IP address and port number of the listener socket.
When you use PuTTY to connect to a remote Linux machine and forward X11 traffic, you can specify the “Display location” to tell PuTTY where to connect to the X server. By default, PuTTY uses the display name “:0.0” and connects to the listener socket on your Windows machine at “127.0.0.1:6000”.
Xming Listener Socket and PuTTY Connection
As mentioned earlier, Xming creates a listener socket on your Windows machine that other applications can use to connect to the X server. By default, Xming creates the listener socket at “127.0.0.1:6000”. This listener socket is used by PuTTY to forward X11 traffic from the remote Linux machine to your Windows desktop.
When you use PuTTY to connect to a remote Linux machine and forward X11 traffic, PuTTY creates a secure tunnel between the remote machine and your Windows machine. PuTTY then uses the display name “:0.0” to connect to the X server on your Windows machine through the secure tunnel.
Once the connection is established, PuTTY forwards X11 traffic from the remote Linux machine to the X server on your Windows machine. This allows you to run graphical Linux applications on your Windows desktop as if they were running natively on your machine.
Windows Equivalent of a Unix Domain Socket
A Unix domain socket is a type of inter-process communication (IPC) mechanism that allows processes on the same machine to communicate with each other. It is similar to a network socket, but it does not use the network stack and is only accessible locally.
On Windows, the equivalent of a Unix domain socket is a named pipe. A named pipe is a type of inter-process communication mechanism that allows processes to communicate with each other using a pipe-like structure. Named pipes are only accessible locally and do not use the network stack.
Named pipes are commonly used on Windows for inter-process communication between services and applications. They are also used by some Unix applications that have been ported to Windows to communicate with other processes on the same machine.
Standard for Managing Displays on Windows
The standard for managing displays on Windows is the Windows Display Driver Model (WDDM). WDDM is a display driver architecture introduced in Windows Vista that provides a modern, scalable, and reliable architecture for display drivers.
WDDM provides a number of features for managing displays on Windows, including support for multiple monitors, high-resolution displays, and advanced graphics features. It also provides a standardized interface for communication between the operating system and display drivers, which helps to ensure compatibility and reliability.
In addition to WDDM, there are several other standards and protocols that are commonly used for managing displays on Windows, including the Graphics Device Interface (GDI), the DirectX API, and the OpenGL API.
Locating WDDM and Other Display Management Standards
WDDM and other display management standards are built into the Windows operating system and are typically installed automatically when you install Windows. You can find more information about WDDM and other display management standards on the Microsoft website or in the Windows documentation.
To access the Windows documentation, open the Windows Help and Support Center by clicking the Start button, typing “help” in the search box, and then clicking Help and Support. From there, you can search for information about WDDM and other display management standards.
You can also find more information about WDDM and other display management standards by searching online. There are many resources available that provide detailed information about these standards, including tutorials, forums, and documentation.
On Windows, Xming uses a named pipe for communication between the X client (the application that is running on the remote system and displaying its output on the local system) and the X server (Xming). The named pipe is used in place of a Unix domain socket, which is used on Unix-like systems like Linux and macOS.
The “display name” that you mention, such as :0.0, refers to the display number and screen number of the X server. The display number (:0 in this case) refers to the instance of the X server that is running, while the screen number (0 in this case) refers to the screen within that instance of the X server. The display name is used to specify which X server and screen an X client should connect to.
When you set the “Display location” in PuTTY, you are specifying the display name of the X server that you want to connect to. PuTTY will then use the named pipe that Xming has created to connect to the specified X server and screen.
The standard for how displays are managed on Windows is the X Window System, which is an open standard for graphical user interfaces (GUIs) that was developed at MIT in the 1980s. The X Window System is used on many different operating systems, including Unix-like systems like Linux and macOS, as well as on Windows with the help of tools like Xming. You can find more information about the X Window System at the following links:
- The X.Org Foundation: https://www.x.org/
- The X Window System Wikipedia page: https://en.wikipedia.org/wiki/X_Window_System
To continue, the “Display location” in PuTTY specifies the display name of the X server that you want to connect to. The display name is in the format “hostname:display.screen”, where “hostname” is the hostname or IP address of the system running the X server, “display” is the display number of the X server, and “screen” is the screen number within that display.
For example, if you set the “Display location” in PuTTY to “localhost:0.0”, this tells PuTTY to connect to the X server running on the local system (localhost) at display 0, screen 0.
On Windows, Xming creates a named pipe for each display and screen that it is running. The named pipes are used in place of Unix domain sockets, which are used on Unix-like systems. The named pipes are created in the \\.\pipe\Xming directory, and are named according to the display and screen number of the X server.
For example, if Xming is running display 0, screen 0 on the local system, it will create a named pipe named \\.\pipe\Xming\X0-lock and another named pipe named \\.\pipe\Xming\X0. These named pipes are used by the X client (the application running on the remote system) to communicate with the X server (Xming) and display its output on the local system.
I hope this information helps to clarify how display names and named pipes are used in the X Window System on Windows. Let me know if you have any further questions or if there’s anything else I can help with.
Xming and PuTTY utilize TCP sockets on the loopback address, with an empty host name being equivalent to “localhost”. The TCP port numbers for X11 start at 6000 for display :0, 6001 for display :1, and so on.
This behavior is not specific to Windows, as X was originally created as a TCP/IP protocol and has been used in that manner for many years. This is why “xauth” and the concept of an “X server” exist. It is the natural alternative when local sockets are not available.
Despite this, Windows NT has similar alternatives to Unix domain sockets. Named pipes on Windows are bidirectional and can be packetized. Although they have paths, they only exist in a virtual “pipefs” and not as real filesystem entries, making them closer to Linux abstract namespace sockets than regular ones.
In addition, Windows 10 has added the AF_UNIX socket type in release 1803, but it is unlikely that any software currently uses it.
Libraries like Cygwin or libassuan also simulate Unix sockets through loopback TCP, although not always in a compatible manner.