locked
Terminal Service Client - switching local user to remote RRS feed

  • Question

  • I haven't seen if this is covered or not but is there a way to change how Terminal Services handles a remote login when a local user is already logged in?

    Example: In WHS - if I'm logged in as "user1" at the terminal and I then connect via TSC as "user1" from another machine, it logs "user1" in twice. This is a huge problem if a program is running because it's not visible on the remote machine.

    In XP - I can log in locally and when I switch to a remote machine and log in, it logs out locally and switches to the remote view with everything running. Logging back in at the local console switches back with no problems.

    I would like to be able to log out whatever user is on locally so that I can use active programs remotely. The only way I can do that now is by using LogMeIn.com which bypasses Terminal Server completely. This is a huge problem when I want to check on a torrent file or use the main console of my surveillance system. LogMeIn is great in a pinch but I don't like relying on it when TSC is so much better.

    I recall that the beta would log out "Administrator" but I suppose that behavior is changed now.
    Friday, January 11, 2008 5:59 PM

Answers

  • To accomplish what you're asking is fairly straightforward if I understand what you're asking. First, the basics:

     

    mstsc.exe - when connecting to Server 2003-based system will begin a new interactive session independant of the console session

    mstsc.exe - when connecting to XP or Vista will connect to the console session as virtual interactive sessions are not supported

    mstsc.exe /console - connecting to a Server 2003-based system will enable you to connect to the 0 console session

     

     

    Once connected to your server, whether console or other interactive session, you can launch the task manager > click on the Users tab > view interactive sessions 0, 1, 2 etcetera.

     

    If you right-click on any of the listed sessions that are not your current session, the options you receive are:

    • Connect
    • Disconnect
    • Log off
    • Remote Control

    By this method you can log off or connect to any existing session.

     

    Example:

     

    The user is logged on to the home server via mstsc.exe /console from their home computer (session ID 0). The user closes the mstsc window and leaves their session active with tasks running. The user then connects to the home server via mstsc.exe without the /console switch and is then given a new interactive session with ID 1.

     

    Wishing to reconnect to her 0 session and logoff session 1, she:

    1. Launches the task manager 
    2. Navigates to the Users tab 
    3. Right-clicks the ID 0 session 
    4. Clicks Connect > the view then changes to session 0 with full interactive capability.
      1. Session 1 still remains logged in but will show as Disconnected.
    5. From session 0 she launches the task manager 
    6. Navigates to the Users tab
    7. Right-clicks session 1 and clicks Logoff
      1. Session 1 is now gone and the only active session is the 0 console session which she is currently connected to.

    I hope this helps.

    Friday, January 11, 2008 11:29 PM

