Connect Remote Desktop Protocol (RDP) Client To Localhost

Useful Tricks For Connecting Remote Desktop Protocol (RDP) Client To Localhost

Windows XP users must have noticed that while trying run the Remote Desktop (RD) Client to establish a RDC (Remote Desktop Connection ) with the localhost (i.e. on the own computer itself) via the Terminal Server service, the RDC session either cannot be established or gets disconnected giving an error message. (This post will help you fix the problem of Remote Computer Disconnected the session because of an error in the Licensing protocol in Windows Vista. )

The error message notifies you that the RDP client was unable to connect as the user is already connected to PC’s console and a new session can’t be established.

Basically, the behavior of the Remote Desktop service in Windows XP prevents a Remote Desktop Connection from being established with 127.0.0.1 or locahost. Generally, users who wish to have two sessions on the console or want to tunnel RDC through encrypted Secure Shell (SSH) try to establish a RDC with the localhost.

Sometimes users also attempt to establish RDC with the localhost in order to check whether the termsrv.dll patch has worked to unlock the restriction on concurrent RDC sessions.

However, it is possible that you enable Remote Desktop so as to connect to the localhost for establishing another desktop session. Below mentioned are a few methods that you can apply.

Method 1: Connect RDC to IP address 127.0.0.2

The trick can be used with Media Center Edition and Professional (Pro) Edition of Windows XP released prior to XP SP2 (Service Pack 2). The IP address 127.0.0.2 is an internal TCP/IP loopback IP address and RD service in Windows XP Media Center and Pro editions prior to SP2 support connection through this loopback address.

However, connection via localhost or 127.0.0.1 string is actively blocked.

Method 2: Connect to Terminal Services using another Non Standard Port.

By this method you may establish a RDC with the localhost (or 127.0.0.1 address) by using another non standard port rather than the default (i.e. 3389) one. This trick is useful in XP SP2 & SP3 versions which do not support localhost connection through 127.0.0.2 loopback IP address. RD listens and connects using the port 3389 by default.

Hence, to use this method you need to first change the listening port.

Method 3: Run RDC (mstsc.exe) Simulated as being run from a different Operating System

In this trick you actually make Terminal Services to think that the RDP Client which is trying to establish a connection with the localhost is from a different operating system, ultimately indicating that the RDC is from a different remote computer. Follow the below mentioned steps:

  • Create a folder named “RDC” in C drive.
  • Navigate to the folder “C:\Windows\System32\ and copy the files “mstscax.dll” and “mstsc.exe” to the newly created folder (i.e. to C:\RDC).
  • Now go to “C:\RDC”, right click on the file “mstsc.exe” and select the option “Properties” from the right-click context menu.
  • Go to the tab “Compatibility”.
  • Check (Tick) the checkbox corresponding to the option for running the program in a compatibility mode for the chosen OS and select Windows Me/ Windows 98 OS from the dropdown list.
  • Then, click on the button “OK”.
  • Double-click on “mstsc.exe” in the “C:\RDC” folder so as to run RDC and now the RDP client will be able to connect to 127.0.0.1 address or localhost.

You need to remember that, when you log on to the RD session, you need to log on as a different user. Otherwise, you might be forcibly logged out.

Turn On / Enable Remote Desktop Remotely In Windows 7 – Registry Settings

Enable Remote Desktop Service On A Distant Computer Remotely Using Registry Trick In Windows Vista/ XP/ 2000/ 2003/ 2008

Remote Desktop Protocol (RDP) service or Remote Desktop (RD) is a powerful tool that enables you to log on to a distant computer remotely and enjoy complete privileges and access to the remote system as if you are sitting in front of it.

Remote Desktop, also called as Terminal Services, is very much beneficial if your server or computer is placed at a distant location and regular trips to the place for configuring, troubleshooting or managing the system isn’t feasible.

Most of the Windows operating systems like Windows 7, Vista, 2008, 2003, 2000 and XP include the Remote Desktop tool in the package. However, by default it remains disabled. You can enable or turn on the Remote Desktop feature through the local console by making use of graphical user interface (GUI) provided by Microsoft in all Windows editions.

It turns out to be quite troublesome to access a distant PC or server using the RDC (Remote Desktop Connection) instantly if the Remote Desktop on the distant server/ PC is not enabled. However, you can now turn on or enable the Remote Desktop on the distant PC/ server by editing the registry of the remote server/ PC remotely.

You just need to follow the procedure mentioned below:

  1. Log on to your local workstation with administrator privileges.
  2. To open the Registry Editor, select “Run” (Start Search in case of Vista 7) option from the Start Menu. Type in “regedit” and press Enter.
  3. Click to view the “File” menu. From the pull-down menu that appears, select the option “Connect Network Registry”.
  4. A dialog search box “Select Computer” appears. Browse the Active Directory to find the remote/ distant server or type the name of the distant PC within the text box. You may also click on the “Advanced” button in order to search the remote computer.
  5. After selecting the remote computer, click on “OK” button. A node representing the network registry of the remote or distant computer will be shown within Registry Editor with registry keys “HKEY_USERS (HKU)” and “HKEY_LOCAL_MACHINE (HKLM)”.
  6. Just navigate to the below mentioned registry key:
  7. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server

  8. Within the right pane, find a REG_DWORD value by the name “fDenyTSConnection”, double-click on it and alter its value data from (the default value) “1” (which means that RD is disabled) to “0” (which means that RD is enabled).
  9. Now, in the command prompt, issue the below mentioned command to reboot or restart the remote/ distant computer.
      shutdown -m \\hostname –r
      In the above command, you need to replace “hostname” with actual name of the distant/ remote computer.
  10. You have now enabled the Remote Desktop on the remote/ distant computer and the default RD listening port will now allow any incoming RDC (Remote Desktop Connection). However, you may change the RD listening port for security reasons.

