Index: trunk/src/VBox/Main/ConsoleImpl.cpp
===================================================================
--- trunk/src/VBox/Main/ConsoleImpl.cpp	(revision 33369)
+++ trunk/src/VBox/Main/ConsoleImpl.cpp	(revision 33386)
@@ -276,6 +276,6 @@
         kOnCPUChanged,
         kOnCPUExecutionCapChanged,
-        kOnVRDPServerChanged,
-        kOnRemoteDisplayInfoChanged,
+        kOnVRDEServerChanged,
+        kOnVRDEServerInfoChanged,
         kOnUSBControllerChanged,
         kOnUSBDeviceStateChanged,
@@ -426,5 +426,5 @@
 
 #ifdef VBOX_WITH_VRDP
-    rc = mMachine->COMGETTER(VRDPServer)(unconst(mVRDPServer).asOutParam());
+    rc = mMachine->COMGETTER(VRDEServer)(unconst(mVRDEServer).asOutParam());
     AssertComRCReturnRC(rc);
 #endif
@@ -453,6 +453,6 @@
     AssertComRCReturnRC(rc);
 
-    unconst(mRemoteDisplayInfo).createObject();
-    rc = mRemoteDisplayInfo->init(this);
+    unconst(mVRDEServerInfo).createObject();
+    rc = mVRDEServerInfo->init(this);
     AssertComRCReturnRC(rc);
 
@@ -555,8 +555,8 @@
     mUSBDevices.clear();
 
