Index: /trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h	(revision 283)
+++ /trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h	(revision 284)
@@ -218,4 +218,18 @@
     }
 
+    QString toString (CEnums::VRDPAuthType t) const
+    {
+        AssertMsg (!vrdpAuthTypes [t].isNull(), ("No text for %d", t));
+        return vrdpAuthTypes [t];
+    }
+
+    CEnums::VRDPAuthType toVRDPAuthType (const QString &s) const
+    {
+        QStringVector::const_iterator it =
+            qFind (vrdpAuthTypes.begin(), vrdpAuthTypes.end(), s);
+        AssertMsg (it != vrdpAuthTypes.end(), ("No value for {%s}", s.latin1()));
+        return CEnums::VRDPAuthType (it - vrdpAuthTypes.begin());
+    }
+
     /**
      *  Similar to toString (CEnums::HardDiskType), but returns 'Differencing'
@@ -421,4 +435,5 @@
     QStringVector diskTypes;
     QStringVector diskStorageTypes;
+    QStringVector vrdpAuthTypes;
     QStringVector diskControllerDevices;
     QStringVector audioDriverTypes;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp	(revision 283)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp	(revision 284)
@@ -326,4 +326,5 @@
     , diskTypes (CEnums::HardDiskType_COUNT)
     , diskStorageTypes (CEnums::HardDiskStorageType_COUNT)
+    , vrdpAuthTypes (CEnums::VRDPAuthType_COUNT)
     , diskControllerDevices (3)
     , audioDriverTypes (CEnums::AudioDriverType_COUNT)
@@ -1198,4 +1199,11 @@
     diskStorageTypes [CEnums::ISCSIHardDisk] =
         tr ("iSCSI", "DiskStorageType");
+
+    vrdpAuthTypes [CEnums::VRDPAuthNull] =
+        tr ("Null", "VRDPAuthType");
+    vrdpAuthTypes [CEnums::VRDPAuthExternal] =
+        tr ("External", "VRDPAuthType");
+    vrdpAuthTypes [CEnums::VRDPAuthGuest] =
+        tr ("Guest", "VRDPAuthType");
 
     Assert (diskControllerDevices.count() == 3);
Index: /trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui	(revision 283)
+++ /trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui	(revision 284)
@@ -232,4 +232,24 @@
             </property>
         </item>
+        <item>
+            <property name="text">
+                <string> VRDP </string>
+            </property>
+            <property name="text">
+                <string>7</string>
+            </property>
+            <property name="text">
+                <string>#vrdp</string>
+            </property>
+            <property name="pixmap">
+                <pixmap>discard_cur_state_16px.png</pixmap>
+            </property>
+            <property name="pixmap">
+                <pixmap></pixmap>
+            </property>
+            <property name="pixmap">
+                <pixmap></pixmap>
+            </property>
+        </item>
             <property name="name">
                 <cstring>listView</cstring>
@@ -2021,4 +2041,218 @@
                         </vbox>
                     </widget>
+                </vbox>
+            </widget>
+            <widget class="QWidget">
+                <property name="name">
+                    <cstring>pageVRDP</cstring>
+                </property>
+                <attribute name="id">
+                    <number>7</number>
+                </attribute>
+                <vbox>
+                    <property name="name">
+                        <cstring>unnamed</cstring>
+                    </property>
+                    <property name="margin">
+                        <number>0</number>
+                    </property>
+                    <widget class="QGroupBox">
+                        <property name="name">
+                            <cstring>grbVRDP</cstring>
+                        </property>
+                        <property name="title">
+                            <string>&amp;Enable VRDP Server</string>
+                        </property>
+                        <property name="checkable">
+                            <bool>true</bool>
+                        </property>
+                        <property name="checked">
+                            <bool>true</bool>
+                        </property>
+                        <hbox>
+                            <property name="name">
+                                <cstring>unnamed</cstring>
+                            </property>
+                            <widget class="QLayoutWidget">
+                                <property name="name">
+                                    <cstring>layout31</cstring>
+                                </property>
+                                <vbox>
+                                    <property name="name">
+                                        <cstring>unnamed</cstring>
+                                    </property>
+                                    <widget class="QLabel">
+                                        <property name="name">
+                                            <cstring>txVRDPPort</cstring>
+                                        </property>
+                                        <property name="text">
+                                            <string>Server port </string>
+                                        </property>
+                                        <property name="buddy" stdset="0">
+                                            <cstring>cbAudioDriver</cstring>
+                                        </property>
+                                    </widget>
+                                    <widget class="QLabel">
+                                        <property name="name">
+                                            <cstring>txVRDPAuthMethod</cstring>
+                                        </property>
+                                        <property name="text">
+                                            <string>Authentication Method </string>
+                                        </property>
+                                        <property name="buddy" stdset="0">
+                                            <cstring>cbAudioDriver</cstring>
+                                        </property>
+                                    </widget>
+                                    <widget class="QLabel">
+                                        <property name="name">
+                                            <cstring>txVRDPAuthTimeout</cstring>
+                                        </property>
+                                        <property name="text">
+                                            <string>Authentication Timeout </string>
+                                        </property>
+                                        <property name="buddy" stdset="0">
+                                            <cstring>cbAudioDriver</cstring>
+                                        </property>
+                                    </widget>
+                                </vbox>
+                            </widget>
+                            <widget class="QLayoutWidget">
+                                <property name="name">
+                                    <cstring>layout32</cstring>
+                                </property>
+                                <vbox>
+                                    <property name="name">
+                                        <cstring>unnamed</cstring>
+                                    </property>
+                                    <widget class="QLineEdit">
+                                        <property name="name">
+                                            <cstring>leVRDPPort</cstring>
+                                        </property>
+                                        <property name="sizePolicy">
+                                            <sizepolicy>
+                                                <hsizetype>1</hsizetype>
+                                                <vsizetype>0</vsizetype>
+                                                <horstretch>0</horstretch>
+                                                <verstretch>0</verstretch>
+                                            </sizepolicy>
+                                        </property>
+                                        <property name="whatsThis" stdset="0">
+                                            <string>Displays the VRDP Server port.</string>
+                                        </property>
+                                    </widget>
+                                    <widget class="QComboBox">
+                                        <property name="name">
+                                            <cstring>cbVRDPAuthType</cstring>
+                                        </property>
+                                        <property name="sizePolicy">
+                                            <sizepolicy>
+                                                <hsizetype>1</hsizetype>
+                                                <vsizetype>0</vsizetype>
+                                                <horstretch>0</horstretch>
+                                                <verstretch>0</verstretch>
+                                            </sizepolicy>
+                                        </property>
+                                        <property name="whatsThis" stdset="0">
+                                            <string>Defines the VRDP authentication method.</string>
+                                        </property>
+                                    </widget>
+                                    <widget class="QLineEdit">
+                                        <property name="name">
+                                            <cstring>leVRDPTimeout</cstring>
+                                        </property>
+                                        <property name="sizePolicy">
+                                            <sizepolicy>
+                                                <hsizetype>1</hsizetype>
+                                                <vsizetype>0</vsizetype>
+                                                <horstretch>0</horstretch>
+                                                <verstretch>0</verstretch>
+                                            </sizepolicy>
+                                        </property>
+                                        <property name="whatsThis" stdset="0">
+                                            <string>Specifies the timeout for guest authentication, in milliseconds.</string>
+                                        </property>
+                                    </widget>
+                                </vbox>
+                            </widget>
+                            <widget class="QLayoutWidget">
+                                <property name="name">
+                                    <cstring>layout33</cstring>
+                                </property>
+                                <vbox>
+                                    <property name="name">
+                                        <cstring>unnamed</cstring>
+                                    </property>
+                                    <spacer>
+                                        <property name="name">
+                                            <cstring>spacer36_2</cstring>
+                                        </property>
+                                        <property name="orientation">
+                                            <enum>Horizontal</enum>
+                                        </property>
+                                        <property name="sizeType">
+                                            <enum>Expanding</enum>
+                                        </property>
+                                        <property name="sizeHint">
+                                            <size>
+                                                <width>16</width>
+                                                <height>20</height>
+                                            </size>
+                                        </property>
+                                    </spacer>
+                                    <spacer>
+                                        <property name="name">
+                                            <cstring>spacer36_2_3</cstring>
+                                        </property>
+                                        <property name="orientation">
+                                            <enum>Horizontal</enum>
+                                        </property>
+                                        <property name="sizeType">
+                                            <enum>Expanding</enum>
+                                        </property>
+                                        <property name="sizeHint">
+                                            <size>
+                                                <width>16</width>
+                                                <height>20</height>
+                                            </size>
+                                        </property>
+                                    </spacer>
+                                    <spacer>
+                                        <property name="name">
+                                            <cstring>spacer36_2_2</cstring>
+                                        </property>
+                                        <property name="orientation">
+                                            <enum>Horizontal</enum>
+                                        </property>
+                                        <property name="sizeType">
+                                            <enum>Expanding</enum>
+                                        </property>
+                                        <property name="sizeHint">
+                                            <size>
+                                                <width>16</width>
+                                                <height>20</height>
+                                            </size>
+                                        </property>
+                                    </spacer>
+                                </vbox>
+                            </widget>
+                        </hbox>
+                    </widget>
+                    <spacer>
+                        <property name="name">
+                            <cstring>spacer11_2</cstring>
+                        </property>
+                        <property name="orientation">
+                            <enum>Vertical</enum>
+                        </property>
+                        <property name="sizeType">
+                            <enum>Expanding</enum>
+                        </property>
+                        <property name="sizeHint">
+                            <size>
+                                <width>20</width>
+                                <height>110</height>
+                            </size>
+                        </property>
+                    </spacer>
                 </vbox>
             </widget>
@@ -2359,4 +2593,8 @@
     <tabstop>tbUSBFilterUp</tabstop>
     <tabstop>tbUSBFilterDown</tabstop>
+    <tabstop>grbVRDP</tabstop>
+    <tabstop>leVRDPPort</tabstop>
+    <tabstop>cbVRDPAuthType</tabstop>
+    <tabstop>leVRDPTimeout</tabstop>
     <tabstop>buttonHelp</tabstop>
     <tabstop>buttonOk</tabstop>
@@ -2397,4 +2635,5 @@
     <variable access="private">QIWidgetValidator *wvalDVD;</variable>
     <variable access="private">QIWidgetValidator *wvalFloppy;</variable>
+    <variable access="private">QIWidgetValidator *wvalVRDP;</variable>
     <variable access="private">QUuid uuidHDA;</variable>
     <variable access="private">QUuid uuidHDB;</variable>
Index: /trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h	(revision 283)
+++ /trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h	(revision 284)
@@ -457,4 +457,25 @@
     mUSBFilterListModified = false;
 
+    /* VRDP Page */
+
+    QWhatsThis::add (static_cast <QWidget *> (grbVRDP->child ("qt_groupbox_checkbox")),
+                     tr ("When checked, enables the Virtual Remote Desktop "
+                         "Protocol which allows remote clients to connect "
+                         "to this virtual machine (when it is running) "
+                         "using a VRDP client."));
+
+    ULONG maxPort = 65535;
+    leVRDPPort->setValidator (new QIntValidator (0, maxPort, this));
+    leVRDPTimeout->setValidator (new QIntValidator (0, maxPort, this));
+    wvalVRDP = new QIWidgetValidator (pageVRDP, this);
+    connect (wvalVRDP, SIGNAL (validityChanged (const QIWidgetValidator *)),
+             this, SLOT (enableOk (const QIWidgetValidator *)));
+    connect (wvalVRDP, SIGNAL (isValidRequested (QIWidgetValidator *)),
+             this, SLOT (revalidate( QIWidgetValidator *)));
+
+    connect (grbVRDP, SIGNAL (toggled (bool)), wvalFloppy, SLOT (revalidate()));
+    connect (leVRDPPort, SIGNAL (textChanged (const QString&)), wvalFloppy, SLOT (revalidate()));
+    connect (leVRDPTimeout, SIGNAL (textChanged (const QString&)), wvalFloppy, SLOT (revalidate()));
+
     /*
      *  set initial values
@@ -557,4 +578,12 @@
     wvalDVD->revalidate();
     wvalFloppy->revalidate();
+
+    /* VRDP Page */
+
+    leVRDPPort->setAlignment (Qt::AlignRight);
+    cbVRDPAuthType->insertItem (vboxGlobal().toString (CEnums::VRDPAuthNull));
+    cbVRDPAuthType->insertItem (vboxGlobal().toString (CEnums::VRDPAuthExternal));
+    cbVRDPAuthType->insertItem (vboxGlobal().toString (CEnums::VRDPAuthGuest));
+    leVRDPTimeout->setAlignment (Qt::AlignRight);
 }
 