Apart from this registry trick, there are a number of freeware utilities and tools that allow you to enable/ turn on Remote Desktop on a remote/ distant computer remotely.

Related posts:

1> Macbook rdp / Remote desktop

2> If you have the following problem in Windows 7: the remote computer disconnected the session because of an error in the licensing protocol, the read this post: mslicensing windows 7

Remotely Turn On Windows Computer Desktop Server 2003 – RDP Enabler

Handy Freeware Tools For Enabling Remote Desktop On Distant Computer Remotely

Remote Desktop (RD)/ Terminal Services enable you to access the desktop of another computer placed at a distant location and control various programs and applications using mouse and keyboard remotely via network.

It is possible for you to remotely turn on and facilitate Remote Desktop on a distant computer/ server for accepting incoming Remote Desktop Connection (RDC). This can be done by editing the registry of the remote PC manually.

However, some of you might face a problem in opening/editing registry value on remote computer as required. Others might not want to edit remote computer registry manually. In such cases, you may use the below mentioned freeware tools and utilities which will help you enable/ disable distant desktop/PC remotely.

1. Remote Desktop Enabler by IntelliAdmin

This program helps you remotely enable RD feature in Windows XP, 2003 and 2000.

You need to download the Remote Desktop Enabler, i.e. RDPRemoteEnabler_Free.exe.

2. Remote Desktop Enable/ Remote Desktop Protocol (RDP) Enable Utility by Acroni

This utility helps you enable RDC on remote PCs/ servers via host name or IP address. It changes port number that Remote Desktop Protocol (RDP) listens on. It also allows you to add users to “RD Users Group” on any local server/ workstation.

You need to download the RDP enable utility, i.e. RDPEnable.zip

3. Script to Enable Remote RDP

This command script helps you modify the registry of a remote system to turn on RD for multiple computers and servers in one go. For using this script, just open command prompt, access the folder that contains command batch script and type in the command mentioned below.

RemoteRDPEnable Computer1 Computer2 Computer3 ….. ComputerN

In the command above, Computer1, Computer2, Computer3 and ComputerN basically represent computer name/ host name for which you wish to remotely enable RD.

You need to download the script, i.e. RemoteRDPEnable.cmd

4. RD Enable XP

It allows you to turn on RDC on remote computer which is running Professional Edition of Windows XP. You need to use it as an administrator within domain environment. RD Enable XP forces Windows Firewall to allow RDC client which possesses a PsExec licensed copy.

Just download RD_Enable_XP_v1.zip.

5. PsExec Command for Executing SysInternals PSTools

First download PSTools from the site SysInternals.com (part of Microsoft). Install it and execute the command mentioned below:

psexec \\computername reg add “hklm\system\currentcontrolset\control\terminal server” /f /v fDenyTSConnections /t REG_DWORD /d 0

You need to replace “computername” in the above command with the actual name of the computer.

6. Windows Management Instrumentation (WMI) Command-Line

Run the below mentioned commands in the command prompt:

Incase of Windows Server 2003/ 2008,

wmic /node:”[ComputerName (in FQDN format)]” RDTOGGLE WHERE ServerName=”ComputerName” CALL SetAllowTSConnections 1

Incase of Windows XP SP2/SP3,

wmic /node:”HostName” path win32_terminalservicesetting where servername=”HostName” call SetAllowTSConnections 1

You need to replace ComputerName, HostName, or [ComputerName (in FQDN format)], with actual host name/ computer name.

You need to note that remotely enabled RD feature will work only if you logon to your PC with admin account or the user account having administrative privileges on remote computer.

Remote Desktop Connection Lost Dute To Network Error – Windows 7, 2008, Vista, RDP Delay Slow Problem

In Windows Vista, if you are using the Remote Desktop Connection client to connect to servers running Microsoft Windows Server 2003 64-bit (x64), the Remote Desktop Protocol (RDP) connections often slows down to a crawl and the screen refreshes at an extremely slow rate. This happens particularly after you have installed the Windows Server 2003 Service Pack 2 (SP2) x64 release. However, this problem does not occur in the RDP client on XP and the other Windows systems.

Some of the typical symptoms of this problem are:

  • long delay for connection to be established to the remote server,
  • the remote computer display window on the local PC refreshes very slowly,
  • the login screen (after being connected) refreshes slowly,
  • following this, all further displays stream slowly, as if network is congested,
  • the Remote Desktop Connection is disconnected, requiring you to reestablish the connection.

These problems arise because of the advanced network functions in Vista that try to optimize network transfer speed and utilize the available bandwidth to the full. Hence, the obvious solution is to disable these network settings.

To disable the network tuning functions that affect your RDP connection speed, open an elevated command prompt with administrator rights, and then enter the following commands:

netsh interface tcp set global rss=disabled

netsh interface tcp set global autotuninglevel=disabled

You can also combine the above two commands into single command in the following manner:

netsh interface tcp set global rss=disabled autotuninglevel=disabled

Restart the computer after this is done. This time, your RDP connection should be working at good speed.