Although most administrators do their work within a Windows environment, there are times when an administrator will want to (or have to) connect to a remote Windows machine from within a Linux machine. Now most administrators are used to doing this from within Windows. But from within Linux it is a different story.
There are plenty of Remote Desktop Protocol (RDP) tools available for Linux that allow you to connect to just about any platform, but for our purposes, we will be connecting to a Windows 7 desktop from an Ubuntu 9.10 desktop. But we'll make this a bit more complicated. Since "the cloud" is all the rage, we will make this Linux-to-Windows connection with the Windows 7 instance being served as a virtual machine from a different Ubuntu Server using VirtualBox.
This blog post is also available in PDF format in a free TechRepublic download.In order to make that connection a little easier to understand, let's map it out with a diagram (Figure A).
The Windows 7 desktop is served up by the Ubuntu Server via VirtualBox 3.0.
Now that you can see a visual representation, the connection should be easy to figure out.
For the purposes of this document, I am going to assume:
- You have a working Ubuntu Server.
- You have VirtualBox working on your Ubuntu Server.
- You have Windows 7 installed on VirtualBox.
- You have a working Ubuntu desktop.
The above issues are simple to resolve. There are a few others that might not be so obvious, so we'll discuss those here.
Bridging your network
If you go with the default settings on your Windows 7 Virtual Machine, you will not be able to access that desktop because the IP address will be handled via NAT. Instead you need to use a bridged connection so that your virtual machine will be on your LAN IP address scheme. To do this, you need to close the Windows 7 virtual machine. You can't just "pause" the instance; you actually have to close the session (as if you were going to shut down a regular Windows machine) to access the configuration of the VM.Once you have that VM closed, go to VirtualBox, select the Windows 7 VM, and then click the Settings button. Click on the Network section and then, from the Attached To drop-down menu (Figure B), select Bridged Adapter. Click OK to Apply this setting and dismiss the window.
If you find networking does not work on your virtual machine, you might have to change the Adapter type.
Now go back to the main VirtualBox window and start up your virtual machine. You should find, once Windows 7 boots, that it is now a part of your LAN IP address scheme.
Before you try to connect to your Windows 7 desktop via RDP, you have to enable the service. To do this, follow these steps from within your Windows 7 virtual machine:
- Click on the Start Menu.
- Right-click on the Computer entry.
- Select Properties.
- Click on the Remote settings entry.
- Make sure that both the Allow Remote Assistance Connections to This Computer and Allow Computers Running Any Version of Remote Desktop are checked.
After you take care of those settings, click OK to set them.
Linux RDP client
One of the more reliable and user-friendly of the Linux RDP clients is Terminal Server Client (tsclient). By default, this should be installed on your Ubuntu desktop. If it isn't, you can go to the Ubuntu Software Center, search for "terminal server" (no quotes), click on the Terminal Server Client entry, click the right-pointing arrow, and finally click Install.Once that software is installed, you will find it in the Internet sub-menu of the Applications menu. Start that up, and you will see the main tsclient window (Figure C).
As you can see, it takes very little configuration to connect to your Windows 7 desktop.
Believe it or not, very little effort is required to make the connection from Linux. All you need to do is enter:
- The IP address of the Windows desktop you want to connect to
- The user name that you will log in as
- The password for the user
Our virtual machine instance of Windows 7 is running, via RDP, on an Ubuntu desktop machine.
This type of setup should illustrate for you how versatile RDP can be. Doing remote work on a Windows 7 machine does not have to be limited to using another Windows 7 machine. Now you know that administering a Windows 7 machine can be done remotely from a Linux desktop.
Jack Wallen is an award-winning writer for Techrepublic and Linux.com. As an avid promoter/user of the Linux OS, Jack tries to convert as many users to open source as possible. His current favorite flavor of Linux is Bodhi Linux (a melding of Ubuntu and Enlightenment). When Jack isn't writing about Linux he is hard at work on his other writing career -- writing about zombies, various killers, super heroes, and just about everything else he can manipulate between the folds of reality. You can find Jack's books on Amazon, Barnes & Noble, and Smashwords. Outnumbered in his house one male to two females and three humans to six felines, Jack maintains his sanity by riding his mountain bike and working on his next books. For more news about Jack Wallen, visit his website Get Jack'd.