Index: /trunk/doc/manual/en_US/user_Frontends.xml
===================================================================
--- /trunk/doc/manual/en_US/user_Frontends.xml	(revision 55866)
+++ /trunk/doc/manual/en_US/user_Frontends.xml	(revision 55867)
@@ -37,8 +37,4 @@
     linkend="settings-display" />) or with
     <computeroutput>VBoxManage</computeroutput>:<screen>VBoxManage modifyvm "VM name" --vrde on</screen></para>
-
-    <para>If you use <computeroutput>VBoxHeadless</computeroutput> (described
-    further below), VRDP support will be automatically enabled since
-    VBoxHeadless has no other means of output.</para>
 
     <para>By default, the VRDP server uses TCP port
@@ -166,5 +162,5 @@
       <para>VirtualBox therefore comes with yet another front-end called
       <computeroutput>VBoxHeadless</computeroutput>, which produces no visible
-      output on the host at all, but instead only delivers VRDP data. This
+      output on the host at all, but still can deliver VRDP data. This
       front-end has no dependencies on the X Window system on Linux and
       Solaris hosts.<footnote>
@@ -207,19 +203,21 @@
           <computeroutput>VBoxHeadless</computeroutput> from the VirtualBox
           Manager GUI, by holding the Shift key when starting a virtual
-          machine.
+          machine or selecting <computeroutput>Headless Start</computeroutput>
+          from the <computeroutput>Machine</computeroutput> menu.
           </para>
         </listitem>
       </itemizedlist>
 
-      <para>Note that when you use
-      <computeroutput>VBoxHeadless</computeroutput> to start a VM, since the
-      headless server has no other means of output, the VRDP server will
-      <emphasis>always</emphasis> be enabled, regardless of whether you had
-      enabled the VRDP server in the VM's settings. If this is undesirable
-      (for example because you want to access the VM via
-      <computeroutput>ssh</computeroutput> only), start the VM like
-      this:<screen>VBoxHeadless --startvm &lt;uuid|name&gt; --vrde off</screen>To
-      have the VRDP server enabled depending on the VM configuration, as the
-      other front-ends would, use this:<screen>VBoxHeadless --startvm &lt;uuid|name&gt; --vrde config</screen></para>
+      <para>Since VirtualBox version 5.0, when you use
+      <computeroutput>VBoxHeadless</computeroutput> to start a VM,
+      the VRDP server will be enabled according to the VM configuration.
+      You can override the VM's setting using <computeroutput>--vrde</computeroutput>
+      command line parameter. To enable the VRDP server start the VM like
+      this:<screen>VBoxHeadless --startvm &lt;uuid|name&gt; --vrde on</screen>
+      and to disable it:<screen>VBoxHeadless --startvm &lt;uuid|name&gt; --vrde off</screen>
+      To have the VRDP server enabled depending on the VM configuration, as the
+      other front-ends would, you can still use:
+      <screen>VBoxHeadless --startvm &lt;uuid|name&gt; --vrde config</screen>
+      but this is the same as <screen>VBoxHeadless --startvm &lt;uuid|name&gt;</screen></para>
 
       <para>If you start the VM with <computeroutput>VBoxManage startvm ...</computeroutput>
@@ -311,4 +309,9 @@
             machine, so the machine can boot from it:<screen>VBoxManage storageattach "Windows XP" --storagectl "IDE Controller"
       --port 0 --device 1 --type dvddrive --medium /full/path/to/iso.iso</screen></para>
+          </listitem>
+
+          <listitem>
+            <para>Enable VirtualBox remote desktop extension (the VRDP server):
+            <screen>VBoxManage modifyvm "Windows XP" --vrde on</screen></para>
           </listitem>
 
Index: /trunk/doc/manual/en_US/user_Introduction.xml
===================================================================
--- /trunk/doc/manual/en_US/user_Introduction.xml	(revision 55866)
+++ /trunk/doc/manual/en_US/user_Introduction.xml	(revision 55867)
@@ -1820,6 +1820,7 @@
           <para>Finally, <computeroutput>VBoxHeadless</computeroutput> is yet
           another front-end that produces no visible output on the host at
-          all, but merely acts as a RDP server if the VirtualBox Remote
-          Desktop Extension (VRDE) is installed. As opposed to the other
+          all, but can act as a RDP server if the VirtualBox Remote
+          Desktop Extension (VRDE) is installed and enabled for the VM.
+          As opposed to the other
           graphical interfaces, the headless front-end requires no graphics
           support. This is useful, for example, if you want to host your
