dcsimg

Windows Admin with rdesktop

Whether your Linux server is under your desk or in a co-location facility clear across the country, virtually all system maintenance can be accomplished simply by logging in. ssh and tools such as up2date, apt-get, and any text editor make remote Linux system administration a snap. Remote maintenance of a Windows server can be (almost) as easy, using rdesktop and tsclient, two open source clients that can replace the traditional system console.

Whether your Linux server is under your desk or in a co-location facility clear across the country, virtually all system maintenance can be accomplished simply by logging in. ssh and tools such as up2date, apt-get, and any text editor make remote Linux system administration a snap.

Remote maintenance of a Windows server can be (almost) as easy, using rdesktop and tsclient, two open source clients that can replace the traditional system console.

rdesktop is an open source client for Microsoft Windows NT Terminal Server, Windows 2000/2003 Terminal Services, and Windows XP Remote Desktop. It uses the Remote Desktop Protocol (RDP), an extension of the ITU-T T.128 (“T.SHARE”) application sharing protocol, to remotely present a system’s desktop. In newer versions of Windows it also supports device redirection (more on that later). Written by Matthew Chapman, rdesktop is licensed under the GNU Public License (GPL) and is available from http://www.rdesktop.org/. As of this writing, the latest stable version is 1.3.1.

Installing rdesktop is as simple as downloading the source, unpacking it, and performing ./configure&&make&&make install. Once installed, and assuming your Windows server has been configured to allow remote desktops (this varies depending on Windows version and is beyond the scope of this article), you can connect to the server with:


$ rdesktop [options] server

Since you’re connecting to a remote server, the options provide authentication and the type of connection.

–u username specifies the user name for authentication on the server.

–p password provides a password for authentication on the server. To keep others from seeing the password supplied on the command line, use –p – to read the password from stdin.

–g geometry allows you to specify the desktop geometry. This can be given as a resolution, such as 1024×768 or as a percentage of the entire screen, as in 70%.

–a depth sets the color depth, and may be one of 8, 15, 16, or 24. More than 8-bit is only supported under Windows XP and newer versions of Windows.[ At press time, the most recent release of Windows is Windows 2003.]

–r device enables device redirection, allowing you to redirect a device, such as sound from the remote machine to the local one. This feature requires Windows XP or newer.

Finally, unlike a normal terminal session, the –0 option connects you to the physical console of the server. When using this setting, your session is virtually identical to you sitting at the machine with a keyboard and mouse connected. This feature requires Windows 2003 Server or newer.

As an example, the command rdesktop –g1024x768 –a16 –0 –r sound hostname connects to the console and redirects sound, making it appear that you’re sitting in front of the machine, even if it’s miles away.

Consult the rdesktop man page to see all of the available options.

Now that you can connect to a remote Windows server using rdesktop, you may be thinking how convenient it would be to be able to save each server and options combination. Enter tsclient (pictured), a GTK+-2.0 front-end for rdesktop.

Like rdesktop, tsclient is licensed under the GPL. You can download the tsclient source from http://www.gnomepro.com/tsclient/. Also like rdesktop, installation is as simple as ./configure&&make&&make install. After installation, start the application with tsclient. Once started, you can enter each of your machines into tsclient and save. All of the machines you configure are available in the “Computer” dropdown box. Connecting to a machine is as simple as clicking the Connect button after you’ve selected all your options.



While still not as easy to remotely administer as Linux, using rdesktop and tsclient can significantly cut down the time needed to maintain Windows machines. As an added bonus, you can even use sound redirection to listen to iTunes if you don’t have a CrossOver Office license.

Jeremy Garcia is the founder and administrator of LinuxQuestions.org, a free, friendly, and active Linux community. Please send questions and feedback to class="emailaddress">jeremy@linuxquestions.org.

Comments are closed.