All replies

  • I do not know a way to force a log out of the first user but you could start the RDC in console mode and shadow the session.

    use the cmd line to open the session

    mstsc /console /v:kermit

    This will connect you to the server called kermit and show you the current session 0.

    One question:

    I've not come across any program that I cannot use via RDC - are you leaving programs running on the console screen?

    Andrew

    Friday, January 11, 2008 9:45 PM
  • I'll give that a shot but it seems like there ought to be an option in the Terminal Services control panel to log out the session that is being interrupted.

    I can run everything through RDC but the problem is when two identical users (remote and local) log in and run the same programs that require exclusive access to data (I-Catcher CCTV, azureus, etc) it starts to act weird.

    I-Catcher needs to be (at least I think so) run as an executable, I don't think there is a service for it.. when it runs twice it still records but the web service dies. Azureus is still running in the background under the local user but I have to kill it and restart it from the current session to control it.

    The confusing thing is how this is a very useful feature in XP Pro and was in the RC but now that I've paid my money, it's missing... I can control my work PC through my Mac from RDC and if I want to use it directly, I just log in and everything I was doing is still there. When I'm done with that, logging back into it from the Mac keeps everything running.



     Andrew Beasley wrote:
    I do not know a way to force a log out of the first user but you could start the RDC in console mode and shadow the session.

    use the cmd line to open the session

    mstsc /console /v:kermit

    This will connect you to the server called kermit and show you the current session 0.

    One question:

    I've not come across any program that I cannot use via RDC - are you leaving programs running on the console screen?

    Andrew

    Friday, January 11, 2008 10:09 PM
  • This is the problem with running a server as a desktop machine, for which it is not designed. Multiple logins are a server feature, so by design.

     

    It's not good to leave user accounts logged in, so to run applications independantly of a logged in user you need to use something like this, which runs any application as a service (please note I've not used this one personally):

    https://webwacker.livenode.com/Web/Windows%20Services/AnyServiceInstaller%201.0.zip 

     

    You can check the sessions that are running by firing up Task Manager and checking the Users tab.

    Friday, January 11, 2008 10:42 PM
  • To accomplish what you're asking is fairly straightforward if I understand what you're asking. First, the basics:

     

    mstsc.exe - when connecting to Server 2003-based system will begin a new interactive session independant of the console session

    mstsc.exe - when connecting to XP or Vista will connect to the console session as virtual interactive sessions are not supported

    mstsc.exe /console - connecting to a Server 2003-based system will enable you to connect to the 0 console session

     

     

    Once connected to your server, whether console or other interactive session, you can launch the task manager > click on the Users tab > view interactive sessions 0, 1, 2 etcetera.

     

    If you right-click on any of the listed sessions that are not your current session, the options you receive are:

    • Connect
    • Disconnect
    • Log off
    • Remote Control

    By this method you can log off or connect to any existing session.

     

    Example:

     

    The user is logged on to the home server via mstsc.exe /console from their home computer (session ID 0). The user closes the mstsc window and leaves their session active with tasks running. The user then connects to the home server via mstsc.exe without the /console switch and is then given a new interactive session with ID 1.

     

    Wishing to reconnect to her 0 session and logoff session 1, she:

    1. Launches the task manager 
    2. Navigates to the Users tab 
    3. Right-clicks the ID 0 session 
    4. Clicks Connect > the view then changes to session 0 with full interactive capability.
      1. Session 1 still remains logged in but will show as Disconnected.
    5. From session 0 she launches the task manager 
    6. Navigates to the Users tab
    7. Right-clicks session 1 and clicks Logoff
      1. Session 1 is now gone and the only active session is the 0 console session which she is currently connected to.

    I hope this helps.

    Friday, January 11, 2008 11:29 PM
  • If I understand correctly, you're asking how to force logging off a locally connected user on your WHS when a remote user logs in via remote desktop.

    Marc has supplied instructions on how to log someone off, though I don't think it's quite what you are looking to do. For more information about Remote Desktop For Administration (which is what Windows Home Server uses) see this Technet article.
    Saturday, January 12, 2008 2:40 AM
    Moderator
  • Taking a look at this again:
     
    Example: In WHS - if I'm logged in as "Administrator" (Session ID 0) at the terminal and I then connect via TSC as "Administrator" from another machine, it logs "Administrator" (session ID 1) in twice. This is a huge problem if a program is running because it's(Sesion ID 0 is) not visible on the remote machine.

    In XP - I can log in locally and when I switch to a remote machine (running XP) and log in, it logs out locally and switches to the remote view with everything running (in session ID 0/console). Logging back in at the local console switches back (to session ID 0) with no problems.

    I would like to be able to log out whatever user is on locally so that I can use active programs remotely. (You actually want to open Task Manager, click the Users tab, then right-click the user from the Task Manager's Users tab with session ID 0 beside their username and click Connect to take over that session where the programs you left running are still active. If you log off that user, it will close those running programs and you could lose data if you haven't saved it.) 
    Saturday, January 12, 2008 2:57 AM
  • Marc - thanks a lot, that DOES in fact work. When I connect to the other TS connection it just switches me to that desktop with all the running programs.

    I haven't been able to get back to you (I tried this a few days ago) because I've been busy with other things and quite frankly, I can only handle WHS in small doses because it drives me insane with problems I've never experienced under XP. DCOM errors, services failing, can't copy and paste from \\server\folder1 to \\server\folder2, I have to drag between windows. If it weren't for the drive spanning and mirroring, I'd just stick with 2000 Workstation on this machine. 

    But I digress, I haven't been able to properly test it because I created a second user and it doesn't have access privileges to log in from RDC even though it's in the right group and ought to work. I would imagine that if I disabled the startup item, logging in as a duplicate remote user and then manually switching the TSC session to 0 will work just fine. Or maybe getting the second user to work and logging in directly with that. Ugh...

    Wednesday, January 16, 2008 8:19 PM
  • One little thing - I'm using CoRD on my Mac to connect and it has a checkbox to attach to the Console session so when I do that, it just pops me right into the session without having to connect to the console and disconnect the dead remote session.

    I didn't realize what that checkbox was for and I appreciate your help since now I can log in through the Windows client AND CoRD without pulling too much hair out.
    Wednesday, January 16, 2008 8:38 PM
  • I have a neat Vista RD sidebar gadget that has the checkbox too, very useful!

     

    Wednesday, January 16, 2008 11:08 PM
  • I remember therre was a way when logging into a Win Server 2003 box that you could log in as the local session instead of a concurrent session. The instructor told us about it so if you already had two remotes sesions that were active, you could still log in and end those sessions, but for the life of me I can't remember how. Does this ring any bells?

    Thanks,

    Ted

     

    Sunday, August 10, 2008 5:30 PM
  • Ted,

    Do you mean using "mstsc /v:%machine_name% /console" ?

     

    There are a few other useful switches, is you use mstsc /?, it will give you the list.

     

    Colin

     

    Sunday, August 10, 2008 5:47 PM