How to use XDMCP for remote desktop access on Linux

In this tutorial, I will show you how to configure a Linux system to access a remote GUI using a graphical (GUI) login through the XDMCP service. Most Linux administrators work from the shell and don’t require much to connect to the X window. However, in some cases we need access to the graphical console (X window manager). For example, if the user needs to install Oracle and he / she may need to access the Linux remote GUI; then, as part of the security measures, I personally recommend disabling the X manager.

1) Edit the inittab file

Usually, in the / etc / inittab file, sysadmin will set it to level 3. So we have to change the level to 5. This makes it effective on the next restart.

#Default run level. The run level used by RHS is: # 0-stop (do not set initdefault to this) # 1-single-user mode # 2-multi-user, no NFS (same as 3 if there is no network) # 3-complete multi-user Mode # 4-Not used # 5-X11 # 6-Restart (do not set initdefault to this) #id: 5: initdefault:

2) Enable X Window Manager

Enable X Window Manager (GDM or XDM or KDM). If it is already running, you can find which X window by running the following ps command. XDM and KDM are supported on older versions of Linux. Since RHEL 5, XDM X window manager is supported.

#Ps ax | grep [gkx]dm

To enable the XDM manager, you must edit the /etc/gdm/custom.conf file as follows:

[xdmcp] Enabled = true [security] DisallowTCP = false AllowRemoteRoot = true

3) Restart X Window

Restart X Window Services using the init command:

[[email protected] ~]#Initialize 3 [[email protected] ~]#Initialize 5

4) Configure access rules

The next step will be to configure the access rules. Run the gdsetup command.

a) Click on the “Remote” tab on the GDM setup utility. Changed the style drop-down menu selection from “Disable Remote Login” to “Same”

As local “

b) Under the “Security” tab, enable “Allow local system administrator login” and “Allow remote system administrator login”

5) Restart GDM Utility

Restart the GDM utility service as follows:

[[email protected] ~]# / Usr / sbin / gdm-restart

Now you can test the X window using the following X command.

[[email protected] ~]#X -query localhost: 1

6) Open the firewall port

XDMCP uses the following ports and ensures that these ports are open in the firewall.

XDMCP 177 UDP

X11 protocol 6000-6005 TCP

xfs: X font server 7100 TCP

Sidebar