Index: /trunk/doc/manual/en_US/user_VBoxManage.xml
===================================================================
--- /trunk/doc/manual/en_US/user_VBoxManage.xml	(revision 55866)
+++ /trunk/doc/manual/en_US/user_VBoxManage.xml	(revision 55867)
@@ -1177,10 +1177,7 @@
       modifyvm</computeroutput>:<itemizedlist>
           <listitem>
-            <para><computeroutput>--vrde on|off</computeroutput>: With the
-            VirtualBox graphical user interface, this enables or disables the
-            VirtualBox remote desktop extension (VRDE) server. Note that if
-            you are using <computeroutput>VBoxHeadless</computeroutput> (see
-            <xref linkend="vboxheadless" />), VRDE is enabled by
-            default.</para>
+            <para><computeroutput>--vrde on|off</computeroutput>:
+            This enables or disables the VirtualBox remote desktop extension
+            (VRDE) server.</para>
           </listitem>
 
Index: /trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp	(revision 55866)
+++ /trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp	(revision 55867)
@@ -445,6 +445,6 @@
     RTPrintf("Usage:\n"
              "   -s, -startvm, --startvm <name|uuid>   Start given VM (required argument)\n"
-             "   -v, -vrde, --vrde on|off|config       Enable (default) or disable the VRDE\n"
-             "                                           server or don't change the setting\n"
+             "   -v, -vrde, --vrde on|off|config       Enable or disable the VRDE server\n"
+             "                                           or don't change the setting (default)\n"
              "   -e, -vrdeproperty, --vrdeproperty <name=[value]> Set a VRDE property:\n"
              "                                     \"TCP/Ports\" - comma-separated list of\n"
@@ -1016,6 +1016,12 @@
         }
 
-        /* default is to enable the remote desktop server (backward compatibility) */
-        BOOL fVRDEEnable = true;
+        /* Default is to use the VM setting for the VRDE server. */
+        enum VRDEOption
+        {
+            VRDEOption_Config,
+            VRDEOption_Off,
+            VRDEOption_On
+        };
+        VRDEOption enmVRDEOption = VRDEOption_Config;
         BOOL fVRDEEnabled;
         ComPtr <IVRDEServer> vrdeServer;
@@ -1025,22 +1031,21 @@
         if (vrdeEnabled != NULL)
         {
-            /* -vrdeServer on|off|config */
+            /* -vrde on|off|config */
             if (!strcmp(vrdeEnabled, "off") || !strcmp(vrdeEnabled, "disable"))
-                fVRDEEnable = false;
-            else if (!strcmp(vrdeEnabled, "config"))
-            {
-                if (!fVRDEEnabled)
-                    fVRDEEnable = false;
-            }
-            else if (strcmp(vrdeEnabled, "on") && strcmp(vrdeEnabled, "enable"))
-            {
-                RTPrintf("-vrdeServer requires an argument (on|off|config)\n");
-                break;
-            }
-        }
-
-        if (fVRDEEnable)
-        {
-            Log(("VBoxHeadless: Enabling VRDE server...\n"));
+                enmVRDEOption = VRDEOption_Off;
+            else if (!strcmp(vrdeEnabled, "on") || !strcmp(vrdeEnabled, "enable"))
+                enmVRDEOption = VRDEOption_On;
+            else if (strcmp(vrdeEnabled, "config"))
+            {
+                RTPrintf("-vrde requires an argument (on|off|config)\n");
+                break;
+            }
+        }
+
+        Log(("VBoxHeadless: enmVRDE %d, fVRDEEnabled %d\n", enmVRDEOption, fVRDEEnabled));
+
+        if (enmVRDEOption != VRDEOption_Off)
+        {
+            /* Set other specified options. */
 
             /* set VRDE port if requested by the user */
@@ -1094,4 +1099,8 @@
             }
 
+        }
+
+        if (enmVRDEOption == VRDEOption_On)
+        {
             /* enable VRDE server (only if currently disabled) */
             if (!fVRDEEnabled)
@@ -1100,5 +1109,5 @@
             }
         }
-        else
+        else if (enmVRDEOption == VRDEOption_Off)
         {
             /* disable VRDE server (only if currently enabled */
