Electricmonk

Ferry Boender

Programmer, DevOpper, Open Source enthusiast.

Blog

RDesktop goodness

Monday, August 13th, 2007

Every now and then, I have to log into a windows machine in order to log expense reports or make a leave request for my work. (The application they use for that at my work doesn’t work properly in Firefox. Welcome to 2007.) Fortunately, we’ve got a big VMWare platform where I can login to a fast virtual Windows 2003 host. Naturally, I use rdesktop for that. There’s some cool options to rdesktop that I didn’t know about:

First of all, you can automatically log in using the -u, -p and -d options:

rdesktop -u fboender -p F0oB@22000 -d OFFICE win23k.office

You can set the remote desktop geometry using the -g option. That way, you can have a nearly-full-screen remote desktop. For instance, I run at 1280×1024 resolution, and the top menu bar is 24 pixels high, so I create a remote desktop with dimensions of 1280×1000:

rdesktop -g 1280x1000 win23k.office

I also don’t like it if rdesktop takes over my window managers keybindings, cause I’ve got application launchers bound to keybindings such as Win-R (which launches my Run Program application). So I turn off rdesktop’s “Take over Keybindings option” using -K

rdesktop -K win23k.office

If all you do is run a single application on the windows machine, for instance Internet Explorer, you can just as well run that straight away using the -s option. This will bypass the default shell and start the application straight away. This means you have no desktop window underneath your application and no windows taskbar at the bottom of the rdesktop window. Since Windows programs come with their window decorations (titlebar, close buttons, etc), you can turn off the ones for your Window manager using -D:

rdesktop -s "C:\\Program Files\\Internet Explorer\\iexplore.exe" -D w2k3.office

That starts an Internet Explorer window as if it’s running on your local computer. Unfortunately, this means you no longer have a minimize button. But that’s what the -S option is for. This enables the -D option and changes the behaviour of the remote minimize button to minimize the local rdesktop window instead of the remote window. You have to specify a button-size with the -S option, because the rdesktop client has to guess where the buttons are in the remote application. 18 is the default size for default windows themes.

rdesktop -S 18 -s "C:\\Program Files\\Internet Explorer\\iexplore.exe" -D w2k3.office

Use the -T option to set the local window’s title, if you’re starting more than one different remote application at the same time:

rdesktop -T "Internet Explorer 7.0" -S 18 -s "C:\Program Files\Internet Explorer\iexplore.exe" -D w2k3.office
rdesktop -T "Photoshop" -S 18 -s "C:\\Program Files\\Adobe\\Photoshop\\ps.exe" -D w2k3.office

Of course, even cooler would be if you installed the SeamlessRDP component on your Windows server, so you can true single remote applications on your desktop, just like X11 supports.

Finally, the very cool -r option, which allows you to forward local devices, printers, cdroms and directories to the remote server. It also allows you to redirect remote sound to the local machine.

rdesktop  -r disk:home=/home/todsah w2k3.office

This will make my local home directory available as a special share on the remote Windows machine so that I can access my files from the remote machine.

That’s about it for cool rdesktop stuff. Remember! Use sparingly.. it’s still windows, right?

The text of all posts on this blog, unless specificly mentioned otherwise, are licensed under this license.