rdesktop/Linux saved the day when its windows counterparts failed miserably

I was configuring two more Netgear MGR614v6 wireless routers earlier today. My laptop was plugged in one of its four LAN ports. The network connection to the Internet from the laptop went on and off as I changed the WAN and LAN settings on the wireless routers. Before I started the this wireless router configuration task, two RemoteDesktop connections were established to a remote Windows 2003 standard server, each using a different administrative account. The laptop was running up-to-date Windows XP sp2.

Once I regained Internet connectivity on the laptop at some point, I noticed the two RemoteDesktop session had disappeared. Not alarmed, I clicked on the shortcuts on the desktop to reconnect both session. For both, I got a pop-up saying that “The terminal server has exceeded the maximum number of allowed connections.” I knew I have seen this in the past, so, I waited a hour or so for it to clear the stale session data by itself.

Not much luck this time. Here is the few tings I tried on Windows XP. Some are per good tsclient/remoteDesktop tips I found by Google Search.

  • RemoteDesktop using yet another administrative account failed with the same error. I know Windows 2003 server allows three RemoteDesktop sessions without extra Terminal Service licensing. So, I guess this means three sessions were been used, somehow. The next step is to forcefully take over the console session (session id = 0).
  • mstsc /console” failed, even though it went further. It gave me the actual login window for the remote Windows 2003 server, even though I had entered the correct account information entered when launching mstsc. Once I entered the correct credential, it told me that “you don’t have the correct encryption level ” to take over the session or something.

The ‘correct encrytion level’ sounds like the client is a bit outdated. So, I downloaded the latest Remote Desktop Connection or TS client v6.0 for Windows XP (KB925876) off Microsoft’s web site. It is a quick installation. No “%ProgramFiles%\Remote Desktop\mstsc” found as observed for the v5.2 download. If I click on the existing RemoteDeskotp shortcuts, it will run with different look & feel. More importantly, it has a new checkbox to ‘reconnect if disconnected” while the vanilla RemoteDesktop client from XP SP2 doesn’t.

I checked the checkbox to “reconnect if disconnected” to be sure. It was the default behavior for the vanilla RemoteDesktop client from XP SP2.

  • RemoteDesktop still failed with same error.
  • mstsc /console” now gives a window from the remote windows 2003 server,
    • First, it said “user ‘administrator’ was disconnected 5 minutes ago”.
    • Then, it prompted for confirmation to take over user ‘administrator’ session, with risk of losing some unsaved data and stopping running programs in that session. I clicked on ‘yes’.
    • An in-progress window poped up, saying ‘Remote Logoff in progress”. I was thrilled to see this pop-up, needless to say.
    • A few minutes later, however, windows disappeared and left alone the remoteDesktop launch window.

Just in case there’s some client-side caching or hang sockets or any sort, I rebooted the laptop. still the same error.

Out of desperation, I tried the ‘rdesktop‘ program on my CentOS 4.4 desktop. I got in instantly! Here is the command line I used:

rdesktop -T w2k3 -g 1024×768 -b -C -5 -a 16 -u rmt\\administrator www.supportsmb.com -p -

From the ‘user’ tab under task manager on the windows 2003 server, at least two of three allowed sessions were in ‘disconnected’ state. Not sure why I wasn’t able or allowed to ‘reconnect’ to a disconnected session using Windows XP’s built-in Remote Desktop client or the updated mstsc v6.0.
screenshot of user tab under task manager using rdesktop under CentOS 4.4 linux

Supposedly the “mstsc /console” should have taken over the first session (ID = 0), regardless of its status. Well, I am glad rdesktop from my CentOS 4.4 desktop saved my day. What a pity rdesktop’s windows counterparts failed so miserably.

Leave a Comment

Powered by WP Hashcash