Howto: Linux set up the X Window System to allow remote X sessions via the XDMCP

Q. How do I set up the X Window System to allow remote X sessions via the XDMCP?

ADVERTISEMENTS

A. You need to enable XDMCP by modifying Xaccess file. XDMCP is X display manager that runs as a program, allowing starting a session on an X server from the same or another computer (so that remote system can connect it).

A display manager presents the user with a login screen into which to insert username and password. A session starts when the user successfully enters a valid combination of username and password.

X11R4 introduced the X Display Manager Control Protocol (XDMCP) in december 1989 to fix problems in the X11R3 implementation. (see wiki article for more info)

Open /etc/X11/xdm/Xaccess file
# vi /etc/X11/xdm/Xaccess
Put the (or uncomment) the asterisk (*) which means anyone can login.
*

If you want, allow access from foo.nixcraft.com display only just put:
Foo.nixcraft.com
If you want, allow access from any display in nixcraft.com domain:
*.nixcraft.com

Save and close the file. Open file /etc/X11/gdm/gdm.conf
# vi /etc/X11/gdm/gdm.conf

Find out the line which read as
# /etc/hosts.deny to only allow say local access.
# Enable=false
Replace Enable=false with Enable=true
Enable=true

Restart gdm to take effect.

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
0 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.