Terminal Server or Fast User Switching

When multiple users may start X servers on same computer, each X server must have a unique display number.

Instead of specifying a display number using the :display_number option, such as :0, starting the X server with the -displayfd option, locates an unused display number and writes it to the specified file descriptor.

startx, xinit and startxwin notice this option, and transparently use it to determine the display number for any clients they start, and then pass on the display number to the specified file descriptor.

Note: It may be necessary to also use the -engine 1 option (GDI drawing) for the X server windows to draw correctly when connecting to a Terminal Server using RDP, depending on the Windows version and/or graphics driver in use.

Note: Automatically communicating the allocated display number to all future X clients started by the user who started the X server is left as an exercise for the reader.