-    if (mRemoteDisplayInfo)
-    {
-        mRemoteDisplayInfo->uninit();
-        unconst(mRemoteDisplayInfo).setNull();;
+    if (mVRDEServerInfo)
+    {
+        mVRDEServerInfo->uninit();
+        unconst(mVRDEServerInfo).setNull();;
     }
 
@@ -598,5 +598,5 @@
 
 #ifdef VBOX_WITH_VRDP
-    unconst(mVRDPServer).setNull();
+    unconst(mVRDEServer).setNull();
 #endif
 
@@ -644,5 +644,5 @@
     {
         Bstr clientName;
-        mRemoteDisplayInfo->COMGETTER(ClientName)(clientName.asOutParam());
+        mVRDEServerInfo->COMGETTER(ClientName)(clientName.asOutParam());
 
         mMachine->SetGuestProperty(Bstr(pszPropertyName).raw(),
@@ -753,10 +753,10 @@
     AssertComRCReturn(hrc, VERR_ACCESS_DENIED);
 
-    VRDPAuthType_T authType = VRDPAuthType_Null;
-    hrc = mVRDPServer->COMGETTER(AuthType)(&authType);
+    AuthType_T authType = AuthType_Null;
+    hrc = mVRDEServer->COMGETTER(AuthType)(&authType);
     AssertComRCReturn(hrc, VERR_ACCESS_DENIED);
 
     ULONG authTimeout = 0;
-    hrc = mVRDPServer->COMGETTER(AuthTimeout)(&authTimeout);
+    hrc = mVRDEServer->COMGETTER(AuthTimeout)(&authTimeout);
     AssertComRCReturn(hrc, VERR_ACCESS_DENIED);
 
@@ -768,9 +768,9 @@
     LogRel(("VRDPAUTH: User: [%s]. Domain: [%s]. Authentication type: [%s]\n",
                 pszUser, pszDomain,
-                authType == VRDPAuthType_Null?
+                authType == AuthType_Null?
                     "Null":
-                    (authType == VRDPAuthType_External?
+                    (authType == AuthType_External?
                         "External":
-                        (authType == VRDPAuthType_Guest?
+                        (authType == AuthType_Guest?
                             "Guest":
                             "INVALID"
@@ -781,5 +781,5 @@
     switch (authType)
     {
-        case VRDPAuthType_Null:
+        case AuthType_Null:
         {
             result = VRDPAuthAccessGranted;
@@ -787,5 +787,5 @@
         }
 
-        case VRDPAuthType_External:
+        case AuthType_External:
         {
             /* Call the external library. */
@@ -802,5 +802,5 @@
         } /* pass through */
 
-        case VRDPAuthType_Guest:
+        case AuthType_Guest:
         {
             guestJudgement = VRDPAuthGuestNotReacted;
@@ -848,5 +848,5 @@
             }
 
-            if (authType == VRDPAuthType_External)
+            if (authType == AuthType_External)
             {
                 LogRel(("VRDPAUTH: Guest judgement %d.\n", guestJudgement));
@@ -886,9 +886,9 @@
     /* Multiconnection check must be made after authentication, so bad clients would not interfere with a good one. */
     BOOL allowMultiConnection = FALSE;
-    hrc = mVRDPServer->COMGETTER(AllowMultiConnection)(&allowMultiConnection);
+    hrc = mVRDEServer->COMGETTER(AllowMultiConnection)(&allowMultiConnection);
     AssertComRCReturn(hrc, VERR_ACCESS_DENIED);
 
     BOOL reuseSingleConnection = FALSE;
-    hrc = mVRDPServer->COMGETTER(ReuseSingleConnection)(&reuseSingleConnection);
+    hrc = mVRDEServer->COMGETTER(ReuseSingleConnection)(&reuseSingleConnection);
     AssertComRCReturn(hrc, VERR_ACCESS_DENIED);
 
@@ -1054,9 +1054,9 @@
     AssertComRC(hrc);
 
-    VRDPAuthType_T authType = VRDPAuthType_Null;
-    hrc = mVRDPServer->COMGETTER(AuthType)(&authType);
+    AuthType_T authType = AuthType_Null;
+    hrc = mVRDEServer->COMGETTER(AuthType)(&authType);
     AssertComRC(hrc);
 
-    if (authType == VRDPAuthType_External)
+    if (authType == AuthType_External)
         mConsoleVRDPServer->AuthDisconnect(uuid, u32ClientId);
 
@@ -1624,7 +1624,7 @@
 }
 
-STDMETHODIMP Console::COMGETTER(RemoteDisplayInfo)(IRemoteDisplayInfo **aRemoteDisplayInfo)
-{
-    CheckComArgOutPointerValid(aRemoteDisplayInfo);
+STDMETHODIMP Console::COMGETTER(VRDEServerInfo)(IVRDEServerInfo **aVRDEServerInfo)
+{
+    CheckComArgOutPointerValid(aVRDEServerInfo);
 
     AutoCaller autoCaller(this);
@@ -1632,5 +1632,5 @@
 
     /* mDisplay is constant during life time, no need to lock */
-    mRemoteDisplayInfo.queryInterfaceTo(aRemoteDisplayInfo);
+    mVRDEServerInfo.queryInterfaceTo(aVRDEServerInfo);
 
     return S_OK;
@@ -3938,9 +3938,9 @@
 
 /**
- * Called by IInternalSessionControl::OnVRDPServerChange().
+ * Called by IInternalSessionControl::OnVRDEServerChange().
  *
  * @note Locks this object for writing.
  */
-HRESULT Console::onVRDPServerChange(BOOL aRestart)
+HRESULT Console::onVRDEServerChange(BOOL aRestart)
 {
     AutoCaller autoCaller(this);
@@ -3951,5 +3951,5 @@
     HRESULT rc = S_OK;
 
-    if (    mVRDPServer
+    if (    mVRDEServer
         &&  (   mMachineState == MachineState_Running
              || mMachineState == MachineState_Teleporting
@@ -3960,5 +3960,5 @@
         BOOL vrdpEnabled = FALSE;
 
-        rc = mVRDPServer->COMGETTER(Enabled)(&vrdpEnabled);
+        rc = mVRDEServer->COMGETTER(Enabled)(&vrdpEnabled);
         ComAssertComRCRetRC(rc);
 
@@ -3991,5 +3991,5 @@
     /* notify console callbacks on success */
     if (SUCCEEDED(rc))
-        CONSOLE_DO_CALLBACKS0(OnVRDPServerChanged);
+        CONSOLE_DO_CALLBACKS0(OnVRDEServerChanged);
 
     return rc;
@@ -3999,5 +3999,5 @@
  * @note Locks this object for reading.
  */
-void Console::onRemoteDisplayInfoChange()
+void Console::onVRDEServerInfoChange()
 {
     AutoCaller autoCaller(this);
@@ -4006,5 +4006,5 @@
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    CONSOLE_DO_CALLBACKS0(OnRemoteDisplayInfoChanged);
+    CONSOLE_DO_CALLBACKS0(OnVRDEServerInfoChanged);
 }
 
@@ -7431,5 +7431,4 @@
 
 #ifdef VBOX_WITH_VRDP
-
         /* Create the VRDP server. In case of headless operation, this will
          * also create the framebuffer, required at VM creation.
@@ -7449,13 +7448,19 @@
             Utf8Str errMsg;
             Bstr bstr;
-            console->mVRDPServer->COMGETTER(Ports)(bstr.asOutParam());
+            console->mVRDEServer->GetVRDEProperty(Bstr("TCP/Ports").raw(), bstr.asOutParam());
             Utf8Str ports = bstr;
-            errMsg = Utf8StrFmt(tr("VRDP server can't bind to a port: %s"),
+            errMsg = Utf8StrFmt(tr("VirtualBox Remote Desktop Extension server can't bind to the port: %s"),
                                 ports.c_str());
-            LogRel(("Warning: failed to launch VRDP server (%Rrc): '%s'\n",
+            LogRel(("VRDE: Warning: failed to launch VRDE server (%Rrc): '%s'\n",
                     vrc, errMsg.c_str()));
         }
+        else if (vrc == VINF_NOT_SUPPORTED)
+        {
+            /* This means that the VRDE is not installed. */
+            LogRel(("VRDE: VirtualBox Remote Desktop Extension is not available.\n"));
+        }
         else if (RT_FAILURE(vrc))
         {
+            /* Fail, if the server is installed but can't start. */
             Utf8Str errMsg;
             switch (vrc)
@@ -7463,12 +7468,13 @@
                 case VERR_FILE_NOT_FOUND:
                 {
-                    errMsg = Utf8StrFmt(tr("Could not load the VRDP library"));
+                    /* VRDE library file is missing. */
+                    errMsg = Utf8StrFmt(tr("Could not find the VirtualBox Remote Desktop Extension library."));
                     break;
                 }
                 default:
-                    errMsg = Utf8StrFmt(tr("Failed to launch VRDP server (%Rrc)"),
+                    errMsg = Utf8StrFmt(tr("Failed to launch Remote Desktop Extension server (%Rrc)"),
                                         vrc);
             }
-            LogRel(("Failed to launch VRDP server (%Rrc), error message: '%s'\n",
+            LogRel(("VRDE: Failed: (%Rrc), error message: '%s'\n",
                      vrc, errMsg.c_str()));
             throw setErrorStatic(E_FAIL, errMsg.c_str());
Index: trunk/src/VBox/Main/ConsoleVRDPServer.cpp
===================================================================
--- trunk/src/VBox/Main/ConsoleVRDPServer.cpp	(revision 33369)
+++ trunk/src/VBox/Main/ConsoleVRDPServer.cpp	(revision 33386)
@@ -582,5 +582,5 @@
         case VRDE_QP_NETWORK_PORT:
         {
-            /* This is obsolete, the VRDP server uses VRDE_QP_NETWORK_PORT_RANGE instead. */
+            /* This is obsolete, the VRDE server uses VRDE_QP_NETWORK_PORT_RANGE instead. */
             ULONG port = 0;
 
@@ -601,5 +601,5 @@
         {
             com::Bstr bstr;
-            server->mConsole->getVRDPServer()->COMGETTER(NetAddress)(bstr.asOutParam());
+            server->mConsole->getVRDEServer()->GetVRDEProperty(Bstr("TCP/Address").raw(), bstr.asOutParam());
 
             /* The server expects UTF8. */
@@ -650,5 +650,5 @@
         {
             com::Bstr bstr;
-            HRESULT hrc = server->mConsole->getVRDPServer()->COMGETTER(Ports)(bstr.asOutParam());
+            HRESULT hrc = server->mConsole->getVRDEServer()->GetVRDEProperty(Bstr("TCP/Ports").raw(), bstr.asOutParam());
 
             if (hrc != S_OK)
@@ -692,5 +692,5 @@
             BOOL fVideoEnabled = FALSE;
 
-            server->mConsole->getVRDPServer()->COMGETTER(VideoChannel)(&fVideoEnabled);
+            server->mConsole->getVRDEServer()->COMGETTER(VideoChannel)(&fVideoEnabled);
 
             if (cbBuffer >= sizeof(uint32_t))
@@ -711,5 +711,5 @@
             ULONG ulQuality = 0;
 
-            server->mConsole->getVRDPServer()->COMGETTER(VideoChannelQuality)(&ulQuality);
+            server->mConsole->getVRDEServer()->COMGETTER(VideoChannelQuality)(&ulQuality);
 
             if (cbBuffer >= sizeof(uint32_t))
@@ -844,5 +844,5 @@
             }
 
-            server->mConsole->onRemoteDisplayInfoChange();
+            server->mConsole->onVRDEServerInfoChange();
         } break;
 
@@ -1256,14 +1256,56 @@
 #ifdef VBOX_WITH_VRDP
     int rc = VINF_SUCCESS;
-    IVRDPServer *vrdpserver = mConsole->getVRDPServer();
-    Assert(vrdpserver);
-    BOOL vrdpEnabled = FALSE;
-
-    HRESULT rc2 = vrdpserver->COMGETTER(Enabled)(&vrdpEnabled);
-    AssertComRC(rc2);
-
-    if (SUCCEEDED(rc2) && vrdpEnabled)
-    {
-        if (loadVRDPLibrary())
+
+    /* 
+     * Check that a VRDE library name is set.
+     */
+    Utf8Str filename;
+
+    ComPtr<IMachine> machine;
+    HRESULT hrc = mConsole->COMGETTER(Machine)(machine.asOutParam());
+
+    if (SUCCEEDED(hrc))
+    {
+        ComPtr<IVirtualBox> virtualBox;
+        hrc = machine->COMGETTER(Parent)(virtualBox.asOutParam());
+
+        if (SUCCEEDED(hrc))
+        {
+            ComPtr<ISystemProperties> systemProperties;
+            hrc = virtualBox->COMGETTER(SystemProperties)(systemProperties.asOutParam());
+
+            if (SUCCEEDED(hrc))
+            {
+                Bstr library;
+                hrc = systemProperties->COMGETTER(DefaultVRDELibrary)(library.asOutParam());
+
+                if (SUCCEEDED(hrc))
+                {
+                    filename = library;
+                }
+            }
+        }
+    }
+
+    if (FAILED(hrc) || filename.isEmpty())
+    {
+        return VINF_NOT_SUPPORTED;
+    }
+
+    /*
+     * Load the VRDE library and start the server, if it is enabled.
+     */
+    IVRDEServer *server = mConsole->getVRDEServer();
+    Assert(server);
+    BOOL fEnabled = FALSE;
+
+    hrc = server->COMGETTER(Enabled)(&fEnabled);
+    AssertComRC(hrc);
+
+    if (SUCCEEDED(hrc) && fEnabled)
+    {
+        rc = loadVRDPLibrary(filename.c_str());
+
+        if (RT_SUCCESS(rc))
         {
             rc = mpfnVRDECreateServer(&mCallbacks.header, this, (VRDEINTERFACEHDR **)&mpEntryPoints, &mhServer);
@@ -1276,10 +1318,7 @@
             }
             else if (rc != VERR_NET_ADDRESS_IN_USE)
-                AssertMsgFailed(("Could not start VRDP server: rc = %Rrc\n", rc));
-        }
-        else
-        {
-            AssertMsgFailed(("Could not load the VRDP library\n"));
-            rc = VERR_FILE_NOT_FOUND;
+            {
+                LogRel(("VRDE: Could not start VRDP server rc = %Rrc\n", rc));
+            }
         }
     }
@@ -1509,5 +1548,5 @@
 
         Bstr authLibrary;
-        systemProperties->COMGETTER(RemoteDisplayAuthLibrary)(authLibrary.asOutParam());
+        systemProperties->COMGETTER(VRDEAuthLibrary)(authLibrary.asOutParam());
 
         Utf8Str filename = authLibrary;
@@ -2131,6 +2170,5 @@
 
 #ifdef VBOX_WITH_VRDP
-/* note: static function now! */
-bool ConsoleVRDPServer::loadVRDPLibrary(void)
+/* static */ int ConsoleVRDPServer::loadVRDPLibrary(const char *pszLibraryName)
 {
     int rc = VINF_SUCCESS;
@@ -2138,10 +2176,8 @@
     if (!mVRDPLibrary)
     {
-        rc = SUPR3HardenedLdrLoadAppPriv("VBoxVRDP", &mVRDPLibrary);
+        rc = SUPR3HardenedLdrLoadAppPriv(pszLibraryName, &mVRDPLibrary);
 
         if (RT_SUCCESS(rc))
         {
-            LogFlow(("VRDPServer::loadLibrary(): successfully loaded VRDP library.\n"));
-
             struct SymbolEntry
             {
@@ -2163,8 +2199,7 @@
                 rc = RTLdrGetSymbol(mVRDPLibrary, symbols[i].name, symbols[i].ppfn);
 
-                AssertMsgRC(rc, ("Error resolving VRDP symbol %s\n", symbols[i].name));
-
                 if (RT_FAILURE(rc))
                 {
+                    LogRel(("VRDE: Error resolving symbol '%s', rc %Rrc.\n", symbols[i].name, rc));
                     break;
                 }
@@ -2173,10 +2208,13 @@
         else
         {
-            LogRel(("VRDPServer::loadLibrary(): failed to load VRDP library! VRDP not available: rc = %Rrc\n", rc));
+            if (rc != VERR_FILE_NOT_FOUND)
+            {
+                LogRel(("VRDE: Error loading the library '%s' rc = %Rrc.\n", pszLibraryName, rc));
+            }
+
             mVRDPLibrary = NULL;
         }
     }
 
-    // just to be safe
     if (RT_FAILURE(rc))
     {
@@ -2188,30 +2226,30 @@
     }
 
-    return (mVRDPLibrary != NULL);
+    return rc;
 }
 #endif /* VBOX_WITH_VRDP */
 
 /*
- * IRemoteDisplayInfo implementation.
+ * IVRDEServerInfo implementation.
  */
 // constructor / destructor
 /////////////////////////////////////////////////////////////////////////////
 
-RemoteDisplayInfo::RemoteDisplayInfo()
+VRDEServerInfo::VRDEServerInfo()
     : mParent(NULL)
 {
 }
 
-RemoteDisplayInfo::~RemoteDisplayInfo()
-{
-}
-
-
-HRESULT RemoteDisplayInfo::FinalConstruct()
+VRDEServerInfo::~VRDEServerInfo()
+{
+}
+
+
+HRESULT VRDEServerInfo::FinalConstruct()
 {
     return S_OK;
 }
 
-void RemoteDisplayInfo::FinalRelease()
+void VRDEServerInfo::FinalRelease()
 {
     uninit();
@@ -2224,5 +2262,5 @@
  * Initializes the guest object.
  */
-HRESULT RemoteDisplayInfo::init(Console *aParent)
+HRESULT VRDEServerInfo::init(Console *aParent)
 {
     LogFlowThisFunc(("aParent=%p\n", aParent));
@@ -2246,5 +2284,5 @@
  *  Called either from FinalRelease() or by the parent when it gets destroyed.
  */
-void RemoteDisplayInfo::uninit()
+void VRDEServerInfo::uninit()
 {
     LogFlowThisFunc(("\n"));
@@ -2258,9 +2296,9 @@
 }
 
-// IRemoteDisplayInfo properties
+// IVRDEServerInfo properties
 /////////////////////////////////////////////////////////////////////////////
 
 #define IMPL_GETTER_BOOL(_aType, _aName, _aIndex)                         \
-    STDMETHODIMP RemoteDisplayInfo::COMGETTER(_aName)(_aType *a##_aName)  \
+    STDMETHODIMP VRDEServerInfo::COMGETTER(_aName)(_aType *a##_aName)  \
     {                                                                     \
         if (!a##_aName)                                                   \
@@ -2286,5 +2324,5 @@
 
 #define IMPL_GETTER_SCALAR(_aType, _aName, _aIndex, _aValueMask)          \
-    STDMETHODIMP RemoteDisplayInfo::COMGETTER(_aName)(_aType *a##_aName)  \
+    STDMETHODIMP VRDEServerInfo::COMGETTER(_aName)(_aType *a##_aName)  \
     {                                                                     \
         if (!a##_aName)                                                   \
@@ -2311,5 +2349,5 @@
 
 #define IMPL_GETTER_BSTR(_aType, _aName, _aIndex)                         \
-    STDMETHODIMP RemoteDisplayInfo::COMGETTER(_aName)(_aType *a##_aName)  \
+    STDMETHODIMP VRDEServerInfo::COMGETTER(_aName)(_aType *a##_aName)  \
     {                                                                     \
         if (!a##_aName)                                                   \
@@ -2338,5 +2376,5 @@
         if (!pchBuffer)                                                   \
         {                                                                 \
-            Log(("RemoteDisplayInfo::"                                    \
+            Log(("VRDEServerInfo::"                                       \
                  #_aName                                                  \
                  ": Failed to allocate memory %d bytes\n", cbOut));       \
Index: trunk/src/VBox/Main/MachineImpl.cpp
===================================================================
--- trunk/src/VBox/Main/MachineImpl.cpp	(revision 33369)
+++ trunk/src/VBox/Main/MachineImpl.cpp	(revision 33386)
@@ -2147,8 +2147,8 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(VRDPServer)(IVRDPServer **vrdpServer)
+STDMETHODIMP Machine::COMGETTER(VRDEServer)(IVRDEServer **vrdeServer)
 {
 #ifdef VBOX_WITH_VRDP
-    if (!vrdpServer)
+    if (!vrdeServer)
         return E_POINTER;
 
@@ -2158,10 +2158,10 @@
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    Assert(!!mVRDPServer);
-    mVRDPServer.queryInterfaceTo(vrdpServer);
+    Assert(!!mVRDEServer);
+    mVRDEServer.queryInterfaceTo(vrdeServer);
 
     return S_OK;
 #else
-    NOREF(vrdpServer);
+    NOREF(vrde);
     ReturnComNotImplemented();
 #endif
@@ -5988,8 +5988,15 @@
         || strType == "capture"
 #ifdef VBOX_WITH_VRDP
-        || strType == "vrdp"
+        || strType == "vrdp" /* Deprecated. Same as headless. */
 #endif
        )
     {
+        /* On pre-4.0 the "headless" type was used for passing "--vrdp off" to VBoxHeadless to let it work in OSE,
+         * which did not contain VRDP server. In VBox 4.0 the remote desktop server (VRDE) is optional,
+         * and a VM works even if the server has not been installed.
+         * So in 4.0 the "headless" behavior remains the same for default VBox installations.
+         * Only if a VRDE has been installed and the VM enables it, the "headless" will work
+         * differently in 4.0 and 3.x.
+         */
         const char VBoxHeadless_exe[] = "VBoxHeadless" HOSTSUFF_EXE;
         Assert(sz >= sizeof(VBoxHeadless_exe));
@@ -5997,17 +6004,9 @@
 
         Utf8Str idStr = mData->mUuid.toString();
-        /* Leave space for 2 args, as "headless" needs --vrdp off on non-OSE. */
-        const char * args[] = {szPath, "--comment", mUserData->s.strName.c_str(), "--startvm", idStr.c_str(), 0, 0, 0 };
-#ifdef VBOX_WITH_VRDP
-        if (strType == "headless")
-        {
-            unsigned pos = RT_ELEMENTS(args) - 3;
-            args[pos++] = "--vrdp";
-            args[pos] = "off";
-        }
-#endif
+        /* Leave space for "--capture" arg. */
+        const char * args[] = {szPath, "--comment", mUserData->s.strName.c_str(), "--startvm", idStr.c_str(), 0, 0 };
         if (strType == "capture")
         {
-            unsigned pos = RT_ELEMENTS(args) - 3;
+            unsigned pos = RT_ELEMENTS(args) - 2;
             args[pos] = "--capture";
         }
@@ -6541,7 +6540,7 @@
 
 #ifdef VBOX_WITH_VRDP
-    /* create an associated VRDPServer object (default is disabled) */
-    unconst(mVRDPServer).createObject();
-    mVRDPServer->init(this);
+    /* create an associated VRDE object (default is disabled) */
+    unconst(mVRDEServer).createObject();
+    mVRDEServer->init(this);
 #endif
 
@@ -6640,8 +6639,8 @@
 
 #ifdef VBOX_WITH_VRDP
-    if (mVRDPServer)
-    {
-        mVRDPServer->uninit();
-        unconst(mVRDPServer).setNull();
+    if (mVRDEServer)
+    {
+        mVRDEServer->uninit();
+        unconst(mVRDEServer).setNull();
     }
 #endif
@@ -7150,6 +7149,6 @@
 
 #ifdef VBOX_WITH_VRDP
-        /* RemoteDisplay */
-        rc = mVRDPServer->loadSettings(data.vrdpSettings);
+        /* VRDEServer */
+        rc = mVRDEServer->loadSettings(data.vrdeSettings);
         if (FAILED(rc)) return rc;
 #endif
@@ -8183,6 +8182,6 @@
 
 #ifdef VBOX_WITH_VRDP
-        /* VRDP settings (optional) */
-        rc = mVRDPServer->saveSettings(data.vrdpSettings);
+        /* VRDEServer settings (optional) */
+        rc = mVRDEServer->saveSettings(data.vrdeSettings);
         if (FAILED(rc)) throw rc;
 #endif
@@ -9329,6 +9328,6 @@
 
 #ifdef VBOX_WITH_VRDP
-    if (mVRDPServer && (mData->flModifications & IsModified_VRDPServer))
-        mVRDPServer->rollback();
+    if (mVRDEServer && (mData->flModifications & IsModified_VRDEServer))
+        mVRDEServer->rollback();
 #endif
 
@@ -9381,6 +9380,6 @@
             that->onSharedFolderChange();
 
-        if (flModifications & IsModified_VRDPServer)
-            that->onVRDPServerChange(/* aRestart */ TRUE);
+        if (flModifications & IsModified_VRDEServer)
+            that->onVRDEServerChange(/* aRestart */ TRUE);
         if (flModifications & IsModified_USB)
             that->onUSBControllerChange();
@@ -9431,5 +9430,5 @@
     mBIOSSettings->commit();
 #ifdef VBOX_WITH_VRDP
-    mVRDPServer->commit();
+    mVRDEServer->commit();
 #endif
     mAudioAdapter->commit();
@@ -9563,5 +9562,5 @@
     mBIOSSettings->copyFrom(aThat->mBIOSSettings);
 #ifdef VBOX_WITH_VRDP
-    mVRDPServer->copyFrom(aThat->mVRDPServer);
+    mVRDEServer->copyFrom(aThat->mVRDEServer);
 #endif
     mAudioAdapter->copyFrom(aThat->mAudioAdapter);
@@ -9892,7 +9891,7 @@
     mBIOSSettings->init(this, aMachine->mBIOSSettings);
 #ifdef VBOX_WITH_VRDP
-    /* create another VRDPServer object that will be mutable */
-    unconst(mVRDPServer).createObject();
-    mVRDPServer->init(this, aMachine->mVRDPServer);
+    /* create another VRDEServer object that will be mutable */
+    unconst(mVRDEServer).createObject();
+    mVRDEServer->init(this, aMachine->mVRDEServer);
 #endif
     /* create another audio adapter object that will be mutable */
@@ -11082,5 +11081,5 @@
  *  @note Locks this object for reading.
  */
-HRESULT SessionMachine::onVRDPServerChange(BOOL aRestart)
+HRESULT SessionMachine::onVRDEServerChange(BOOL aRestart)
 {
     LogFlowThisFunc(("\n"));
@@ -11099,5 +11098,5 @@
         return S_OK;
 
-    return directControl->OnVRDPServerChange(aRestart);
+    return directControl->OnVRDEServerChange(aRestart);
 }
 
Index: trunk/src/VBox/Main/SessionImpl.cpp
===================================================================
--- trunk/src/VBox/Main/SessionImpl.cpp	(revision 33369)
+++ trunk/src/VBox/Main/SessionImpl.cpp	(revision 33386)
@@ -610,5 +610,5 @@
 }
 
-STDMETHODIMP Session::OnVRDPServerChange(BOOL aRestart)
+STDMETHODIMP Session::OnVRDEServerChange(BOOL aRestart)
 {
     LogFlowThisFunc(("\n"));
@@ -621,5 +621,5 @@
     AssertReturn(mType == SessionType_WriteLock, VBOX_E_INVALID_OBJECT_STATE);
 
-    return mConsole->onVRDPServerChange(aRestart);
+    return mConsole->onVRDEServerChange(aRestart);
 }
 
Index: trunk/src/VBox/Main/SnapshotImpl.cpp
===================================================================
--- trunk/src/VBox/Main/SnapshotImpl.cpp	(revision 33369)
+++ trunk/src/VBox/Main/SnapshotImpl.cpp	(revision 33386)
@@ -1007,6 +1007,6 @@
 
 #ifdef VBOX_WITH_VRDP
-    unconst(mVRDPServer).createObject();
-    mVRDPServer->initCopy(this, mPeer->mVRDPServer);
+    unconst(mVRDEServer).createObject();
+    mVRDEServer->initCopy(this, mPeer->mVRDEServer);
 #endif
 
@@ -1100,6 +1100,6 @@
 
 #ifdef VBOX_WITH_VRDP
-    unconst(mVRDPServer).createObject();
-    mVRDPServer->init(this);
+    unconst(mVRDEServer).createObject();
+    mVRDEServer->init(this);
 #endif
 
Index: trunk/src/VBox/Main/SystemPropertiesImpl.cpp
===================================================================
--- trunk/src/VBox/Main/SystemPropertiesImpl.cpp	(revision 33369)
+++ trunk/src/VBox/Main/SystemPropertiesImpl.cpp	(revision 33386)
@@ -87,5 +87,6 @@
     setDefaultHardDiskFormat(Utf8Str::Empty);
 
-    setRemoteDisplayAuthLibrary(Utf8Str::Empty);
+    setVRDEAuthLibrary(Utf8Str::Empty);
+    setDefaultVRDELibrary(Utf8Str::Empty);
 
     m->ulLogHistoryCount = 3;
@@ -666,19 +667,19 @@
 }
 
-STDMETHODIMP SystemProperties::COMGETTER(RemoteDisplayAuthLibrary)(BSTR *aRemoteDisplayAuthLibrary)
-{
-    CheckComArgOutPointerValid(aRemoteDisplayAuthLibrary);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    m->strRemoteDisplayAuthLibrary.cloneTo(aRemoteDisplayAuthLibrary);
-
-    return S_OK;
-}
-
-STDMETHODIMP SystemProperties::COMSETTER(RemoteDisplayAuthLibrary)(IN_BSTR aRemoteDisplayAuthLibrary)
+STDMETHODIMP SystemProperties::COMGETTER(VRDEAuthLibrary)(BSTR *aVRDEAuthLibrary)
+{
+    CheckComArgOutPointerValid(aVRDEAuthLibrary);
+
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    m->strVRDEAuthLibrary.cloneTo(aVRDEAuthLibrary);
+
+    return S_OK;
+}
+
+STDMETHODIMP SystemProperties::COMSETTER(VRDEAuthLibrary)(IN_BSTR aVRDEAuthLibrary)
 {
     AutoCaller autoCaller(this);
@@ -686,5 +687,5 @@
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-    HRESULT rc = setRemoteDisplayAuthLibrary(aRemoteDisplayAuthLibrary);
+    HRESULT rc = setVRDEAuthLibrary(aVRDEAuthLibrary);
     alock.release();
 
@@ -732,4 +733,37 @@
 }
 
+STDMETHODIMP SystemProperties::COMGETTER(DefaultVRDELibrary)(BSTR *aVRDELibrary)
+{
+    CheckComArgOutPointerValid(aVRDELibrary);
+
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    m->strDefaultVRDELibrary.cloneTo(aVRDELibrary);
+
+    return S_OK;
+}
+
+STDMETHODIMP SystemProperties::COMSETTER(DefaultVRDELibrary)(IN_BSTR aVRDELibrary)
+{
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+    HRESULT rc = setDefaultVRDELibrary(aVRDELibrary);
+    alock.release();
+
+    if (SUCCEEDED(rc))
+    {
+        // VirtualBox::saveSettings() needs vbox write lock
+        AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS);
+        rc = mParent->saveSettings();
+    }
+
+    return rc;
+}
+
 STDMETHODIMP SystemProperties::COMGETTER(LogHistoryCount)(ULONG *count)
 {
@@ -794,8 +828,11 @@
     if (FAILED(rc)) return rc;
 
-    rc = setRemoteDisplayAuthLibrary(data.strRemoteDisplayAuthLibrary);
+    rc = setVRDEAuthLibrary(data.strVRDEAuthLibrary);
     if (FAILED(rc)) return rc;
 
     rc = setWebServiceAuthLibrary(data.strWebServiceAuthLibrary);
+    if (FAILED(rc)) return rc;
+
+    rc = setDefaultVRDELibrary(data.strDefaultVRDELibrary);
     if (FAILED(rc)) return rc;
 
@@ -924,10 +961,17 @@
 }
 
-HRESULT SystemProperties::setRemoteDisplayAuthLibrary(const Utf8Str &aPath)
+HRESULT SystemProperties::setVRDEAuthLibrary(const Utf8Str &aPath)
 {
     if (!aPath.isEmpty())
-        m->strRemoteDisplayAuthLibrary = aPath;
+        m->strVRDEAuthLibrary = aPath;
     else
-        m->strRemoteDisplayAuthLibrary = "VRDPAuth";
+        m->strVRDEAuthLibrary = "VRDPAuth";
+
+    return S_OK;
+}
+
+HRESULT SystemProperties::setDefaultVRDELibrary(const Utf8Str &aPath)
+{
+    m->strDefaultVRDELibrary = aPath;
 
     return S_OK;
Index: trunk/src/VBox/Main/VirtualBoxImpl.cpp
===================================================================
--- trunk/src/VBox/Main/VirtualBoxImpl.cpp	(revision 33369)
+++ trunk/src/VBox/Main/VirtualBoxImpl.cpp	(revision 33386)
@@ -4456,3 +4456,18 @@
 }
 
+STDMETHODIMP VirtualBox::VRDERegisterLibrary(IN_BSTR aName)
+{
+    return E_FAIL; /* @todo VRDE */
+}
+
+STDMETHODIMP VirtualBox::VRDEUnregisterLibrary(IN_BSTR aName)
+{
+    return E_FAIL; /* @todo VRDE */
+}
+
+STDMETHODIMP VirtualBox::VRDEListLibraries(ComSafeArrayOut(BSTR, aNames))
+{
+    return E_FAIL; /* @todo VRDE */
+}
+
 /* vi: set tabstop=4 shiftwidth=4 expandtab: */
Index: trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 33369)
+++ trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 33386)
@@ -77,6 +77,6 @@
   implementation, is used.
 
-  All the parts that a typical VirtualBox user interacts with (the Qt GUI,
-  the VBoxManage command-line interface and the VBoxVRDP server) are technically
+  All the parts that a typical VirtualBox user interacts with (the Qt GUI
+  and the VBoxManage command-line interface) are technically
   front-ends to the Main API and only use the interfaces that are documented
   in this Main API documentation. This ensures that, with any given release
@@ -1374,5 +1374,5 @@
   <interface
     name="IVirtualBox" extends="$unknown"
-    uuid="5e887b09-e3f3-4787-b9f3-8ade5d04d675"
+    uuid="2ecb8c49-ce8a-41fc-96da-9a438b44e4b1"
     wsmap="managed"
   >
@@ -2163,4 +2163,37 @@
       <param name="result" type="boolean" dir="return">
         <desc>If firmware of this type and version is available.</desc>
+      </param>
+    </method>
+
+    <method name="VRDERegisterLibrary">
+      <desc>
+        Appends a VRDE library to this VirtualBox installation.
+
+        The library implements a VirtualBox Remote Desktop Extension (VRDE),
+        which is used to remotely connect to the virtual machines.
+
+        The system library extension (".DLL" or ".so") must be omitted.
+        The library must reside in the VirtualBox installation directory.
+      </desc>
+      <param name="name" type="wstring" dir="in">
+        <desc>The library name.</desc>
+      </param>
+    </method>
+
+    <method name="VRDEUnregisterLibrary">
+      <desc>
+        Removes a VRDE library from this VirtualBox installation.
+      </desc>
+      <param name="name" type="wstring" dir="in">
+        <desc>The library name.</desc>
+      </param>
+    </method>
+
+    <method name="VRDEListLibraries">
+      <desc>
+        List registered libraries.
+      </desc>
+      <param name="names" type="wstring" dir="return" safearray="yes">
+        <desc>Array of names of the libraries.</desc>
       </param>
     </method>
@@ -3346,5 +3379,5 @@
   <interface
      name="IMachine" extends="$unknown"
-     uuid="14136b33-438a-45de-884c-550e9eb34f23"
+     uuid="8934e426-1c09-459f-bbc4-58dba016fbbe"
      wsmap="managed"
      >
@@ -3649,6 +3682,6 @@
     </attribute>
 
-    <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
-      <desc>VRDP server object.</desc>
+    <attribute name="VRDEServer" type="IVRDEServer" readonly="yes">
+      <desc>VirtualBox Remote Desktop Extension (VRDE) server object.</desc>
     </attribute>
 
@@ -4124,5 +4157,5 @@
           <ul>
             <li><tt>"gui"</tt>: VirtualBox Qt GUI front-end</li>
-            <li><tt>"vrdp"</tt>: VBoxHeadless (VRDP Server) front-end</li>
+            <li><tt>"headless"</tt>: VBoxHeadless (VRDE Server) front-end</li>
             <li><tt>"sdl"</tt>: VirtualBox SDL front-end</li>
           </ul>
@@ -5627,16 +5660,16 @@
 
   <interface
-     name="IRemoteDisplayInfo" extends="$unknown"
-     uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
+     name="IVRDEServerInfo" extends="$unknown"
+     uuid="6890123c-5218-42ba-9afd-c71699475115"
      wsmap="struct"
      >
      <desc>
-        Contains information about the remote display (VRDP) capabilities and status.
-        This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
+        Contains information about the remote desktop (VRDE) server capabilities and status.
+        This is used in the <link to="IConsole::VRDEServerInfo" /> attribute.
      </desc>
 
     <attribute name="active" type="boolean" readonly="yes">
       <desc>
-        Whether the remote display connection is active.
+        Whether the remote desktop connection is active.
       </desc>
     </attribute>
@@ -5644,7 +5677,7 @@
     <attribute name="port" type="long" readonly="yes">
       <desc>
-        VRDP server port number. If this property is equal to <tt>0</tt>, then
-        the VRDP server failed to start, usually because there are no free TCP
-        ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
+        VRDE server port number. If this property is equal to <tt>0</tt>, then
+        the VRDE server failed to start, usually because there are no free IP
+        ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDE
         server has not yet been started.
       </desc>
@@ -5736,5 +5769,5 @@
   <interface
      name="IConsole" extends="$unknown"
-     uuid="03cb7897-ea17-4e6c-81ae-4bd90be2fde2"
+     uuid="3c4a453e-d27b-44a2-b59d-dda6e1835e57"
      wsmap="managed"
      >
@@ -5829,5 +5862,5 @@
     <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
       <desc>
-        List of USB devices currently attached to the remote VRDP client.
+        List of USB devices currently attached to the remote VRDE client.
         Once a new device is physically attached to the remote host computer,
         it appears in this list and remains there until detached.
@@ -5851,7 +5884,7 @@
     </attribute>
 
-    <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
-      <desc>
-        Interface that provides information on Remote Display (VRDP) connection.
+    <attribute name="VRDEServerInfo" type="IVRDEServerInfo" readonly="yes">
+      <desc>
+        Interface that provides information on Remote Desktop Extension (VRDE) connection.
       </desc>
     </attribute>
@@ -7086,5 +7119,5 @@
      name="ISystemProperties"
      extends="$unknown"
-     uuid="f8fff1f1-eeb4-4483-a2a4-b4186fab5a1e"
+     uuid="2af0100b-fda2-4c6a-8e8f-31e4ba871886"
      wsmap="managed"
      >
@@ -7278,7 +7311,7 @@
     </attribute>
 
-    <attribute name="remoteDisplayAuthLibrary" type="wstring">
-      <desc>
-        Library that provides authentication for VRDP clients. The library
+    <attribute name="VRDEAuthLibrary" type="wstring">
+      <desc>
+        Library that provides authentication for Remote Desktop clients. The library
         is used if a virtual machine's authentication type is set to "external"
         in the VM RemoteDisplay configuration.
@@ -7308,5 +7341,5 @@
         within the <link to="IWebsessionManager::logon" /> implementation.
 
-        As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
+        As opposed to <link to="ISystemProperties::VRDEAuthLibrary" />,
         there is no per-VM setting for this, as the webservice is a global
         resource (if it is running). Only for this setting (for the webservice),
@@ -7317,8 +7350,8 @@
         The initial value of this property is <tt>"VRDPAuth"</tt>,
         meaning that the webservice will use the same authentication
-        library that is used by default for VBoxVRDP (again, see
-        <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
+        library that is used by default for VRDE (again, see
+        <link to="ISystemProperties::VRDEAuthLibrary" />).
         The format and calling convention of authentication libraries
-        is the same for the webservice as it is for VBoxVRDP.
+        is the same for the webservice as it is for VRDE.
 
         <note>
@@ -7326,4 +7359,16 @@
           initial value.
         </note>
+      </desc>
+    </attribute>
+
+    <attribute name="defaultVRDELibrary" type="wstring">
+      <desc>
+        Default VRDE library.
+
+        The default value of this property is an empty string, which means that the
+        VRDE is not available.
+
+        For details about VirtualBox Remote Desktop Extension and how to implement
+        it, please refer to the VirtualBox SDK.
       </desc>
     </attribute>
@@ -11821,5 +11866,5 @@
     <attribute name="remote" type="boolean" readonly="yes">
       <desc>
-        Whether the device is physically connected to a remote VRDP
+        Whether the device is physically connected to a remote VRDE
         client or to a local host machine.
       </desc>
@@ -12248,15 +12293,10 @@
   </interface>
 
-  <!--
-  // IVRDPServer
-  /////////////////////////////////////////////////////////////////////////
-  -->
-
   <enum
-    name="VRDPAuthType"
-    uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
+    name="AuthType"
+    uuid="7eef6ef6-98c2-4dc2-ab35-10d2b292028d"
   >
     <desc>
-      VRDP authentication type.
+      VirtualBox authentication type.
     </desc>
 
@@ -12268,29 +12308,20 @@
   </enum>
 
+  <!--
+  // IVRDEServer
+  /////////////////////////////////////////////////////////////////////////
+  -->
+
   <interface
-     name="IVRDPServer" extends="$unknown"
-     uuid="7aeeb530-0b08-41fe-835d-9be9ec1dbe5c"
+     name="IVRDEServer" extends="$unknown"
+     uuid="f68a6b34-6f09-4040-8de1-e8d746c4a9ea"
      wsmap="managed"
      >
     <attribute name="enabled" type="boolean">
-      <desc>VRDP server status.</desc>
-    </attribute>
-
-    <attribute name="ports" type="wstring">
-      <desc>
-        VRDP server port numbers. The server will try to bind to one of free ports from the list.
-        <note>
-          This is a string of comma separated TCP port numbers or port number ranges.
-          Example <tt>5000,5010-5012,5015</tt>
-        </note>
-      </desc>
-    </attribute>
-
-    <attribute name="netAddress" type="wstring">
-      <desc>VRDP server address.</desc>
-    </attribute>
-
-    <attribute name="authType" type="VRDPAuthType">
-      <desc>VRDP authentication method.</desc>
+      <desc>VRDE server status.</desc>
+    </attribute>
+
+    <attribute name="authType" type="AuthType">
+      <desc>VRDE authentication method.</desc>
     </attribute>
 
@@ -12309,5 +12340,5 @@
       <desc>
         Flag whether the existing connection must be dropped and a new connection
-        must be established by the VRDP server, when a new client connects in single
+        must be established by the VRDE server, when a new client connects in single
         connection mode.
       </desc>
@@ -12316,5 +12347,5 @@
     <attribute name="videoChannel" type="boolean">
       <desc>
-        Flag whether RDP video channel is supported.
+        Flag whether video redirectiron channel is enabled.
       </desc>
     </attribute>
@@ -12325,4 +12356,36 @@
       </desc>
     </attribute>
+
+    <method name="setVRDEProperty">
+      <desc>
+        Sets a VRDE specific property string.
+
+        If you pass @c null or empty string as a key @a value, the given @a key
+        will be deleted.
+
+      </desc>
+      <param name="key" type="wstring" dir="in">
+        <desc>Name of the key to set.</desc>
+      </param>
+      <param name="value" type="wstring" dir="in">
+        <desc>Value to assign to the key.</desc>
+      </param>
+    </method>
+
+    <method name="getVRDEProperty">
+      <desc>
+        Returns a VRDE specific property string.
+
+        If the requested data @a key does not exist, this function will
+        succeed and return an empty string in the @a value argument.
+
+      </desc>
+      <param name="key" type="wstring" dir="in">
+        <desc>Name of the key to get.</desc>
+      </param>
+      <param name="value" type="wstring" dir="return">
+        <desc>Value of the requested key.</desc>
+      </param>
+    </method>
 
   </interface>
@@ -12442,5 +12505,5 @@
   <interface
      name="IInternalSessionControl" extends="$unknown"
-     uuid="0431ef9e-2c2e-42af-87d7-c8f52455f28a"
+     uuid="06ef98a7-f7c0-45ba-bf99-9aca7a4d5530"
      internal="yes"
      wsmap="suppress"
@@ -12631,7 +12694,7 @@
     </method>
 
-    <method name="onVRDPServerChange">
-      <desc>
-        Triggered when settings of the VRDP server object of the
+    <method name="onVRDEServerChange">
+      <desc>
+        Triggered when settings of the VRDE server object of the
         associated virtual machine have changed.
 
@@ -13851,5 +13914,5 @@
   <enum
      name="VBoxEventType"
-     uuid="1728bb3b-4843-4f12-af67-f7a1f69f3a52">
+     uuid="e085d0b1-05e6-4f40-a709-b7266fbdb236">
 
     <desc>
@@ -14013,7 +14076,7 @@
       </desc>
     </const>
-    <const name="OnVRDPServerChanged" value="53">
-      <desc>
-        See <link to="IVRDPServerChangedEvent">IVRDPServerChangedEvent</link>.
+    <const name="OnVRDEServerChanged" value="53">
+      <desc>
+        See <link to="IVRDEServerChangedEvent">IVRDEServerChangedEvent</link>.
       </desc>
     </const>
@@ -14053,7 +14116,7 @@
       </desc>
     </const>
-    <const name="OnRemoteDisplayInfoChanged" value="61">
-      <desc>
-        See <link to="IRemoteDisplayInfoChangedEvent">IRemoteDisplayInfoChangedEvent</link>.
+    <const name="OnVRDEServerInfoChanged" value="61">
+      <desc>
+        See <link to="IVRDEServerInfoChangedEvent">IVRDEServerInfoChangedEvent</link>.
       </desc>
     </const>
@@ -14908,12 +14971,12 @@
 
    <interface
-     name="IVRDPServerChangedEvent" extends="IEvent"
-     uuid="726038B6-6279-4A7A-8037-D041693D1915"
-     wsmap="managed" autogen="VBoxEvent" id="OnVRDPServerChanged"
+     name="IVRDEServerChangedEvent" extends="IEvent"
+     uuid="a06fd66a-3188-4c8c-8756-1395e8cb691c"
+     wsmap="managed" autogen="VBoxEvent" id="OnVRDEServerChanged"
      >
     <desc>
       Notification when a property of the
-      <link to="IMachine::VRDPServer">VRDP server</link> changes.
-      Interested callees should use IVRDPServer methods and attributes to
+      <link to="IMachine::VRDEServer">VRDE server</link> changes.
+      Interested callees should use IVRDEServer methods and attributes to
       find out what has changed.
     </desc>
@@ -14921,11 +14984,11 @@
 
    <interface
-     name="IRemoteDisplayInfoChangedEvent" extends="IEvent"
-     uuid="65B556C5-2A99-47D8-B311-FC177F0914CD"
-     wsmap="managed" autogen="VBoxEvent" id="OnRemoteDisplayInfoChanged"
+     name="IVRDEServerInfoChangedEvent" extends="IEvent"
+     uuid="dd6a1080-e1b7-4339-a549-f0878115596e"
+     wsmap="managed" autogen="VBoxEvent" id="OnVRDEServerInfoChanged"
      >
     <desc>
-      Notification when the status of the VRDP server changes. Interested callees
-      should use <link to="IConsole::remoteDisplayInfo">IRemoteDisplayInfo</link>
+      Notification when the status of the VRDE server changes. Interested callees
+      should use <link to="IConsole::VRDEServerInfo">IVRDEServerInfo</link>
       attributes to find out what is the current status.
     </desc>
Index: trunk/src/VBox/Main/include/ConsoleImpl.h
===================================================================
--- trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 33369)
+++ trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 33386)
@@ -33,5 +33,5 @@
 class RemoteUSBDevice;
 class SharedFolder;
-class RemoteDisplayInfo;
+class VRDEServerInfo;
 class AudioSniffer;
 class ConsoleVRDPServer;
@@ -121,5 +121,5 @@
     STDMETHOD(COMGETTER(USBDevices))(ComSafeArrayOut(IUSBDevice *, aUSBDevices));
     STDMETHOD(COMGETTER(RemoteUSBDevices))(ComSafeArrayOut(IHostUSBDevice *, aRemoteUSBDevices));
-    STDMETHOD(COMGETTER(RemoteDisplayInfo))(IRemoteDisplayInfo **aRemoteDisplayInfo);
+    STDMETHOD(COMGETTER(VRDEServerInfo))(IVRDEServerInfo **aVRDEServerInfo);
     STDMETHOD(COMGETTER(SharedFolders))(ComSafeArrayOut(ISharedFolder *, aSharedFolders));
     STDMETHOD(COMGETTER(EventSource)) (IEventSource ** aEventSource);
@@ -169,5 +169,5 @@
 
     /** Method is called only from ConsoleVRDPServer */
-    IVRDPServer *getVRDPServer() const { return mVRDPServer; }
+    IVRDEServer *getVRDEServer() const { return mVRDEServer; }
 
     ConsoleVRDPServer *consoleVRDPServer() const { return mConsoleVRDPServer; }
@@ -183,5 +183,5 @@
     HRESULT onCPUChange(ULONG aCPU, BOOL aRemove);
     HRESULT onCPUExecutionCapChange(ULONG aExecutionCap);
-    HRESULT onVRDPServerChange(BOOL aRestart);
+    HRESULT onVRDEServerChange(BOOL aRestart);
     HRESULT onUSBControllerChange();
     HRESULT onSharedFolderChange(BOOL aGlobal);
@@ -228,5 +228,5 @@
     void onRuntimeError(BOOL aFatal, IN_BSTR aErrorID, IN_BSTR aMessage);
     HRESULT onShowWindow(BOOL aCheck, BOOL *aCanShow, LONG64 *aWinId);
-    void onRemoteDisplayInfoChange();
+    void onVRDEServerInfoChange();
 
     static const PDMDRVREG DrvStatusReg;
@@ -594,5 +594,5 @@
     const ComPtr<IInternalMachineControl> mControl;
 
-    const ComPtr <IVRDPServer> mVRDPServer;
+    const ComPtr <IVRDEServer> mVRDEServer;
 
     ConsoleVRDPServer * const mConsoleVRDPServer;
@@ -603,5 +603,5 @@
     const ComObjPtr<Display> mDisplay;
     const ComObjPtr<MachineDebugger> mDebugger;
-    const ComObjPtr<RemoteDisplayInfo> mRemoteDisplayInfo;
+    const ComObjPtr<VRDEServerInfo> mVRDEServerInfo;
     const ComObjPtr<EventSource> mEventSource;
 
Index: trunk/src/VBox/Main/include/ConsoleVRDPServer.h
===================================================================
--- trunk/src/VBox/Main/include/ConsoleVRDPServer.h	(revision 33369)
+++ trunk/src/VBox/Main/include/ConsoleVRDPServer.h	(revision 33386)
@@ -3,9 +3,9 @@
 /** @file
  *
- * VBox Console VRDP Helper class and implementation of IRemoteDisplayInfo
+ * VBox Console VRDE Server Helper class and implementation of IVRDEServerInfo
  */
 
 /*
- * Copyright (C) 2006-2008 Oracle Corporation
+ * Copyright (C) 2006-2010 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -149,5 +149,5 @@
     HVRDESERVER mhServer;
 
-    static bool loadVRDPLibrary (void);
+    static int loadVRDPLibrary (const char *pszLibraryName);
 
     /** Static because will never load this more than once! */
@@ -230,23 +230,23 @@
 class Console;
 
-class ATL_NO_VTABLE RemoteDisplayInfo :
+class ATL_NO_VTABLE VRDEServerInfo :
     public VirtualBoxBase,
-    VBOX_SCRIPTABLE_IMPL(IRemoteDisplayInfo)
+    VBOX_SCRIPTABLE_IMPL(IVRDEServerInfo)
 {
 public:
 
-    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(RemoteDisplayInfo, IRemoteDisplayInfo)
-
-    DECLARE_NOT_AGGREGATABLE(RemoteDisplayInfo)
+    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(VRDEServerInfo, IVRDEServerInfo)
+
+    DECLARE_NOT_AGGREGATABLE(VRDEServerInfo)
 
     DECLARE_PROTECT_FINAL_CONSTRUCT()
 
-    BEGIN_COM_MAP(RemoteDisplayInfo)
+    BEGIN_COM_MAP(VRDEServerInfo)
         COM_INTERFACE_ENTRY(ISupportErrorInfo)
-        COM_INTERFACE_ENTRY(IRemoteDisplayInfo)
+        COM_INTERFACE_ENTRY(IVRDEServerInfo)
         COM_INTERFACE_ENTRY(IDispatch)
     END_COM_MAP()
 
-    DECLARE_EMPTY_CTOR_DTOR (RemoteDisplayInfo)
+    DECLARE_EMPTY_CTOR_DTOR (VRDEServerInfo)
 
     HRESULT FinalConstruct();
@@ -257,5 +257,5 @@
     void uninit();
 
-    /* IRemoteDisplayInfo properties */
+    /* IVRDEServerInfo properties */
     #define DECL_GETTER(_aType, _aName) STDMETHOD(COMGETTER(_aName)) (_aType *a##_aName)
         DECL_GETTER (BOOL,    Active);
Index: trunk/src/VBox/Main/include/MachineImpl.h
===================================================================
--- trunk/src/VBox/Main/include/MachineImpl.h	(revision 33369)
+++ trunk/src/VBox/Main/include/MachineImpl.h	(revision 33386)
@@ -404,5 +404,5 @@
     STDMETHOD(COMSETTER(SnapshotFolder))(IN_BSTR aSavedStateFolder);
     STDMETHOD(COMGETTER(MediumAttachments))(ComSafeArrayOut(IMediumAttachment *, aAttachments));
-    STDMETHOD(COMGETTER(VRDPServer))(IVRDPServer **vrdpServer);
+    STDMETHOD(COMGETTER(VRDEServer))(IVRDEServer **vrdeServer);
     STDMETHOD(COMGETTER(AudioAdapter))(IAudioAdapter **audioAdapter);
     STDMETHOD(COMGETTER(USBController))(IUSBController * *aUSBController);
@@ -602,5 +602,5 @@
         IsModified_SerialPorts          = 0x0010,
         IsModified_ParallelPorts        = 0x0020,
-        IsModified_VRDPServer           = 0x0040,
+        IsModified_VRDEServer           = 0x0040,
         IsModified_AudioAdapter         = 0x0080,
         IsModified_USB                  = 0x0100,
@@ -616,5 +616,5 @@
     virtual HRESULT onSerialPortChange(ISerialPort * /* serialPort */) { return S_OK; }
     virtual HRESULT onParallelPortChange(IParallelPort * /* parallelPort */) { return S_OK; }
-    virtual HRESULT onVRDPServerChange(BOOL /* aRestart */) { return S_OK; }
+    virtual HRESULT onVRDEServerChange(BOOL /* aRestart */) { return S_OK; }
     virtual HRESULT onUSBControllerChange() { return S_OK; }
     virtual HRESULT onStorageControllerChange() { return S_OK; }
@@ -848,5 +848,5 @@
     // so they cannot be a part of HWData
 
-    const ComObjPtr<VRDPServer>     mVRDPServer;
+    const ComObjPtr<VRDEServer>     mVRDEServer;
     const ComObjPtr<SerialPort>     mSerialPorts[SchemaDefs::SerialPortCount];
     const ComObjPtr<ParallelPort>   mParallelPorts[SchemaDefs::ParallelPortCount];
@@ -961,5 +961,5 @@
     HRESULT onCPUChange(ULONG aCPU, BOOL aRemove);
     HRESULT onCPUExecutionCapChange(ULONG aCpuExecutionCap);
-    HRESULT onVRDPServerChange(BOOL aRestart);
+    HRESULT onVRDEServerChange(BOOL aRestart);
     HRESULT onUSBControllerChange();
     HRESULT onUSBDeviceAttach(IUSBDevice *aDevice,
Index: trunk/src/VBox/Main/include/SessionImpl.h
===================================================================
--- trunk/src/VBox/Main/include/SessionImpl.h	(revision 33369)
+++ trunk/src/VBox/Main/include/SessionImpl.h	(revision 33386)
@@ -91,5 +91,5 @@
     STDMETHOD(OnCPUChange)(ULONG aCPU, BOOL aRemove);
     STDMETHOD(OnCPUExecutionCapChange)(ULONG aExecutionCap);
-    STDMETHOD(OnVRDPServerChange)(BOOL aRestart);
+    STDMETHOD(OnVRDEServerChange)(BOOL aRestart);
     STDMETHOD(OnUSBControllerChange)();
     STDMETHOD(OnSharedFolderChange)(BOOL aGlobal);
Index: trunk/src/VBox/Main/include/SystemPropertiesImpl.h
===================================================================
--- trunk/src/VBox/Main/include/SystemPropertiesImpl.h	(revision 33369)
+++ trunk/src/VBox/Main/include/SystemPropertiesImpl.h	(revision 33386)
@@ -86,8 +86,10 @@
     STDMETHOD(COMGETTER(FreeDiskSpacePercentError))(ULONG *aFreeDiskSpacePercent);
     STDMETHOD(COMSETTER(FreeDiskSpacePercentError))(ULONG aFreeDiskSpacePercent);
-    STDMETHOD(COMGETTER(RemoteDisplayAuthLibrary))(BSTR *aRemoteDisplayAuthLibrary);
-    STDMETHOD(COMSETTER(RemoteDisplayAuthLibrary))(IN_BSTR aRemoteDisplayAuthLibrary);
+    STDMETHOD(COMGETTER(VRDEAuthLibrary))(BSTR *aVRDEAuthLibrary);
+    STDMETHOD(COMSETTER(VRDEAuthLibrary))(IN_BSTR aVRDEAuthLibrary);
     STDMETHOD(COMGETTER(WebServiceAuthLibrary))(BSTR *aWebServiceAuthLibrary);
     STDMETHOD(COMSETTER(WebServiceAuthLibrary))(IN_BSTR aWebServiceAuthLibrary);
+    STDMETHOD(COMGETTER(DefaultVRDELibrary))(BSTR *aVRDELibrary);
+    STDMETHOD(COMSETTER(DefaultVRDELibrary))(IN_BSTR aVRDELibrary);
     STDMETHOD(COMGETTER(LogHistoryCount))(ULONG *count);
     STDMETHOD(COMSETTER(LogHistoryCount))(ULONG count);
@@ -119,6 +121,7 @@
     HRESULT setDefaultHardDiskFormat(const Utf8Str &aFormat);
 
-    HRESULT setRemoteDisplayAuthLibrary(const Utf8Str &aPath);
+    HRESULT setVRDEAuthLibrary(const Utf8Str &aPath);
     HRESULT setWebServiceAuthLibrary(const Utf8Str &aPath);
+    HRESULT setDefaultVRDELibrary(const Utf8Str &aPath);
 
     VirtualBox * const  mParent;
Index: trunk/src/VBox/Main/include/VRDPServerImpl.h
===================================================================
--- trunk/src/VBox/Main/include/VRDPServerImpl.h	(revision 33369)
+++ trunk/src/VBox/Main/include/VRDPServerImpl.h	(revision 33386)
@@ -7,5 +7,5 @@
 
 /*
- * Copyright (C) 2006-2007 Oracle Corporation
+ * Copyright (C) 2006-2010 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -27,10 +27,10 @@
 namespace settings
 {
-    struct VRDPSettings;
+    struct VRDESettings;
 }
 
-class ATL_NO_VTABLE VRDPServer :
+class ATL_NO_VTABLE VRDEServer :
     public VirtualBoxBase,
-    VBOX_SCRIPTABLE_IMPL(IVRDPServer)
+    VBOX_SCRIPTABLE_IMPL(IVRDEServer)
 {
 public:
@@ -39,7 +39,7 @@
     {
         BOOL mEnabled;
-        Bstr mVRDPPorts;
-        Bstr mVRDPAddress;
-        VRDPAuthType_T mAuthType;
+        Bstr mPorts;
+        Bstr mAddress;
+        AuthType_T mAuthType;
         ULONG mAuthTimeout;
         BOOL mAllowMultiConnection;
@@ -49,17 +49,17 @@
     };
 
-    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(VRDPServer, IVRDPServer)
+    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(VRDEServer, IVRDEServer)
 
-    DECLARE_NOT_AGGREGATABLE(VRDPServer)
+    DECLARE_NOT_AGGREGATABLE(VRDEServer)
 
     DECLARE_PROTECT_FINAL_CONSTRUCT()
 
-    BEGIN_COM_MAP(VRDPServer)
+    BEGIN_COM_MAP(VRDEServer)
         COM_INTERFACE_ENTRY  (ISupportErrorInfo)
-        COM_INTERFACE_ENTRY  (IVRDPServer)
-        COM_INTERFACE_ENTRY2 (IDispatch, IVRDPServer)
+        COM_INTERFACE_ENTRY  (IVRDEServer)
+        COM_INTERFACE_ENTRY2 (IDispatch, IVRDEServer)
     END_COM_MAP()
 
-    DECLARE_EMPTY_CTOR_DTOR (VRDPServer)
+    DECLARE_EMPTY_CTOR_DTOR (VRDEServer)
 
     HRESULT FinalConstruct();
@@ -68,17 +68,13 @@
     // public initializer/uninitializer for internal purposes only
     HRESULT init(Machine *aParent);
-    HRESULT init(Machine *aParent, VRDPServer *aThat);
-    HRESULT initCopy (Machine *aParent, VRDPServer *aThat);
+    HRESULT init(Machine *aParent, VRDEServer *aThat);
+    HRESULT initCopy (Machine *aParent, VRDEServer *aThat);
     void uninit();
 
-    // IVRDPServer properties
+    // IVRDEServer properties
     STDMETHOD(COMGETTER(Enabled)) (BOOL *aEnabled);
     STDMETHOD(COMSETTER(Enabled)) (BOOL aEnable);
-    STDMETHOD(COMGETTER(Ports)) (BSTR *aPorts);
-    STDMETHOD(COMSETTER(Ports)) (IN_BSTR aPorts);
-    STDMETHOD(COMGETTER(NetAddress)) (BSTR *aAddress);
-    STDMETHOD(COMSETTER(NetAddress)) (IN_BSTR aAddress);
-    STDMETHOD(COMGETTER(AuthType)) (VRDPAuthType_T *aType);
-    STDMETHOD(COMSETTER(AuthType)) (VRDPAuthType_T aType);
+    STDMETHOD(COMGETTER(AuthType)) (AuthType_T *aType);
+    STDMETHOD(COMSETTER(AuthType)) (AuthType_T aType);
     STDMETHOD(COMGETTER(AuthTimeout)) (ULONG *aTimeout);
     STDMETHOD(COMSETTER(AuthTimeout)) (ULONG aTimeout);
@@ -92,19 +88,21 @@
     STDMETHOD(COMSETTER(VideoChannelQuality)) (ULONG aVideoChannelQuality);
 
-    // IVRDPServer methods
+    // IVRDEServer methods
+    STDMETHOD(SetVRDEProperty) (IN_BSTR aKey, IN_BSTR aValue);
+    STDMETHOD(GetVRDEProperty) (IN_BSTR aKey, BSTR *aValue);
 
     // public methods only for internal purposes
 
-    HRESULT loadSettings(const settings::VRDPSettings &data);
-    HRESULT saveSettings(settings::VRDPSettings &data);
+    HRESULT loadSettings(const settings::VRDESettings &data);
+    HRESULT saveSettings(settings::VRDESettings &data);
 
     void rollback();
     void commit();
-    void copyFrom (VRDPServer *aThat);
+    void copyFrom (VRDEServer *aThat);
 
 private:
 
     Machine * const     mParent;
-    const ComObjPtr<VRDPServer> mPeer;
+    const ComObjPtr<VRDEServer> mPeer;
 
     Backupable<Data>    mData;
Index: trunk/src/VBox/Main/include/VirtualBoxImpl.h
===================================================================
--- trunk/src/VBox/Main/include/VirtualBoxImpl.h	(revision 33369)
+++ trunk/src/VBox/Main/include/VirtualBoxImpl.h	(revision 33386)
@@ -154,4 +154,7 @@
                                     BSTR * aUrl, BSTR * aFile, BOOL * aResult);
 
+    STDMETHOD(VRDERegisterLibrary)(IN_BSTR aName);
+    STDMETHOD(VRDEUnregisterLibrary)(IN_BSTR aName);
+    STDMETHOD(VRDEListLibraries)(ComSafeArrayOut(BSTR, aNames));
     /* public methods only for internal purposes */
 
Index: trunk/src/VBox/Main/testcase/tstAPI.cpp
===================================================================
--- trunk/src/VBox/Main/testcase/tstAPI.cpp	(revision 33369)
+++ trunk/src/VBox/Main/testcase/tstAPI.cpp	(revision 33386)
@@ -1041,16 +1041,16 @@
 #if 0
         RTPrintf("\n");
-        RTPrintf("Enabling the VRDP server (must succeed even if the VM is saved):\n");
-        ComPtr<IVRDPServer> vrdp;
-        CHECK_ERROR_BREAK(sessionMachine, COMGETTER(VRDPServer)(vrdp.asOutParam()));
-        if (FAILED(vrdp->COMSETTER(Enabled)(TRUE)))
-        {
-            PRINT_ERROR_INFO(com::ErrorInfo(vrdp));
+        RTPrintf("Enabling the VRDE server (must succeed even if the VM is saved):\n");
+        ComPtr<IVRDEServer> vrdeServer;
+        CHECK_ERROR_BREAK(sessionMachine, COMGETTER(VRDEServer)(vrdeServer.asOutParam()));
+        if (FAILED(vrdeServer->COMSETTER(Enabled)(TRUE)))
+        {
+            PRINT_ERROR_INFO(com::ErrorInfo(vrdeServer));
         }
         else
         {
             BOOL enabled = FALSE;
-            CHECK_ERROR_BREAK(vrdp, COMGETTER(Enabled)(&enabled));
-            RTPrintf("VRDP server is %s\n", enabled ? "enabled" : "disabled");
+            CHECK_ERROR_BREAK(vrdeServer, COMGETTER(Enabled)(&enabled));
+            RTPrintf("VRDE server is %s\n", enabled ? "enabled" : "disabled");
         }
 #endif
@@ -1233,5 +1233,5 @@
         ComPtr<IMachine> machine;
         Bstr name = argc > 1 ? argv[1] : "dsl";
-        Bstr sessionType = argc > 2 ? argv[2] : "vrdp";
+        Bstr sessionType = argc > 2 ? argv[2] : "headless";
         RTPrintf("Getting a machine object named '%ls'...\n", name.raw());
         CHECK_RC_BREAK(virtualBox->FindMachine(name, machine.asOutParam()));
Index: trunk/src/VBox/Main/xml/Settings.cpp
===================================================================
--- trunk/src/VBox/Main/xml/Settings.cpp	(revision 33369)
+++ trunk/src/VBox/Main/xml/Settings.cpp	(revision 33386)
@@ -1229,6 +1229,9 @@
                         pelmGlobalChild->getAttributeValue("defaultMachineFolder", systemProperties.strDefaultMachineFolder);
                         pelmGlobalChild->getAttributeValue("defaultHardDiskFormat", systemProperties.strDefaultHardDiskFormat);
-                        pelmGlobalChild->getAttributeValue("remoteDisplayAuthLibrary", systemProperties.strRemoteDisplayAuthLibrary);
+                        if (!pelmGlobalChild->getAttributeValue("VRDEAuthLibrary", systemProperties.strVRDEAuthLibrary))
+                            // pre-1.11 used @remoteDisplayAuthLibrary instead
+                            pelmGlobalChild->getAttributeValue("remoteDisplayAuthLibrary", systemProperties.strVRDEAuthLibrary);
                         pelmGlobalChild->getAttributeValue("webServiceAuthLibrary", systemProperties.strWebServiceAuthLibrary);
+                        pelmGlobalChild->getAttributeValue("defaultVRDELibrary", systemProperties.strDefaultVRDELibrary);
                         pelmGlobalChild->getAttributeValue("LogHistoryCount", systemProperties.ulLogHistoryCount);
                     }
@@ -1335,8 +1338,10 @@
     if (systemProperties.strDefaultHardDiskFormat.length())
         pelmSysProps->setAttribute("defaultHardDiskFormat", systemProperties.strDefaultHardDiskFormat);
-    if (systemProperties.strRemoteDisplayAuthLibrary.length())
-        pelmSysProps->setAttribute("remoteDisplayAuthLibrary", systemProperties.strRemoteDisplayAuthLibrary);
+    if (systemProperties.strVRDEAuthLibrary.length())
+        pelmSysProps->setAttribute("VRDEAuthLibrary", systemProperties.strVRDEAuthLibrary);
     if (systemProperties.strWebServiceAuthLibrary.length())
         pelmSysProps->setAttribute("webServiceAuthLibrary", systemProperties.strWebServiceAuthLibrary);
+    if (systemProperties.strDefaultVRDELibrary.length())
+        pelmSysProps->setAttribute("defaultVRDELibrary", systemProperties.strDefaultVRDELibrary);
     pelmSysProps->setAttribute("LogHistoryCount", systemProperties.ulLogHistoryCount);
 
@@ -1365,5 +1370,5 @@
  * machine settings have really changed and thus need to be written out to disk.
  */
-bool VRDPSettings::operator==(const VRDPSettings& v) const
+bool VRDESettings::operator==(const VRDESettings& v) const
 {
     return (    (this == &v)
@@ -1595,5 +1600,5 @@
                   && (keyboardHidType           == h.keyboardHidType)
                   && (chipsetType               == h.chipsetType)
-                  && (vrdpSettings              == h.vrdpSettings)
+                  && (vrdeSettings              == h.vrdeSettings)
                   && (biosSettings              == h.biosSettings)
                   && (usbController             == h.usbController)
@@ -2426,7 +2431,7 @@
         else if (pelmHwChild->nameEquals("RemoteDisplay"))
         {
-            pelmHwChild->getAttributeValue("enabled", hw.vrdpSettings.fEnabled);
-            pelmHwChild->getAttributeValue("port", hw.vrdpSettings.strPort);
-            pelmHwChild->getAttributeValue("netAddress", hw.vrdpSettings.strNetAddress);
+            pelmHwChild->getAttributeValue("enabled", hw.vrdeSettings.fEnabled);
+            pelmHwChild->getAttributeValue("port", hw.vrdeSettings.strPort);
+            pelmHwChild->getAttributeValue("netAddress", hw.vrdeSettings.strNetAddress);
 
             Utf8Str strAuthType;
@@ -2436,23 +2441,23 @@
                 strAuthType.toUpper();
                 if (strAuthType == "NULL")
-                    hw.vrdpSettings.authType = VRDPAuthType_Null;
+                    hw.vrdeSettings.authType = AuthType_Null;
                 else if (strAuthType == "GUEST")
-                    hw.vrdpSettings.authType = VRDPAuthType_Guest;
+                    hw.vrdeSettings.authType = AuthType_Guest;
                 else if (strAuthType == "EXTERNAL")
-                    hw.vrdpSettings.authType = VRDPAuthType_External;
+                    hw.vrdeSettings.authType = AuthType_External;
                 else
                     throw ConfigFileError(this, pelmHwChild, N_("Invalid value '%s' in RemoteDisplay/@authType attribute"), strAuthType.c_str());
             }
 
-            pelmHwChild->getAttributeValue("authTimeout", hw.vrdpSettings.ulAuthTimeout);
-            pelmHwChild->getAttributeValue("allowMultiConnection", hw.vrdpSettings.fAllowMultiConnection);
-            pelmHwChild->getAttributeValue("reuseSingleConnection", hw.vrdpSettings.fReuseSingleConnection);
+            pelmHwChild->getAttributeValue("authTimeout", hw.vrdeSettings.ulAuthTimeout);
+            pelmHwChild->getAttributeValue("allowMultiConnection", hw.vrdeSettings.fAllowMultiConnection);
+            pelmHwChild->getAttributeValue("reuseSingleConnection", hw.vrdeSettings.fReuseSingleConnection);
 
             const xml::ElementNode *pelmVideoChannel;
             if ((pelmVideoChannel = pelmHwChild->findChildElement("VideoChannel")))
             {
-                pelmVideoChannel->getAttributeValue("enabled", hw.vrdpSettings.fVideoChannel);
-                pelmVideoChannel->getAttributeValue("quality", hw.vrdpSettings.ulVideoChannelQuality);
-                hw.vrdpSettings.ulVideoChannelQuality = RT_CLAMP(hw.vrdpSettings.ulVideoChannelQuality, 10, 100);
+                pelmVideoChannel->getAttributeValue("enabled", hw.vrdeSettings.fVideoChannel);
+                pelmVideoChannel->getAttributeValue("quality", hw.vrdeSettings.ulVideoChannelQuality);
+                hw.vrdeSettings.ulVideoChannelQuality = RT_CLAMP(hw.vrdeSettings.ulVideoChannelQuality, 10, 100);
             }
         }
@@ -3341,33 +3346,33 @@
         pelmDisplay->setAttribute("accelerate2DVideo", hw.fAccelerate2DVideo);
 
-    xml::ElementNode *pelmVRDP = pelmHardware->createChild("RemoteDisplay");
-    pelmVRDP->setAttribute("enabled", hw.vrdpSettings.fEnabled);
-    Utf8Str strPort = hw.vrdpSettings.strPort;
+    xml::ElementNode *pelmVRDE = pelmHardware->createChild("RemoteDisplay");
+    pelmVRDE->setAttribute("enabled", hw.vrdeSettings.fEnabled);
+    Utf8Str strPort = hw.vrdeSettings.strPort;
     if (!strPort.length())
         strPort = "3389";
-    pelmVRDP->setAttribute("port", strPort);
-    if (hw.vrdpSettings.strNetAddress.length())
-        pelmVRDP->setAttribute("netAddress", hw.vrdpSettings.strNetAddress);
+    pelmVRDE->setAttribute("port", strPort);
+    if (hw.vrdeSettings.strNetAddress.length())
+        pelmVRDE->setAttribute("netAddress", hw.vrdeSettings.strNetAddress);
     const char *pcszAuthType;
-    switch (hw.vrdpSettings.authType)
-    {
-        case VRDPAuthType_Guest:    pcszAuthType = "Guest";    break;
-        case VRDPAuthType_External: pcszAuthType = "External"; break;
-        default: /*case VRDPAuthType_Null:*/ pcszAuthType = "Null"; break;
-    }
-    pelmVRDP->setAttribute("authType", pcszAuthType);
-
-    if (hw.vrdpSettings.ulAuthTimeout != 0)
-        pelmVRDP->setAttribute("authTimeout", hw.vrdpSettings.ulAuthTimeout);
-    if (hw.vrdpSettings.fAllowMultiConnection)
-        pelmVRDP->setAttribute("allowMultiConnection", hw.vrdpSettings.fAllowMultiConnection);
-    if (hw.vrdpSettings.fReuseSingleConnection)
-        pelmVRDP->setAttribute("reuseSingleConnection", hw.vrdpSettings.fReuseSingleConnection);
+    switch (hw.vrdeSettings.authType)
+    {
+        case AuthType_Guest:    pcszAuthType = "Guest";    break;
+        case AuthType_External: pcszAuthType = "External"; break;
+        default: /*case AuthType_Null:*/ pcszAuthType = "Null"; break;
+    }
+    pelmVRDE->setAttribute("authType", pcszAuthType);
+
+    if (hw.vrdeSettings.ulAuthTimeout != 0)
+        pelmVRDE->setAttribute("authTimeout", hw.vrdeSettings.ulAuthTimeout);
+    if (hw.vrdeSettings.fAllowMultiConnection)
+        pelmVRDE->setAttribute("allowMultiConnection", hw.vrdeSettings.fAllowMultiConnection);
+    if (hw.vrdeSettings.fReuseSingleConnection)
+        pelmVRDE->setAttribute("reuseSingleConnection", hw.vrdeSettings.fReuseSingleConnection);
 
     if (m->sv >= SettingsVersion_v1_10)
     {
-        xml::ElementNode *pelmVideoChannel = pelmVRDP->createChild("VideoChannel");
-        pelmVideoChannel->setAttribute("enabled", hw.vrdpSettings.fVideoChannel);
-        pelmVideoChannel->setAttribute("quality", hw.vrdpSettings.ulVideoChannelQuality);
+        xml::ElementNode *pelmVideoChannel = pelmVRDE->createChild("VideoChannel");
+        pelmVideoChannel->setAttribute("enabled", hw.vrdeSettings.fVideoChannel);
+        pelmVideoChannel->setAttribute("quality", hw.vrdeSettings.ulVideoChannelQuality);
     }
 
@@ -4317,6 +4322,6 @@
         if (   (hardwareMachine.ioSettings.fIoCacheEnabled != true)
             || (hardwareMachine.ioSettings.ulIoCacheSize != 5)
-                // and VRDP video channel
-            || (hardwareMachine.vrdpSettings.fVideoChannel)
+                // and remote desktop video redirection channel
+            || (hardwareMachine.vrdeSettings.fVideoChannel)
                 // and page fusion
             || (hardwareMachine.fPageFusionEnabled)
Index: trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd
===================================================================
--- trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd	(revision 33369)
+++ trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd	(revision 33386)
@@ -208,5 +208,5 @@
 
 
-<xsd:simpleType name="TVRDPAuthType">
+<xsd:simpleType name="TAuthType">
   <xsd:restriction base="xsd:string">
     <xsd:enumeration value="Null"/>
@@ -356,6 +356,7 @@
   <xsd:attribute name="defaultHardDiskFolder" type="TLocalFile"/>
   <xsd:attribute name="defaultHardDiskFormat" type="TNonEmptyString"/>
-  <xsd:attribute name="remoteDisplayAuthLibrary" type="TLocalFile"/>
+  <xsd:attribute name="VRDEAuthLibrary" type="TLocalFile"/>
   <xsd:attribute name="webServiceAuthLibrary" type="TLocalFile"/>
+  <xsd:attribute name="defaultVRDELibrary" type="TLocalFile"/>
   <xsd:attribute name="HWVirtExEnabled" type="xsd:boolean"/>
   <xsd:attribute name="LogHistoryCount" type="xsd:unsignedInt" default="3"/>
@@ -542,5 +543,5 @@
   <xsd:attribute name="port" type="xsd:token" default="0"/>
   <xsd:attribute name="netAddress" type="xsd:token" default=""/>
-  <xsd:attribute name="authType" type="TVRDPAuthType" default="Null"/>
+  <xsd:attribute name="authType" type="TAuthType" default="Null"/>
   <xsd:attribute name="authTimeout" type="xsd:unsignedInt" default="5000"/>
   <xsd:attribute name="allowMultiConnection" type="xsd:boolean" default="false"/>
Index: trunk/src/VBox/Main/xpcom/module.cpp
===================================================================
--- trunk/src/VBox/Main/xpcom/module.cpp	(revision 33369)
+++ trunk/src/VBox/Main/xpcom/module.cpp	(revision 33386)
@@ -70,6 +70,6 @@
 NS_DECL_CLASSINFO(SharedFolder)
 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(SharedFolder, ISharedFolder)
-NS_DECL_CLASSINFO(RemoteDisplayInfo)
-NS_IMPL_THREADSAFE_ISUPPORTS1_CI(RemoteDisplayInfo, IRemoteDisplayInfo)
+NS_DECL_CLASSINFO(VRDEInfo)
+NS_IMPL_THREADSAFE_ISUPPORTS1_CI(VRDEInfo, IVRDEInfo)
 
 NS_DECL_CLASSINFO(Session)
Index: trunk/src/VBox/Main/xpcom/server.cpp
===================================================================
--- trunk/src/VBox/Main/xpcom/server.cpp	(revision 33369)
+++ trunk/src/VBox/Main/xpcom/server.cpp	(revision 33386)
@@ -141,6 +141,6 @@
 
 #ifdef VBOX_WITH_VRDP
-NS_DECL_CLASSINFO(VRDPServer)
-NS_IMPL_THREADSAFE_ISUPPORTS1_CI(VRDPServer, IVRDPServer)
+NS_DECL_CLASSINFO(VRDE)
+NS_IMPL_THREADSAFE_ISUPPORTS1_CI(VRDE, IVRDE)
 #endif
 
