Welcome to Part 3 of Linux Remote Desktop Series. I highly recommend that you see the basic assumptions and background before you read this any further.

What we will learn: So far we have learnt how to do remote desktop with “Desktop Sharing” i.e. the person who connects remotely share the same desktop screen with the person who is sitting on the actual machine. This method is not very convenient in cases where you need to have multiple user logging remotely to the Linux host/server at the same time. The Windows equivalent of this method is called “Terminal Server”.  Fortunately it is very easy in Linux to achieve the same functionality and this is what we are going to learn in this part.

Here we will achieve this by using the XDMCP protocol. Although people say that the XDMCP HOWTO is pretty easy to follow but I personally got lost after reading few pages and hence I decided to write this blog post. There are other methods/protocol to achieve this but I am going to use XDMCP for now.

Step 1: Enable XDMCP

Do the following on your Machine 1 – the remote Linux machine on which you would like to log in remotely. I will show you how to do this with GDM. From the GDM login screen, click “Actions” to get the following screen:

Enable XDMCP

Now click on “Configure the login manager” and then hit “OK” to get the following screen:

Enable XDMCP

Now go to the “Remote” tab and click on the drop-down menu and select “Same as Local” option like the this:

Configure XDMCP

Click “Close” and you will see your regular GDM login screen.

Step 2: Check XDMCP Let’s check if the XDMCP protocol is really enabled or not. First log into your Machine 1 and give the following command:

netstat -a | grep xdmcp

and you should see something like this:

udp6       0      0 [::]:xdmcp              [::]:*

The above output means that XDMCP is enabled successfully on your Linux Remote Server (Machine 1).

Step 3: Connect from Windows Machine

Now we have configure our Linux remote machine to accept incoming connection from different clients. Now there are lots of X server clients available for Windows XP which can connect to a remote Linux host (Machine 1). My favorite is Xming. You can download the Windows executable setup file from here.

After installing Xming, click on the XLaunch icon on your Desktop and select “One window” and Display number “0” as shown below:

Configure Xming

Click “Next”and select “Open session via XDMCP” as shown below:

Configure Xming

Click “Next” and enter the IP address of your Linux Remote Host (Machine 1) in the “Connect to host” input box as shown below:

Configure Xming

Click “Next” and click “Next” again to get the following screen:

Configure Xming

Now at this point of time you can click on “Save Configuration” and it will ask you for a file name. So next time when you want to connect to your Machine 1 you just have to click on the file that it created with the file name that you provided and you won’t have to do the above steps every time you need to connect. In any case, click on “Finish” and you should be able be able to see a GDM login screen of your Machine 1 like this:

Xming Remote Login

Yes believe it or not, we are done here. Now you can log into your Machine 1 from your Windows XP (Machine 2) using any username/password which exits on your Machine 1. As you may have noticed the difference that in this method we actually need to supply a username/password to log in whereas in the previous methods we just use to connect to the Desktop of Machine 1 and we use to see whatever was actually there on the physical console/screen of Machine 1.

Furthermore, suppose your friend who also has a login account on Machine 1 wants to connect to it from his/her Windows XP machine using Xming. No problems, he/she can exactly follow the same steps as mentioned in Step 3 and he/she will also be able to connect remotely simultaneously along with you.

Moreover, suppose the administrator of Machine 1 (root user) is also sitting physically on Machine 1 and doing some administrative tasks. Guess what, he/she can continue to do the work while you and your friend log in and out of Machine 1 from your Windows XP machine.

Now you can show off your Linux Sysadmin skills to your friends!

Happy XDMCP’ing!

In our next part, we will see how to connect from another Linux machine using XDMCP instead of Windows XP machine.

Part 4: Connect to remote Linux server with XDMCP protocol from another Linux machine

Be Sociable, Share!