Linux XDMCP Service : How to access remote Linux GUI
Most linux admins work from shell and there is not much requirement to connect to the X- window. But some cases we need to access graphic console ( X window Manager). For example if a user need to install oracle and he/she might need access to Linux remote GUI. I personally recommend to disable X manager , once the requirement is finished as part of security measure.
Step 1 :
Usaully in /etc/inittab file , sysadmin would be setting it to level 3. So we have to change the level to 5. This make it effective on next restart.
# 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:
Step 2 :
Enable X Window Manager (GDM or XDM or KDM). If its already running you can find which X window by running the below ps command. XDM and KDM are supported on older versions of Linux. From RHEL 5 onwards XDM X window manager is supported.
# ps ax | grep [gkx]dm
To enable XDM manager , you have to edit /etc/gdm/custom.conf file as below.
[xdmcp]
Enable=true[security]
DisallowTCP=false
AllowRemoteRoot=true
Step 3 :
Restart X Window Services using init command
[root@Server1 ~]# init 3
[root@Server1 ~]# init 5
Step 3 :
Next step would be to configure the access rules.Run gdsetup command
a ) Click the Remote tab on GDM setup utility. Change the Style pull-down menu selection from ‘Remote login disabled’ to ‘Same
as Local’
b) Under the Security tab enable “Allow local system administrator login” and “Allow remote system administrator login”
Step 4 :
Restart GDM utility service as below
[root@Server1 ~]# /usr/sbin/gdm-restart
Step 5 :
You can now test X window using the below X command
[root@Server1 ~]# X -query localhost :1
step 6 :
XDMCP are using the below ports and make sure these ports are open in firewall.
XDMCP 177 UDP
X11 protocol 6000-6005 TCP
xfs: X font server 7100 TCP
Category: Linux Administration

