Saturday, December 31, 2011

Concurrent Remote Desktop HTPC Setup

The Problem:
You  have a Windows 7 PC acting as both the the media server and the HTPC for let's say your living room TV.
You frequently have a few people using windows remote login to that computer. Now by default if someone logs in to remotely to a Windows 7 PC they "take over" the current session running if they log in as the same user. If they log in as another user they have to kick the current user out. This is all fine if you are the only user of the PC. In our case someone was watching a movie on the living room TV. All of a sudden someone else logs in to that computer and locks the screen for the person watching the movie. Not a very nice movie experience if you ask me. And on top of this the person watching the movie have to put the user name and password in to get back in to the computer. I am using Unified Remote to control the HTPC and it doesn't support getting access to the Windows login screen at the moment (more info here http://forum.unifiedremote.com/viewtopic.php?f=46&t=204). This makes matters even worse since the person watching the movie now have to get hold of a computer tolog back in on the living room TV.

First attempt to fix the problem:
My first idea was to come up with a way for the logged in remote user to "give back" the screen to the movie watcher in the living room. This was successfully done by creating a batch file containing the following code:
%windir%\System32\tscon.exe RDP-Tcp#0 /dest:console

This works fine but you still have the problem with the movie being interrupted and the person running the remote session having to remember running the batch file for the screen not to be locked the next time someone wants to use the living room HTPC. Close but no cigar...

Second attempt to fix the problem:
Now I was rethinking how to approach the problem. Maybe there was a way to get Windows 7 to act more like a Windows terminal server. That is having several user being logged in to the same machine without kicking each other out. By default Windows 7 doesn't allow this. Luckily after some googling I found this http://experts.windows.com/frms/windows_entertainment_and_connected_home/f/114/t/79427.aspx?PageIndex=1. It is a small utility app that manipulate Windows 7 to be able to handle multiple logins at the same time. It is a little hacky and it does manipulate Windows files so if you don't like that please stay away from this solution.

If you want to go ahead this is the way to do it:

  1. Download the utility from the link above, the Megaupload mirror worked fine for me.
  2. Run the utility on the Windows PC that you want to act like the server. Note: Make sure to run it from a real log in session not a remote session.
  3. The utility looks like the screenshot below. I suggest not ticking any of the check boxes. It is better to make a dedicated htpc user in Windows.
  4. Now try to log in as two different users remotely, it should work just fine and leave the main login untouched.

This little hack fixes the whole problem. I can now have one Windows user for people logging in to the server normally. I also have a dedicated htpc user that is always logged in running Plex media server and Plex media center on the living room TV.
Even better the screen never locks and Unified Remote can be used to control the living room TV without any tedious login procedure. It solves the problem with the Plex media center crashing in remote sessions as well. Since the normal Windows user acount is only ever going to be used for logging in remotely I have configured it not to start Plex on start up.

I also suggest to set up the server to login to the htpc user account automatically on boot. This way you will never be prompted for a password to log in.


I hope this solves someones problems, it certainly made things better in our setup.



1 comment:

  1. Thank you for this great info about windows RDP,
    Buy Cheap RDP starting from $0.99 only
    Windows RDP Buy

    ReplyDelete