Linux XDMCP Service - How to access remote Linux GUI

February 25, 2011 | By in GUI, HOWTOS, LINUX HOWTO
| 1 Reply More


Most linux admins work from shell and there is not much requirement to connect to the X window. But, in some cases, we need to access graphic console (X window Manager). For example, if a user needs to install oracle and he/she might need access to linux remote GUI; then I personally recommend to disable X manager, once the requirement is finished as part of security measures.

Step 1:

Usually in /etc/inittab file, sysadmin would be setting it to level 3. So we have to change the level to 5. This makes it effective on the 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)

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:



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.


X11 protocol 6000-6005 TCP

xfs: X font server 7100 TCP



Share This :

Free Linux Ebook to Download

Comments (1)

Trackback URL | Comments RSS Feed

  1. Victor Barrantes says:

    Im using Ubuntu 14.04 LTS. and have found no way to connect from Windows, I have read all sort of tutorials but none really works. Yours seems to go in right direction, but:
    1. There is no /etc/inittab file (what to do?
    2. ps ax | grep [gkx]dm displays nothing, is this the right command?
    3. Step 3 cannot be done until figure it out how to do #1 first
    4. Second step #3 impossible because gdsetup reports "No command 'gdsetup' found"
    5. Step 4 impossible because there is no such /usr/sbin/gdm-restart
    6. step 6 does not explain how to make sure these ports are open in firewall
    Would you mind addressing those?
    BTW, I entered the commands with sudo and without sudo, the results are the same

Leave a Reply

Commenting Policy:
Promotion of your products ? Comment gets deleted.
All comments are subject to moderation.