Remote Desktop

Using Remote Desktop to connect from Windows 8.1 (with a Microsoft account) to Windows 8.1 (with a local account) I encountered the following error (even though the username and password were correct):

Your credentials did not work

The solution is simply to specify localaccount\ before the username:

localaccount\username

After that I was able to connect without any issues. Conversely I experienced no issues using remote desktop from the local account machine to the Microsoft account machine.

In my previous post I looked at using the seamless-mode function of rdesktop to open a Windows XP application window on the Ubuntu desktop. While this worked quite nicely for running a single application there are various workarounds for opening more than one remote application or session. The most promising of these is the Fontis IT version of rdesktop which features “connection sharing” whereby a single rdesktop connection can be used to launch multiple applications.

I followed the directions on the Fontis site for installing rdesktop but found that I had some visual issues with the CVS build, so I installed the older version that has been tested with the patches. If you want to install the latest build from CVS you will find the instructions on the Fontis site here.

Before installing rdesktop I needed to install the following packages:

If this “master” application (in this case Internet Explorer) is closed you will find that you are unable to remote into XP again as you will still be logged in. But before we tackle that let’s quickly look at how to run another Windows application.

Open a new terminal window and issue this command:

cd rdesktop
./rdesktop -l "calc"

Now you will have Internet Explorer and Calc open in Ubuntu.

While this is certainly functional I wanted to make the seamless rdesktop experience a bit nicer. So I created a very basic application in Visual Studio 2010 Express which I always run as my master session application in XP. This application gives me shortcuts to my most used applications and it has the close button disabled so that I cannot accidentally close my master seamlessRDP session. It also has a menu that lets me terminate the rdesktop session by issuing the “shutdown -l -t 00” command on XP to log me off.

After that I just needed a script and a launcher to run rdesktop on Ubuntu with the correct parameters to run my application.

Here RAM.exe is the name of the application that I made in Visual Studio and <username> is my login name on Ubuntu.

To create a Launcher on the desktop right click the desktop in Ubuntu and then select Create Launcher. Type in a name for the Lanucher and then click the Browse button and select the Remote Apps script in your home folder and click OK.

I have looked at various solutions for running Windows applications within (or from) an Ubuntu machine. I’m not a great fan of WINE, because of the layer of complexity that it can add to simply running an application and Remote desktop to Windows is fine but it does not integrate Windows applications.

While there are plenty of expensive (and rather good) solutions for the enterprise like XenApp I was happy to stumble across SeamlessRDP – which is good enough for my needs at home (as well as being free).

SeamlessRDP works through Remote Desktop protocols but instead of giving you a full screen desktop connection it gives you a windowed application instead.

As you can see (above) SeamlessRDP gives you a Windows application window (in this case Internet Explorer) within an Ubuntu window.

To achieve this I have copied the SeamlessRDP files to c:\seamlessrdp on my Windows XP Professional virtual machine. I also enabled Remote Desktop in XP by clicking Start, Control Panel, System, then the Remote tab followed by the Allow users to connect remotely to this computer checkbox.

If you need to add users other than Administrator then also click the Select Remote Users button to add them to the remote desktop users. Also make sure that all of your remote desktop user accounts have passwords configured. Once remote desktop is setup log off from XP so that you can test a seamlessRDP connection.

The next step is to install rdesktop on Ubuntu. Open a terminal window (click Applications, Accessories and then Terminal) and enter the following commands:

sudo apt-get update
sudo apt-get install rdesktop

To run Internet Explorer seamlessly on Ubuntu enter the following command in the terminal:

Change the above command with the IP address of your XP Pro virtual machine and the username and password of a remote desktop user on your XP machine.

The -A switch in rdesktop enables seamlessRDP mode. This means that you get an application window forwarded instead of the whole desktop. SeamlessRDP requires a shell which we invoke with the -s switch. This runs both seamlessrdpshell.exe (which we copied to XP earlier) and the application that we wish to launch on our XP virtual machine. In this case we specified the path to Internet Explorer.

The -u and -p switches do not have to be used, but if you leave them out you will be prompted for your credentials as per any regular remote desktop session.

I have found that this works very nicely but there are some caveats. The first is that by default in XP only one user can be logged in at a time. Running one application at a time might not sound too bad until you realize that closing the application window in Ubuntu does not log the user off in Windows XP.

There are a number of things that you can do to workaround these issues.

You can install a hacked termsrv.dll file to enable multiple concurrent remote desktop sessions in Windows XP Profressional which I have covered previously here.

You can run Task Manager (C:\WINDOWS\system32\taskmgr.exe) or a command prompt (C:\WINDOWS\system32\cmd.exe) and run additional applications from there.

You can write simple batch files for the applications that you want to run on XP that will log you off from XP when the application closes. For example:

c:
cd \Program Files\Internet Explorer
iexplore.exe
logoff

There is also an unofficial version of rdesktop made by Fontis IT Consulting that has seamlessRDP that allows you to call rdesktop several times to open several applications in the same user session.

All in all this looks like a great solution for applications that I do not use regularly or do not want to install on multiple windows systems. Even better, I get to run them on Ubuntu!