GDM and XDMCP configuration for remote graphical Linux desktop access
Linux installations default to a secure configuration which does not allow remote graphical logins or remote desktop access. This tutorial details configuration changes to allow remote access using X-Windows XDMCP and GDM (GUI login).
Typically Linux configures the choice of a text console login or a graphical GUI login in the init script configuration file /etc/inittab. In order to allow remote a GUI login, the system itself must be configured for a X11 GUI login.
# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:
(Partial file listing)
Note that this shows a run level of "5" for a Red Hat / Fedora / CentOS based configuration.
Ubuntu:
Start GDM manually with the command: /etc/init.d/gdm (This can be added to the system init process: ln -s /etc/init.d/gdm /etc/rc2.d/S13gdm)
or
add to /etc/inittab or /etc/rc.local
x:2:respawn:/usr/sbin/gdm
Ubuntu uses runlevel 2-5 as regular multi-user mode.
Granting MS/Windows users remote GUI access to your system:
XDM login manager:
Edit file:
Red Hat: /etc/X11/xdm/Xaccess
Suse: /usr/X11R6/lib/X11/xdm/Xaccess
Change from:
# * #any host can get a login window
To:
* #any host can get a login window
Edit file: /etc/X11/xdm/xdm-config
Change last line from:
!DisplayManager.requestPort: 0
To:
DisplayManager.requestPort: 0
System default for RHEL4/FC3.
GDM login manager:
Edit file:
Red Hat Enterprise 5, CentOS 5: /etc/gdm/custom.conf Note: RHEL5 only uses this file as XDM is no longer supported.
Add two enties to the existing categories:
[xdmcp]
Enable=true
[security]
DisallowTCP=false
One can also use the GUI config tool /usr/sbin/gdmsetup.
Red Hat Enterprise 3/4, CentOS 3/4, Fedora 1-6: /etc/X11/gdm/gdm.conf
Change last line from:
[xdmcp] Enable=false
To:
[xdmcp] Enable=true
One can also use the GUI config tool gdmsetup.
Restart X-Windows:
[root]#init 3
[root]#init 5
Note:
You can use the config tool /usr/sbin/gdmsetup to configure GDM.
You can test the GDM login screen locally: X -query localhost :1
gdmsetup: This GUI will edit the configuration GDM configuration file.
Red Hat Enterprise 5, CentOS 5: /etc/gdm/custom.conf
Red Hat Enterprise 3/4, CentOS 3/4, Fedora 1-6: /etc/X11/gdm/gdm.conf
Select the check box "Enable XDMCP":
Remote X server access for MS/Windows:
Open Source MS/Windows PC X-Windows server software:
Xming - [instructions] - X-Windows for MS/Windows - My preferred choice!