@@ -938,4 +967,13 @@
             setWarning (tr ("Incorrect host network interface is selected for Adapter %1.")
                         .arg (slot));
+    }
+    else if (pg == pageVRDP)
+    {
+        valid = !(grbVRDP->isChecked() &&
+                (leVRDPPort->text().isEmpty() || leVRDPTimeout->text().isEmpty()));
+        if (!valid && leVRDPPort->text().isEmpty())
+            setWarning (tr ("VRDP Port is not set."));
+        if (!valid && leVRDPTimeout->text().isEmpty())
+            setWarning (tr ("VRDP Timeout is not set."));
     }
 
@@ -1210,4 +1248,13 @@
     }
 
+    /* vrdp */
+    {
+        CVRDPServer vrdp = machine.GetVRDPServer();
+        grbVRDP->setChecked (vrdp.GetEnabled());
+        leVRDPPort->setText (QString::number (vrdp.GetPort()));
+        cbVRDPAuthType->setCurrentText (vboxGlobal().toString (vrdp.GetAuthType()));
+        leVRDPTimeout->setText (QString::number (vrdp.GetAuthTimeout()));
+    }
+
     /* request for media shortcuts update */
     cbHDA->setBelongsTo(machine.GetId());
@@ -1425,4 +1472,13 @@
     }
 
+    /* vrdp */
+    {
+        CVRDPServer vrdp = cmachine.GetVRDPServer();
+        vrdp.SetEnabled (grbVRDP->isChecked());
+        vrdp.SetPort (leVRDPPort->text().toULong());
+        vrdp.SetAuthType (vboxGlobal().toVRDPAuthType (cbVRDPAuthType->currentText()));
+        vrdp.SetAuthTimeout (leVRDPTimeout->text().toULong());
+    }
+
     return COMResult();
 }
