ArchWiki / XDMCP
ArchWiki / XDMCP
From Wikipedia:
The X Display Manager Control Protocol (XDMCP) uses UDP port 177. An X server requests that a display manager start a session by sending a Query packet. If the display manager allows access for that X server, it responds by sending a Willing packet back to the X server.
This allows for opening X sessions remotely.
XDMCP is, similarly to telnet, doing unencrypted authentication. If snooping is possible, this leaves the system vulnerable to attack. It is disabled by default, using an ssh tunnel for X traffic is preferred.
Setup graphical logins
XDM
Comment the last line of the configuration file with a !:
!DisplayManager.requestPort: 0/etc/X11/xdm/xdm-configThen allow any host to get a login window in by un-commenting the following:
* #any host can get a login window/etc/X11/xdm/XaccessIn case you have multiple network interfaces also add a line like this:
LISTEN 192.168.0.10Where 192.168.0.10 is your server IP address.
Then restart xdm.service.
GDM
Enable XDMCP in the configuration file:
[xdmcp]
Enable=true
Port=177/etc/gdm/custom.confThen restart gdm.service.
LightDM
Enable the XDMCP Server in the configuration file:
[XDMCPServer]
enabled=true
port=177/etc/lightdm/lightdm.confOn a headless system, disable the automatic start of one seat so that LightDM can run in the background:
[LightDM]
start-default-seat=falseThen restart lightdm.service.
Accessing X from a remote machine on your LAN
You can access your login manager on the network computer (using 192.168.0.10 in the following command). TCP and UDP streams are opened. So it is not possible to access the login manager via an SSH connection.
$ Xnest -query 192.168.0.10 -geometry 1280x1024 :1Or, with Xephyr, if you experience refreshing problems with Xnest:
$ Xephyr -query 192.168.0.10 -screen 1280x1024 -br -reset -terminate :1Or, if you are on runlevel 3
$ X -query server addressXserver should recognize your monitor and set appropriate resolution.
You can enable XDMCP Direct/Query and Broadcast connections from remote hosts without XDM starting a local X server.
After allowing XDMCP access as described above, edit /etc/X11/xdm/Xservers and comment out:
#:0 local /usr/bin/X :0Then launch XDM as root, e.g. xdm -config /etc/X11/xdm/archlinux/xdm-config
Thin client setup
First of all one should setup dhcp and tftp server. Dnsmasq has both of them. For network boot image check thinstation project. If your network card does not support PXE, you can try Etherboot
GUI-based Clients
Xming for Windows
Troubleshooting
Session declined: Maximum Number of Sessions Reached
Edit /etc/gdm/custom.conf and increase MaxSessions. It is worth noting that there may be a limit regarding how many XDMCP connections are allowed at once, so it's worth increasing DisplaysPerHost as wellhttps://netsarang.atlassian.net/wiki/spaces/ENSUP/pages/109052165/Session+declined.+Maximum+number+of+open+sessions+from+your+host+reached if multiple clients are connecting from the same IP.
[xdmcp]
Enable=true
MaxSessions=X
DisplaysPerHost=X