Remote Windows desktop sessions on Linux computers

05/06/2010 at 5:56 pm Plaats een reactie

For my work, I need to access Windows servers through remote sessions frequently. In the Windows world, this is called an RDP session, and the protocol has the same name – RDP stands for: Remote Desktop Protocol. In Windows, we have the mstsc command, which will open a desktop session to any Windows server that allows remote desktop sessions. So here is the question: is there any equivalent in the Linux desktop world? As a matter of fact, there are two packages that allow remote sessions, and both are installed by default in most Linux distributions, including Ubuntu.

The first package is the tsclient package.  Tsclient is a frontend for the program that I will discuss later on. It can be launched, in Ubuntu, through Applications -> Internet -> Terminal server client.



The package works out of the box and will instantly open a remote desktop session to any server.  Moreover, you can choose to connect your Linux local drive, printer and other resources at connection time. There is, however, one very annoying peculiarity which makes the program quite not so easy to use, and that is why I myself do not like it: the keyboard mappings do not totally correspond in the sessions. With my English-US keyboard, for instance, the : and the > keys are inverted. Maybe there is a solution to this by tweaking some configuration files, but if you don’t need to, why should you?

The backend program for tsclient is a program called rdesktop; it’s launched by a command of the same name, and the keyboard layout is user-defined, so you can use it for your English-US, french, or whatever keyboard layout.  I don’t know if there’s menu item for it in Ubuntu, and I don’t care, as long as I am able to create an icon myself…and nothing is easier than that. We just need a script in /home/username/bin, and an icon to launch the script.

First, let’s create a simple script. You will need to place it in the /home/username/bin folder.

A sample content of the script would be:

rdesktop -f -k en-us dns-hostname-or-ip-address :3389

– rdesktop is the command
– -f is an optional switch; it allows you to have your remote windows sessions full screen. To revert to your Linux desktop, hit Ctrl Alt Enter
– -k defines the keyboard layout
– replace dns-hostname-or-ip-address by the ip address or the hostname of the Windows machine you want to have an RDP session to
– the :3389 is the default RDP port

Make the script executable (see printscreen below)

make rdp script executable

Okay, now add an icon to favorite Linux desktop, and point to the /home/username/bin/ script file you just created…off you are!!!

Now this is even more spectacular: rdesktop allows you to even have seamless RDP sessions. Basically, for a production Linux desktop, this means that you could create a base Linux computer, with the appropriate shortcuts to Windows servers already in place for the user. For the seamless RDP sessions to work, download the prebuilt  rdesktop Windows extension(  at Cendio (that’s the company behind rdesktop). Create a folder on one of the drives of the Windows computer, and extract the Windows extension file in that directory.

Next, to check out the functionality, just try to lauch notepad for instance, with a syntax like this, launching the command from a Linux desktop terminal: rdesktop -k en-us -A -s ‘c:\seamlessrdp\seamlessrdpshell.exe c:\windows\notepad.exe’ ip-address-or-dns-hostname:3389

Of course, the above command can be put in a script just like the non-seamless script, and creating an icon for the script is a snap, whether on Ubuntu, OpenSuse, Suse Linux Enterprise Desktop, or whatever other Linux desktop distribution. Check it out, it ’s really worth a  try!!!


Entry filed under: Uncategorized.

Ubuntu 10.04: upgrade or fresh installation? WebDAV on Ubuntu

Geef een reactie

Vul je gegevens in of klik op een icoon om in te loggen. logo

Je reageert onder je account. Log uit / Bijwerken )


Je reageert onder je Twitter account. Log uit / Bijwerken )

Facebook foto

Je reageert onder je Facebook account. Log uit / Bijwerken )

Google+ photo

Je reageert onder je Google+ account. Log uit / Bijwerken )

Verbinden met %s

Trackback this post  |  Subscribe to the comments via RSS Feed

Posted previously

%d bloggers liken dit: