diff --git a/core/krdc.kcfg b/core/krdc.kcfg --- a/core/krdc.kcfg +++ b/core/krdc.kcfg @@ -121,6 +121,18 @@ /media + + + + + + + + + + + + diff --git a/rdp/rdphostpreferences.h b/rdp/rdphostpreferences.h --- a/rdp/rdphostpreferences.h +++ b/rdp/rdphostpreferences.h @@ -56,6 +56,14 @@ int performance() const; void setShareMedia(const QString &shareMedia); QString shareMedia() const; + void setRDGatewayServer(const QString &server); + QString rDGatewayServer() const; + void setRDGatewayUsername(const QString &username); + QString rDGatewayUsername() const; + void setRDGatewayPassword(const QString &password); + QString rDGatewayPassword() const; + void setRDGatewayDomain(const QString &domain); + QString rDGatewayDomain() const; protected: QWidget* createProtocolSpecificConfigPage(); diff --git a/rdp/rdphostpreferences.cpp b/rdp/rdphostpreferences.cpp --- a/rdp/rdphostpreferences.cpp +++ b/rdp/rdphostpreferences.cpp @@ -100,7 +100,7 @@ connect(rdpUi.kcfg_Sound, SIGNAL(currentIndexChanged(int)), SLOT(updateSoundSystem(int))); - rdpUi.loginGroupBox->setVisible(false); + rdpUi.loginTab->setVisible(false); rdpUi.kcfg_Height->setValue(height()); rdpUi.kcfg_Width->setValue(width()); @@ -114,6 +114,10 @@ rdpUi.kcfg_RemoteFX->setChecked(remoteFX()); rdpUi.kcfg_Performance->setCurrentIndex(performance()); rdpUi.kcfg_ShareMedia->setText(shareMedia()); + rdpUi.kcfg_RDGatewayServer->setText(rDGatewayServer()); + rdpUi.kcfg_RDGatewayUsername->setText(rDGatewayUsername()); + rdpUi.kcfg_RDGatewayPassword->setText(rDGatewayPassword()); + rdpUi.kcfg_RDGatewayDomain->setText(rDGatewayDomain()); // Have to call updateWidthHeight() here // We leverage the final part of this function to enable/disable kcfg_Height and kcfg_Width @@ -204,6 +208,10 @@ setRemoteFX(rdpUi.kcfg_RemoteFX->isChecked()); setPerformance(rdpUi.kcfg_Performance->currentIndex()); setShareMedia(rdpUi.kcfg_ShareMedia->text()); + setRDGatewayServer(rdpUi.kcfg_RDGatewayServer->text()); + setRDGatewayUsername(rdpUi.kcfg_RDGatewayUsername->text()); + setRDGatewayPassword(rdpUi.kcfg_RDGatewayPassword->text()); + setRDGatewayDomain(rdpUi.kcfg_RDGatewayDomain->text()); } void RdpHostPreferences::setResolution(int resolution) @@ -314,4 +322,44 @@ return m_configGroup.readEntry("shareMedia", Settings::shareMedia()); } +void RdpHostPreferences::setRDGatewayServer(const QString &server) +{ + m_configGroup.writeEntry("rDGatewayServer", server); +} + +QString RdpHostPreferences::rDGatewayServer() const +{ + return m_configGroup.readEntry("rDGatewayServer", Settings::rDGatewayServer()); +} + +void RdpHostPreferences::setRDGatewayUsername(const QString &username) +{ + m_configGroup.writeEntry("rDGatewayUsername", username); +} + +QString RdpHostPreferences::rDGatewayUsername() const +{ + return m_configGroup.readEntry("rDGatewayUsername", Settings::rDGatewayUsername()); +} + +void RdpHostPreferences::setRDGatewayPassword(const QString &password) +{ + m_configGroup.writeEntry("rDGatewayPassword", password); +} + +QString RdpHostPreferences::rDGatewayPassword() const +{ + return m_configGroup.readEntry("rDGatewayPassword", Settings::rDGatewayPassword()); +} + +void RdpHostPreferences::setRDGatewayDomain(const QString &domain) +{ + m_configGroup.writeEntry("rDGatewayDomain", domain); +} + +QString RdpHostPreferences::rDGatewayDomain() const +{ + return m_configGroup.readEntry("rDGatewayDomain", Settings::rDGatewayDomain()); +} + #include "rdphostpreferences.moc" diff --git a/rdp/rdppreferences.cpp b/rdp/rdppreferences.cpp --- a/rdp/rdppreferences.cpp +++ b/rdp/rdppreferences.cpp @@ -38,7 +38,6 @@ // that important because you will not change this configuration each day... // see rdp/rdphostpreferences.cpp rdpUi.kcfg_Resolution->hide(); - rdpUi.resolutionDummyLabel->hide(); rdpUi.kcfg_Height->setEnabled(true); rdpUi.kcfg_Width->setEnabled(true); rdpUi.heightLabel->setEnabled(true); diff --git a/rdp/rdppreferences.ui b/rdp/rdppreferences.ui --- a/rdp/rdppreferences.ui +++ b/rdp/rdppreferences.ui @@ -6,667 +6,687 @@ 0 0 - 484 - 452 + 546 + 358 - - - Connection + + + 0 - - - - - - - Desktop &resolution: - - - kcfg_Resolution - - - - - - - - - - - - - - - 280 - 0 - - - - Here you can specify the resolution of the remote desktop. This resolution determines the size of the desktop that will be presented to you. - - - 1 - - - - Minimal (640x480) + + + Connection + + + + + + Des&ktop resolution: + + + kcfg_Resolution + + + + + + + + 280 + 0 + + + + Here you can specify the resolution of the remote desktop. This resolution determines the size of the desktop that will be presented to you. + + + 1 + + + + Minimal (640x480) + + + + + Small (800x600) + + + + + Normal (1024x768) + + + + + Large (1280x1024) + + + + + Very Large (1600x1200) + + + + + Current Screen Resolution + + + + + Custom Resolution (...) + + + + + Current KRDC Size + + + + + + + + + + false - - - Small (800x600) + &Width: - - - - Normal (1024x768) + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - Large (1280x1024) + + kcfg_Width - - - - Very Large (1600x1200) + + + + + + false - - - - Current Screen Resolution + + This is the width of the remote desktop. You can only change this value manually if you select Custom as desktop resolution above. - - - - Custom Resolution (...) + + 9999 + + + 800 + + + + + + + false - - - Current KRDC Size + H&eight: - - - - - - - - - false - - - &Width: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - kcfg_Width - - - - - - - false - - - This is the width of the remote desktop. You can only change this value manually if you select Custom as desktop resolution above. - - - 9999 - - - 800 - - - - - - - false - - - H&eight: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - kcfg_Height - - - - - - - false - - - This is the height of the remote desktop. You can only change this value manually if you select Custom as desktop resolution above. - - - 9999 - - - 600 - - - - - - - - - - - Color &depth: - - - kcfg_ColorDepth - - - - - - - - 280 - 0 - - - - - Low Color (8 Bit) - - - - - High Color (16 Bit) - - - - - True Color (24 Bit) - - - - - True Color with Alpha (32 Bit) - - - - - - - - &Keyboard layout: - - - kcfg_KeyboardLayout - - - - - - - - 280 - 0 - - - - Use this to specify your keyboard layout. This layout setting is used to send the correct keyboard codes to the server. - - - 7 - - - - Arabic (ar) - - - - - Czech (cs) - - - - - Danish (da) - - - - - German (de) - - - - - Swiss German (de-ch) - - - - - American Dvorak (en-dv) - - - - - British English (en-gb) - - - - - US English (en-us) - - - - - Spanish (es) - - - - - Estonian (et) - - - - - Finnish (fi) - - - - - Faroese (fo) - - - - - French (fr) - - - - - Belgian (fr-be) - - - - - French Canadian (fr-ca) - - - - - Swiss French (fr-ch) - - - - - Hebrew (he) - - - + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + kcfg_Height + + + + + + + false + + + This is the height of the remote desktop. You can only change this value manually if you select Custom as desktop resolution above. + + + 9999 + + + 600 + + + + + + + - Croatian (hr) + Color &depth: - - - - Hungarian (hu) + + kcfg_ColorDepth - - - - Icelandic (is) + + + + + + + 280 + 0 + - - + + + Low Color (8 Bit) + + + + + High Color (16 Bit) + + + + + True Color (24 Bit) + + + + + True Color with Alpha (32 Bit) + + + + + + - Italian (it) + &Keyboard layout: - - - - Japanese (ja) + + kcfg_KeyboardLayout - - - - Korean (ko) + + + + + + + 280 + 0 + - - - - Lithuanian (lt) + + Use this to specify your keyboard layout. This layout setting is used to send the correct keyboard codes to the server. - - - - Latvian (lv) + + 7 - - + + + Arabic (ar) + + + + + Czech (cs) + + + + + Danish (da) + + + + + German (de) + + + + + Swiss German (de-ch) + + + + + American Dvorak (en-dv) + + + + + British English (en-gb) + + + + + US English (en-us) + + + + + Spanish (es) + + + + + Estonian (et) + + + + + Finnish (fi) + + + + + Faroese (fo) + + + + + French (fr) + + + + + Belgian (fr-be) + + + + + French Canadian (fr-ca) + + + + + Swiss French (fr-ch) + + + + + Hebrew (he) + + + + + Croatian (hr) + + + + + Hungarian (hu) + + + + + Icelandic (is) + + + + + Italian (it) + + + + + Japanese (ja) + + + + + Korean (ko) + + + + + Lithuanian (lt) + + + + + Latvian (lv) + + + + + Macedonian (mk) + + + + + Dutch (nl) + + + + + Belgian Dutch (nl-be) + + + + + Norwegian (no) + + + + + Polish (pl) + + + + + Portuguese (pt) + + + + + Brazilian (pt-br) + + + + + Russian (ru) + + + + + Slovenian (sl) + + + + + Swedish (sv) + + + + + Thai (th) + + + + + Turkish (tr) + + + + + + - Macedonian (mk) + Sound: - - - - Dutch (nl) + + kcfg_Sound - - + + + + + + + + + 280 + 0 + + + + + On This Computer + + + + + On Remote Computer + + + + + Disable Sound + + + + + + + + + 100 + 0 + + + + + ALSA + + + + + PulseAudio + + + + + None + + + + + + + + - Belgian Dutch (nl-be) + Performance: - - - - Norwegian (no) + + kcfg_Performance - - + + + + - Polish (pl) + Re&moteFX: - - - - Portuguese (pt) + + kcfg_RemoteFX - - - - Brazilian (pt-br) + + + + + + RemoteFX covers a set of technologies that enhance visual experience of the Remote Desktop Protocol. - - - Russian (ru) + Enhanced visual experience - - + + + + - Slovenian (sl) + Share &Media: - - - - Swedish (sv) + + kcfg_ShareMedia - - - - Thai (th) + + + + + + + 280 + 0 + - - - - Turkish (tr) - - - - - - - - - - Sound: + + Share a local media directory with the remote host. - - kcfg_Sound + + true - - - - - - - + + + 280 0 - On This Computer + Modem - On Remote Computer + Broadband - Disable Sound + LAN - - - + + + + + + Expert Options + + + + + + Co&nsole login: + + + kcfg_Console + + + + + + + Attach to Windows Server console + + + + + + + E&xtra options: + + + kcfg_ExtraOptions + + + + + - 100 + 280 0 - - - ALSA - - - - - PulseAudio - - - - - None - - + + Here you can enter additional xfreerdp (FreeRDP) options. + + + true + - - - - - - - Performance: - - - kcfg_Performance - - - - - - - - 280 - 0 - - - + + + + + + Login + + + + + + Default user name: + + + + + + + No default user name + + + true + + + + + - Modem + Automatically recognize "LDAP"-Logins and share passwords + + + + + + + + Remote Desktop Gateway + + + + + + RD Gateway server: - - + + + + + + + - Broadband + RD Gateway username: - - + + + + + + + - LAN - - - - - - - - RemoteFX: - - - kcfg_RemoteFX - - - - - - - Enhanced visual experience - - - RemoteFX covers a set of technologies that enhance visual experience of the Remote Desktop Protocol. - - - - - - - Share Media: - - - kcfg_ShareMedia - - - - - - - - 280 - 0 - - - - Share a local media directory with the remote host. - - - true - - - - - - - - - - Expert Options - - - - - - Console login: - - - kcfg_Console - - - - - - - Attach to Windows Server console - - - - - - - Extra options: - - - kcfg_ExtraOptions - - - - - - - - 280 - 0 - - - - Here you can enter additional xfreerdp (FreeRDP) options. - - - true - - - - - - - - - - Login - - - - - - - - Default user name: - - - - - - - No default user name - - - true - - - - - - - - - Automatically recognize "LDAP"-Logins and share passwords - - - - + RD Gateway password: + + + + + + + QLineEdit::Password + + + + + + + RD Gateway domain: + + + + + + + + - - - - Qt::Vertical - - - - 428 - 16 - - - - @@ -682,6 +702,7 @@ + tabWidget kcfg_Resolution kcfg_Width kcfg_Height @@ -696,6 +717,10 @@ kcfg_ExtraOptions kcfg_DefaultRdpUserName kcfg_RecognizeLdapLogins + kcfg_RDGatewayServer + kcfg_RDGatewayUsername + kcfg_RDGatewayPassword + kcfg_RDGatewayDomain diff --git a/rdp/rdpview.cpp b/rdp/rdpview.cpp --- a/rdp/rdpview.cpp +++ b/rdp/rdpview.cpp @@ -335,6 +335,23 @@ arguments += additionalArguments; } + // RD Gateway + if (!m_hostPreferences->rDGatewayServer().isEmpty()) { + arguments << QStringLiteral("/g:") + m_hostPreferences->rDGatewayServer(); + + if (!m_hostPreferences->rDGatewayUsername().isEmpty()) { + arguments << QStringLiteral("/gu:") + m_hostPreferences->rDGatewayUsername(); + + if (!m_hostPreferences->rDGatewayPassword().isEmpty()) { + arguments << QStringLiteral("/gp:") + m_hostPreferences->rDGatewayPassword(); + } + + if (!m_hostPreferences->rDGatewayDomain().isEmpty()) { + arguments << QStringLiteral("/gd:") + m_hostPreferences->rDGatewayDomain(); + } + } + } + // krdc has no support for certificate management yet; it would not be possbile to connect to any host: // "The host key for example.com has changed" ... // "Add correct host key in ~/.freerdp/known_hosts to get rid of this message."