Access NT terminal servers remotely with rdesktop and PXES

Any utility that makes it easier for Linux clients to access Windows Terminal Server is worth a look, but there are two such utilities you can use with Windows NT/2000: rdesktop and PXES. We'll also look at connecting remotely with VNC.

Enabling remote access to Windows NT/2000 Terminal Server from Linux clients is becoming a common requirement for IT professionals. Any utility that makes these connections easier is well worth a look, and rdesktop and PXES (Intel Pre-Execution Environment Specifications) make it about as easy as possible. I’ll provide you with the information to install and run rdesktop and PXES, which I feel are two of the best solutions out there.

The rdesktop utility runs natively in Linux/UNIX
Windows Terminal Server uses the Remote Desktop Protocol (RDP) to provide client access to the terminal server. The rdesktop utility is an implementation of RDP that runs natively under any Linux or UNIX client running X-windows. To use it, you first need to download the latest version of rdesktop. For this article, I used version 1.1.0 on a system running RedHat 7.3. In addition to XFree86 running on the client computer, you must also install the XFree86 development libraries. You install the development libraries with the following command:
rpm -ivh XFree86-devel-4.2.0-8.i386.rpm

The name and location of this package will depend on the distribution being used.

Building and installing rdesktop
Once you’ve downloaded rdesktop, unpack the source code with the command:
tar -zxvf rdesktop-1.1.0.tar.gz

Enter the rdesktop 1.1.0 directory created when the code is unpacked. Next, configure the source code, compile the program, and install rdesktop with the following series of commands:
make install

Running rdesktop
Running rdesktop is very easy. The rdesktop command uses the following format:
rdesktop <options> <Server-IP or Server-name>

For example, to connect to the terminal server with the IP address, Use the command:

Below lists all the options available with rdesktop:
  •  -u: user name.
  •  -d: domain.
  •  -s: shell.
  •  -c: working directory.
  •  -p: password (autologin).
  •  -n: client hostname.
  •  -k: keyboard layout (hex).
  •  -g: desktop geometry (WxH).
  •  -f: full-screen mode.
  •  -b: force bitmap updates.
  •  -e: disable encryption (French TS).
  •  -m: do not sendmotion events.
  •  -l: do not request license.

So to connect to a terminal server with the IP address and a user name and password supplied at the same time, you’d use the command:
rdesktop -u jim -p jim's-password

PXES builds Linux-based thin clients
The rdesktop utility provides a very easy method for connecting to Windows Terminal Server, but there are other methods available. One of the best is PXES Linux, which is available from its project Web site. PXES is a micro distribution used to build Linux-based thin clients. This is useful for administrators who need to provide access to remote servers from client machines running minimal hardware. When installed, the PXES distribution can provide access to any XDMXCP server running on Linux or Solaris, and it even provides an implementation of rdesktop for access to Windows Terminal Server. Some of the advantages to using PXES are:
  • PXES boots from the network. No boot diskette or boot EPROM is required on the client.
  • Almost any available hardware will run PXES.
  • PXES allows administrators to build the thinnest possible client while still enabling access to Windows Terminal Server. This can help reduce network security vulnerability.

The PXES machine receives its configuration and IP addressing information from a TFTP server and a DHCP server on the network. Once booted, the remote desktop GUI allows the user to connect to the terminal server.

The biggest advantage to using PXES with thin clients is its flexibility. While this article focuses on making connections to Windows Terminal Server, the thin clients created with PXES are also capable of connecting to the following servers:
  • XDM: XDMCP on UNIX/Linux
  • RDP: Microsoft Terminal Server
  • ICA: Citrix ICA server
  • VNC: VNC server
  • TELNET: Telnet server

Installing PXES
You install PXES in seven steps:
  1. Configure the kernel and initrd.
  2. Configure any required local devices.
  3. Configure any optional local devices.
  4. Set up X windows.
  5. Configuring the specified session. If a Remote Desktop Protocol (RDP) session is selected, the following settings are required:
  • RDP server: The IP address of the terminal server.
  • Domain: The domain used for the session.
  • User: The user accessing the terminal server.
  • Password: The user’s password.
  • Full screen: Used to select a full-screen session.
  • Desktop geometry: Set screen size when full screen is not used.
  • Force bitmap updates: Normally left unchecked.
  • Don't send motion events: Normally left unchecked.
  • Don't request license: Normally left unchecked.
  1. Configure general options.
  2. Finish the configuration.

In most cases, the default provided by the PXES setup program will be sufficient. Once PXES is installed, you’re ready to connect to the remote server of your choice. PXES will also support a concurrent connection to different types of remote servers.

Connecting remotely with VNC
Our final step is Virtual Network Computing (VNC). VNC is one of the most popular solutions available for remote connections to other computers. You make the connection to a computer running the VNC server from any machine running the VNC viewer via the VNC protocol. However, the requirement to install the VNC server on the terminal server may prevent some administrators from implementing a VNC solution for remote clients. Alternatively, both PXES and rdesktop use an implementation of the Remote Desktop Protocol running natively on Linux/UNIX, and this is often a more feasible solution for administrators.


Editor's Picks

Free Newsletters, In your Inbox