Categorized | Linux, Ubuntu

Remoting into a Windows machine from Ubuntu Linux

Posted on 02 March 2007 by admin

Everyone knows the trick where you use a virtual machine with a windows install on it to remote desktop into a remote computer. The problem with this is that you’re putting yet another layer of virtualization between yourself and where you want to be working.

Fortunately, good people like Matthew Chapman over at www.rdesktop.org started working on a way natively remote desktop into a windows box from a linux box.

It’s a command line tool which actually seems to work faster than the native windows remote desktop client. If you’re a stickler for speed but not for graphics this is the way to go.

Say you want to connect to a remote windows machine with an IP of 192.168.100.216 on the GOIT domain with a username of expertuser and a password of ilikewellencryptedpasswords.

You’d then open a terminal and use the following command:

rdesktop -f -uexpertuser -pilikewellencryptedpasswords -dGOIT 192.168.100.216

Most people don’t bother with domains so you can skip that part. The -f is the command to start in full screen mode. Pressing ctrl+alt+enter toggles back and forth between windowed and full screen mode.

If you get a “command not found”, run apt-get, apptitude or some other package manager to install it, then try the command again.

eg.

sudo apt-get install rdesktop

If you don’t have a package manager, go to the site and install install it by hand. But I must say, if you don’t have a package manager like apt-get you’re really missing out.

In the somewhat overloaded figure below you can see:

  • My Ubuntu desktop
  • My remote windows machine running IE and looking at an excellent website
  • That I put a custom application launcher for the remote desktop onto my panel
  • How to setup the properties for that launcher to make it work

More on custom application launchers later.

The only problem I’ve had so far is that if the remote machine goes into powersave mode, then there is no way to wake the machine back up again and the client stalls. This is why I have force quit and a quick launch app setup. It doesn’t happen as long as you’re using it, but if you step away you’ll find you have to restart. Fortunately it’s very quick.

Until next time, Happy Remoting!

Response to comments

Hey all you diggers! How goes? Thanks for testing the crap out of our servers! It seems like there’s a lot of commentary to get to (not just here, but on digg), I’m going to see if I can’t incorporate most of your questions/suggestions/horrifying abuse into future articles. Look for it in the next few days. Also … that pesky coldfusion error seems to have been fixed,

To foofightrs777 … there’s a bit of an Ubuntu buzz on digg now, do a search for Ubuntu bible, it’ll cover things like ssh servers on Windows … I’m going to take a look at it and if it doesn’t seem straightforward enough, I will write something up for you.

To leeDav … you hit it right on the money. This is not for the super advanced uber-nerds. Most of the linux/ubuntu stuff on this site will be geared for people who are just coming off of windows and sometimes a little hand holding is just what the doctor ordered.

To Phill … you’re right, it is an easy fix on the windows side of things to get it to power back up and I will get Ivan to include that when he writes the article on setting up terminal services. In this case I used a work around because I didn’t have admin access on the remote machine (just like you probably won’t when you are logging into your office machines, unless you’re the admin of course.)

To James … web interface you say? Looks like Microsoft has been innovating again. Well at least they’re putting good stuff into Vista. As a side note, your site breaks in such a way that I can’t read some of the lines. CSS issue on Firefox, I think.

  • Share/Save/Bookmark

Tags | ,

12 Comments For This Post

  1. Nick Says:

    Well, remote desktop is fun.

    I did a script that detects the size of the desktop with "xwininfo -root"
    and I go check the KDE bar size and I substract its size. Then you launch
    remote desktop anchered at the top of the screen with that calculated size
    with the option to remove windows decoration and enable sound redirection.

    Then I launch this from a button on the KDE bar, very slick…

  2. beauty Says:

    Cool ! do you want me to say more than that…

  3. Phill Says:

    Have a look at the Wake on Lan BIOS setting on your Remote PC, that should allow you to remotely "wakeup" your computer. There’s probably a lot more info out there if you google it…

  4. Kent_Geek Says:

    Nick, I’m not a KDE-er, so your mileage may vary, but I use ‘ -g workarea ‘ in my rdesktop command line in place of my old ‘-g 1600×1200′. This, along with the -D option, has the same effect as your script to size the rdesktop window. (I think)

  5. Kent_Geek Says:

    Whoa! Sorry about the multiple posts - I was getting a coldfusion error on the posts, and I assumed they weren’t working. Nothing like a CF screw-up to make a guy feel like a total noob.

  6. noone Says:

    Since when has "remote desktop" been a verb ?!

  7. Omeganon Says:

    Umm. Just add the Terminal Service Client (tsclient) widget to your panel. It’ll give you a very nice connection manager and a drop-down list of all conifgured connections to choose from. An even more interesting solution is seamlessrdpshell which will only bring the window of the application you launced back to your Ubuntu machine, and not all the other extra windows crap you don’t need.

  8. Kent_Geek Says:

    Hi, Omeganon - I agree tsclient is a quick and easy way to get rdp (and vnc, etc) going, however… I am running Beryl, which caused my rdesktop windows to be oddly translucent. I found by much digging that I needed to preface the rdesktop command line with ‘XLIB_SKIP_ARGB_VISUALS=1′ to eliminate that.
    Of course, short of hacking the tsclient source, the only way to do that was to call rdesktop directly. In the course of doing that, I found the ‘-g workarea’ param, and I’m very happy to not go back to tsclient. So, I have a desktop icon that launches a bash script that calls rdesktop, and life is good.

  9. James Says:

    You can do it so easily through the terminal services web interface on any operating system - even your palmtop
    -
    http://www.WindowsVistaUserGuide.com

  10. Saskchi Says:

    Would it not be a better idea to leave the -p blank so it prompts you for a password? I tried the command but I needed to leave a space after each switch. Therefore, -uexpertuser should be -u expertuser. Thank you for the article.

  11. Mehul Says:

    This may be working but I am looking for remoting into Linux from Windows. i.e. exactly reverse of this article. I have enabled Remote Desktop on my Fedora 7 Linux Server. I have RealVNC viewer on my Windows XP client.

  12. Tdak Says:

    Mehul, you should try a TightVNC client. But make sure you have a VNC server installed and running first.

    See this for help and tutorials. http://www.tightvnc.com/

Leave a Reply

Categories