|
|
74b83a |
diff -up kdenetwork-4.10.5/krdc/CMakeLists.txt.freerdp kdenetwork-4.10.5/krdc/CMakeLists.txt
|
|
|
74b83a |
--- kdenetwork-4.10.5/krdc/CMakeLists.txt.freerdp 2013-07-04 21:52:45.864029571 +0200
|
|
|
74b83a |
+++ kdenetwork-4.10.5/krdc/CMakeLists.txt 2013-07-04 22:05:59.950275124 +0200
|
|
|
74b83a |
@@ -29,7 +29,13 @@ endif(NOT INSIDE_KDENETWORK)
|
|
|
74b83a |
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
|
|
|
74b83a |
|
|
|
74b83a |
macro_optional_find_package(LibVNCServer)
|
|
|
74b83a |
-macro_log_feature(LIBVNCSERVER_FOUND "libvncserver" "VNC Server library" "http://libvncserver.sourceforge.net/" FALSE "0.9" "Needed to build Krfb and VNC support in Krdc")
|
|
|
74b83a |
+macro_log_feature(LIBVNCSERVER_FOUND "libvncserver" "VNC Server library" "http://libvncserver.sourceforge.net/" FALSE "0.9" "Needed to build Krfb and VNC support in KRDC")
|
|
|
74b83a |
+
|
|
|
74b83a |
+FIND_PROGRAM(FREERDP_EXECUTABLE xfreerdp)
|
|
|
74b83a |
+if(FREERDP_EXECUTABLE)
|
|
|
74b83a |
+ set(FREERDP_EXECUTABLE_FOUND true)
|
|
|
74b83a |
+endif(FREERDP_EXECUTABLE)
|
|
|
74b83a |
+macro_log_feature(FREERDP_EXECUTABLE_FOUND "freerdp" "A free Remote Desktop Protocol (RDP) Implementation" "http://www.freerdp.com" FALSE "1.0.2" "Needed for RDP support in KRDC (at runtime)")
|
|
|
74b83a |
|
|
|
74b83a |
# NX support is not ready for KDE 4.2; disabled (uwolfer)
|
|
|
74b83a |
# macro_optional_find_package(LibNXCL)
|
|
|
74b83a |
diff -up kdenetwork-4.10.5/krdc/core/krdc.kcfg.freerdp kdenetwork-4.10.5/krdc/core/krdc.kcfg
|
|
|
74b83a |
--- kdenetwork-4.10.5/krdc/core/krdc.kcfg.freerdp 2013-06-28 20:08:57.390483848 +0200
|
|
|
74b83a |
+++ kdenetwork-4.10.5/krdc/core/krdc.kcfg 2013-07-04 21:52:45.865029569 +0200
|
|
|
74b83a |
@@ -83,7 +83,7 @@
|
|
|
74b83a |
<default>7</default>
|
|
|
74b83a |
</entry>
|
|
|
74b83a |
<entry name="ColorDepth" type="Int">
|
|
|
74b83a |
- <default>0</default>
|
|
|
74b83a |
+ <default>2</default>
|
|
|
74b83a |
</entry>
|
|
|
74b83a |
<entry name="Sound" type="Int">
|
|
|
74b83a |
<default>0</default>
|
|
|
74b83a |
@@ -100,6 +100,15 @@
|
|
|
74b83a |
<entry name="RecognizeLdapLogins" type="Bool">
|
|
|
74b83a |
<default>true</default>
|
|
|
74b83a |
</entry>
|
|
|
74b83a |
+ <entry name="RemoteFX" type="Bool">
|
|
|
74b83a |
+ <default>true</default>
|
|
|
74b83a |
+ </entry>
|
|
|
74b83a |
+ <entry name="Performance" type="Int">
|
|
|
74b83a |
+ <default>2</default>
|
|
|
74b83a |
+ </entry>
|
|
|
74b83a |
+ <entry name="ShareMedia" type="String">
|
|
|
74b83a |
+ <default>/media</default>
|
|
|
74b83a |
+ </entry>
|
|
|
74b83a |
</group>
|
|
|
74b83a |
<group name="NX">
|
|
|
74b83a |
<entry name="NxWidth" type="Int">
|
|
|
74b83a |
diff -up kdenetwork-4.10.5/krdc/rdp/CMakeLists.txt.freerdp kdenetwork-4.10.5/krdc/rdp/CMakeLists.txt
|
|
|
74b83a |
--- kdenetwork-4.10.5/krdc/rdp/CMakeLists.txt.freerdp 2013-06-28 20:08:57.392483928 +0200
|
|
|
74b83a |
+++ kdenetwork-4.10.5/krdc/rdp/CMakeLists.txt 2013-07-04 21:52:45.865029569 +0200
|
|
|
74b83a |
@@ -1,9 +1,9 @@
|
|
|
74b83a |
|
|
|
74b83a |
if(Q_WS_X11)
|
|
|
74b83a |
- set(HAVE_RDESKTOP true) # TODO: implement cmake check?
|
|
|
74b83a |
+ set(HAVE_XFREERDP true)
|
|
|
74b83a |
endif(Q_WS_X11)
|
|
|
74b83a |
|
|
|
74b83a |
-if(HAVE_RDESKTOP)
|
|
|
74b83a |
+if(HAVE_XFREERDP)
|
|
|
74b83a |
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5012)
|
|
|
74b83a |
|
|
|
74b83a |
include_directories(
|
|
|
74b83a |
@@ -49,4 +49,4 @@ if(HAVE_RDESKTOP)
|
|
|
74b83a |
|
|
|
74b83a |
install(FILES rdp.protocol DESTINATION ${SERVICES_INSTALL_DIR})
|
|
|
74b83a |
install(FILES smb2rdc.desktop DESTINATION ${SERVICES_INSTALL_DIR}/ServiceMenus)
|
|
|
74b83a |
-endif(HAVE_RDESKTOP)
|
|
|
74b83a |
+endif(HAVE_XFREERDP)
|
|
|
74b83a |
diff -up kdenetwork-4.10.5/krdc/rdp/rdphostpreferences.cpp.freerdp kdenetwork-4.10.5/krdc/rdp/rdphostpreferences.cpp
|
|
|
74b83a |
--- kdenetwork-4.10.5/krdc/rdp/rdphostpreferences.cpp.freerdp 2013-06-28 20:08:57.392483928 +0200
|
|
|
74b83a |
+++ kdenetwork-4.10.5/krdc/rdp/rdphostpreferences.cpp 2013-07-04 21:52:45.865029569 +0200
|
|
|
74b83a |
@@ -1,6 +1,7 @@
|
|
|
74b83a |
/****************************************************************************
|
|
|
74b83a |
**
|
|
|
74b83a |
-** Copyright (C) 2007 Urs Wolfer <uwolfer @ kde.org>
|
|
|
74b83a |
+** Copyright (C) 2007 - 2012 Urs Wolfer <uwolfer @ kde.org>
|
|
|
74b83a |
+** Copyright (C) 2012 AceLan Kao <acelan @ acelan.idv.tw>
|
|
|
74b83a |
**
|
|
|
74b83a |
** This file is part of KDE.
|
|
|
74b83a |
**
|
|
|
74b83a |
@@ -108,6 +109,9 @@ QWidget* RdpHostPreferences::createProto
|
|
|
74b83a |
rdpUi.kcfg_Sound->setCurrentIndex(sound());
|
|
|
74b83a |
rdpUi.kcfg_Console->setChecked(console());
|
|
|
74b83a |
rdpUi.kcfg_ExtraOptions->setText(extraOptions());
|
|
|
74b83a |
+ rdpUi.kcfg_RemoteFX->setChecked(remoteFX());
|
|
|
74b83a |
+ rdpUi.kcfg_Performance->setCurrentIndex(performance());
|
|
|
74b83a |
+ rdpUi.kcfg_ShareMedia->setText(shareMedia());
|
|
|
74b83a |
|
|
|
74b83a |
connect(rdpUi.resolutionComboBox, SIGNAL(currentIndexChanged(int)), SLOT(updateWidthHeight(int)));
|
|
|
74b83a |
|
|
|
74b83a |
@@ -172,6 +176,9 @@ void RdpHostPreferences::acceptConfig()
|
|
|
74b83a |
setSound(rdpUi.kcfg_Sound->currentIndex());
|
|
|
74b83a |
setConsole(rdpUi.kcfg_Console->isChecked());
|
|
|
74b83a |
setExtraOptions(rdpUi.kcfg_ExtraOptions->text());
|
|
|
74b83a |
+ setRemoteFX(rdpUi.kcfg_RemoteFX->isChecked());
|
|
|
74b83a |
+ setPerformance(rdpUi.kcfg_Performance->currentIndex());
|
|
|
74b83a |
+ setShareMedia(rdpUi.kcfg_ShareMedia->text());
|
|
|
74b83a |
}
|
|
|
74b83a |
|
|
|
74b83a |
void RdpHostPreferences::setColorDepth(int colorDepth)
|
|
|
74b83a |
@@ -228,4 +235,36 @@ QString RdpHostPreferences::extraOptions
|
|
|
74b83a |
return m_configGroup.readEntry("extraOptions", Settings::extraOptions());
|
|
|
74b83a |
}
|
|
|
74b83a |
|
|
|
74b83a |
+void RdpHostPreferences::setRemoteFX(bool remoteFX)
|
|
|
74b83a |
+{
|
|
|
74b83a |
+ m_configGroup.writeEntry("remoteFX", remoteFX);
|
|
|
74b83a |
+}
|
|
|
74b83a |
+
|
|
|
74b83a |
+bool RdpHostPreferences::remoteFX() const
|
|
|
74b83a |
+{
|
|
|
74b83a |
+ return m_configGroup.readEntry("remoteFX", Settings::remoteFX());
|
|
|
74b83a |
+}
|
|
|
74b83a |
+
|
|
|
74b83a |
+void RdpHostPreferences::setPerformance(int performance)
|
|
|
74b83a |
+{
|
|
|
74b83a |
+ if (performance >= 0)
|
|
|
74b83a |
+ m_configGroup.writeEntry("performance", performance);
|
|
|
74b83a |
+}
|
|
|
74b83a |
+
|
|
|
74b83a |
+int RdpHostPreferences::performance() const
|
|
|
74b83a |
+{
|
|
|
74b83a |
+ return m_configGroup.readEntry("performance", Settings::performance());
|
|
|
74b83a |
+}
|
|
|
74b83a |
+
|
|
|
74b83a |
+void RdpHostPreferences::setShareMedia(const QString &shareMedia)
|
|
|
74b83a |
+{
|
|
|
74b83a |
+ if (!shareMedia.isNull())
|
|
|
74b83a |
+ m_configGroup.writeEntry("shareMedia", shareMedia);
|
|
|
74b83a |
+}
|
|
|
74b83a |
+
|
|
|
74b83a |
+QString RdpHostPreferences::shareMedia() const
|
|
|
74b83a |
+{
|
|
|
74b83a |
+ return m_configGroup.readEntry("shareMedia", Settings::shareMedia());
|
|
|
74b83a |
+}
|
|
|
74b83a |
+
|
|
|
74b83a |
#include "rdphostpreferences.moc"
|
|
|
74b83a |
diff -up kdenetwork-4.10.5/krdc/rdp/rdphostpreferences.h.freerdp kdenetwork-4.10.5/krdc/rdp/rdphostpreferences.h
|
|
|
74b83a |
--- kdenetwork-4.10.5/krdc/rdp/rdphostpreferences.h.freerdp 2013-06-28 20:08:57.392483928 +0200
|
|
|
74b83a |
+++ kdenetwork-4.10.5/krdc/rdp/rdphostpreferences.h 2013-07-04 21:52:45.866029567 +0200
|
|
|
74b83a |
@@ -1,6 +1,7 @@
|
|
|
74b83a |
/****************************************************************************
|
|
|
74b83a |
**
|
|
|
74b83a |
-** Copyright (C) 2007 Urs Wolfer <uwolfer @ kde.org>
|
|
|
74b83a |
+** Copyright (C) 2007 - 2012 Urs Wolfer <uwolfer @ kde.org>
|
|
|
74b83a |
+** Copyright (C) 2012 AceLan Kao <acelan @ acelan.idv.tw>
|
|
|
74b83a |
**
|
|
|
74b83a |
** This file is part of KDE.
|
|
|
74b83a |
**
|
|
|
74b83a |
@@ -45,6 +46,12 @@ public:
|
|
|
74b83a |
bool console() const;
|
|
|
74b83a |
void setExtraOptions(const QString &extraOptions);
|
|
|
74b83a |
QString extraOptions() const;
|
|
|
74b83a |
+ void setRemoteFX(bool remoteFX);
|
|
|
74b83a |
+ bool remoteFX() const;
|
|
|
74b83a |
+ void setPerformance(int performance);
|
|
|
74b83a |
+ int performance() const;
|
|
|
74b83a |
+ void setShareMedia(const QString &shareMedia);
|
|
|
74b83a |
+ QString shareMedia() const;
|
|
|
74b83a |
|
|
|
74b83a |
protected:
|
|
|
74b83a |
QWidget* createProtocolSpecificConfigPage();
|
|
|
74b83a |
diff -up kdenetwork-4.10.5/krdc/rdp/rdppreferences.ui.freerdp kdenetwork-4.10.5/krdc/rdp/rdppreferences.ui
|
|
|
74b83a |
--- kdenetwork-4.10.5/krdc/rdp/rdppreferences.ui.freerdp 2013-06-28 20:08:57.392483928 +0200
|
|
|
74b83a |
+++ kdenetwork-4.10.5/krdc/rdp/rdppreferences.ui 2013-07-04 21:52:45.866029567 +0200
|
|
|
74b83a |
@@ -7,7 +7,7 @@
|
|
|
74b83a |
<x>0</x>
|
|
|
74b83a |
<y>0</y>
|
|
|
74b83a |
<width>484</width>
|
|
|
74b83a |
- <height>406</height>
|
|
|
74b83a |
+ <height>452</height>
|
|
|
74b83a |
</rect>
|
|
|
74b83a |
</property>
|
|
|
74b83a |
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
|
74b83a |
@@ -415,6 +415,12 @@
|
|
|
74b83a |
</item>
|
|
|
74b83a |
<item row="3" column="1">
|
|
|
74b83a |
<widget class="KComboBox" name="kcfg_Sound">
|
|
|
74b83a |
+ <property name="minimumSize">
|
|
|
74b83a |
+ <size>
|
|
|
74b83a |
+ <width>280</width>
|
|
|
74b83a |
+ <height>0</height>
|
|
|
74b83a |
+ </size>
|
|
|
74b83a |
+ </property>
|
|
|
74b83a |
<item>
|
|
|
74b83a |
<property name="text">
|
|
|
74b83a |
<string>On This Computer</string>
|
|
|
74b83a |
@@ -432,6 +438,87 @@
|
|
|
74b83a |
</item>
|
|
|
74b83a |
</widget>
|
|
|
74b83a |
</item>
|
|
|
74b83a |
+ <item row="4" column="0">
|
|
|
74b83a |
+ <widget class="QLabel" name="performanceLabel">
|
|
|
74b83a |
+ <property name="text">
|
|
|
74b83a |
+ <string comment="label for performance settings in preferences dialog">Performance:</string>
|
|
|
74b83a |
+ </property>
|
|
|
74b83a |
+ <property name="buddy">
|
|
|
74b83a |
+ <cstring>kcfg_Performance</cstring>
|
|
|
74b83a |
+ </property>
|
|
|
74b83a |
+ </widget>
|
|
|
74b83a |
+ </item>
|
|
|
74b83a |
+ <item row="4" column="1">
|
|
|
74b83a |
+ <widget class="KComboBox" name="kcfg_Performance">
|
|
|
74b83a |
+ <property name="minimumSize">
|
|
|
74b83a |
+ <size>
|
|
|
74b83a |
+ <width>280</width>
|
|
|
74b83a |
+ <height>0</height>
|
|
|
74b83a |
+ </size>
|
|
|
74b83a |
+ </property>
|
|
|
74b83a |
+ <item>
|
|
|
74b83a |
+ <property name="text">
|
|
|
74b83a |
+ <string>Modem</string>
|
|
|
74b83a |
+ </property>
|
|
|
74b83a |
+ </item>
|
|
|
74b83a |
+ <item>
|
|
|
74b83a |
+ <property name="text">
|
|
|
74b83a |
+ <string>Broadband</string>
|
|
|
74b83a |
+ </property>
|
|
|
74b83a |
+ </item>
|
|
|
74b83a |
+ <item>
|
|
|
74b83a |
+ <property name="text">
|
|
|
74b83a |
+ <string>LAN</string>
|
|
|
74b83a |
+ </property>
|
|
|
74b83a |
+ </item>
|
|
|
74b83a |
+ </widget>
|
|
|
74b83a |
+ </item>
|
|
|
74b83a |
+ <item row="5" column="0">
|
|
|
74b83a |
+ <widget class="QLabel" name="remoteFXLabel">
|
|
|
74b83a |
+ <property name="text">
|
|
|
74b83a |
+ <string>RemoteFX:</string>
|
|
|
74b83a |
+ </property>
|
|
|
74b83a |
+ <property name="buddy">
|
|
|
74b83a |
+ <cstring>kcfg_RemoteFX</cstring>
|
|
|
74b83a |
+ </property>
|
|
|
74b83a |
+ </widget>
|
|
|
74b83a |
+ </item>
|
|
|
74b83a |
+ <item row="5" column="1">
|
|
|
74b83a |
+ <widget class="QCheckBox" name="kcfg_RemoteFX">
|
|
|
74b83a |
+ <property name="text">
|
|
|
74b83a |
+ <string>Enable RemoteFX</string>
|
|
|
74b83a |
+ </property>
|
|
|
74b83a |
+ <property name="whatsThis">
|
|
|
74b83a |
+ <string>RemoteFX covers a set of technologies that enhance visual experience of the Remote Desktop Protocol.</string>
|
|
|
74b83a |
+ </property>
|
|
|
74b83a |
+ </widget>
|
|
|
74b83a |
+ </item>
|
|
|
74b83a |
+ <item row="6" column="0">
|
|
|
74b83a |
+ <widget class="QLabel" name="shareMediaLabel">
|
|
|
74b83a |
+ <property name="text">
|
|
|
74b83a |
+ <string>Share Media:</string>
|
|
|
74b83a |
+ </property>
|
|
|
74b83a |
+ <property name="buddy">
|
|
|
74b83a |
+ <cstring>kcfg_ShareMedia</cstring>
|
|
|
74b83a |
+ </property>
|
|
|
74b83a |
+ </widget>
|
|
|
74b83a |
+ </item>
|
|
|
74b83a |
+ <item row="6" column="1">
|
|
|
74b83a |
+ <widget class="KLineEdit" name="kcfg_ShareMedia">
|
|
|
74b83a |
+ <property name="minimumSize">
|
|
|
74b83a |
+ <size>
|
|
|
74b83a |
+ <width>280</width>
|
|
|
74b83a |
+ <height>0</height>
|
|
|
74b83a |
+ </size>
|
|
|
74b83a |
+ </property>
|
|
|
74b83a |
+ <property name="whatsThis">
|
|
|
74b83a |
+ <string>Share a local media directory with the remote host.</string>
|
|
|
74b83a |
+ </property>
|
|
|
74b83a |
+ <property name="showClearButton" stdset="0">
|
|
|
74b83a |
+ <bool>true</bool>
|
|
|
74b83a |
+ </property>
|
|
|
74b83a |
+ </widget>
|
|
|
74b83a |
+ </item>
|
|
|
74b83a |
</layout>
|
|
|
74b83a |
</widget>
|
|
|
74b83a |
</item>
|
|
|
74b83a |
@@ -541,15 +628,15 @@
|
|
|
74b83a |
</widget>
|
|
|
74b83a |
<customwidgets>
|
|
|
74b83a |
<customwidget>
|
|
|
74b83a |
- <class>KLineEdit</class>
|
|
|
74b83a |
- <extends>QLineEdit</extends>
|
|
|
74b83a |
- <header>klineedit.h</header>
|
|
|
74b83a |
- </customwidget>
|
|
|
74b83a |
- <customwidget>
|
|
|
74b83a |
<class>KComboBox</class>
|
|
|
74b83a |
<extends>QComboBox</extends>
|
|
|
74b83a |
<header>kcombobox.h</header>
|
|
|
74b83a |
</customwidget>
|
|
|
74b83a |
+ <customwidget>
|
|
|
74b83a |
+ <class>KLineEdit</class>
|
|
|
74b83a |
+ <extends>QLineEdit</extends>
|
|
|
74b83a |
+ <header>klineedit.h</header>
|
|
|
74b83a |
+ </customwidget>
|
|
|
74b83a |
</customwidgets>
|
|
|
74b83a |
<tabstops>
|
|
|
74b83a |
<tabstop>resolutionComboBox</tabstop>
|
|
|
74b83a |
@@ -558,6 +645,9 @@
|
|
|
74b83a |
<tabstop>kcfg_ColorDepth</tabstop>
|
|
|
74b83a |
<tabstop>kcfg_KeyboardLayout</tabstop>
|
|
|
74b83a |
<tabstop>kcfg_Sound</tabstop>
|
|
|
74b83a |
+ <tabstop>kcfg_Performance</tabstop>
|
|
|
74b83a |
+ <tabstop>kcfg_RemoteFX</tabstop>
|
|
|
74b83a |
+ <tabstop>kcfg_ShareMedia</tabstop>
|
|
|
74b83a |
<tabstop>kcfg_Console</tabstop>
|
|
|
74b83a |
<tabstop>kcfg_ExtraOptions</tabstop>
|
|
|
74b83a |
<tabstop>kcfg_DefaultRdpUserName</tabstop>
|
|
|
74b83a |
diff -up kdenetwork-4.10.5/krdc/rdp/rdpview.cpp.freerdp kdenetwork-4.10.5/krdc/rdp/rdpview.cpp
|
|
|
74b83a |
--- kdenetwork-4.10.5/krdc/rdp/rdpview.cpp.freerdp 2013-06-28 20:08:57.392483928 +0200
|
|
|
74b83a |
+++ kdenetwork-4.10.5/krdc/rdp/rdpview.cpp 2013-07-04 21:52:45.866029567 +0200
|
|
|
74b83a |
@@ -1,7 +1,8 @@
|
|
|
74b83a |
/****************************************************************************
|
|
|
74b83a |
**
|
|
|
74b83a |
** Copyright (C) 2002 Arend van Beelen jr. <arend@auton.nl>
|
|
|
74b83a |
-** Copyright (C) 2007 Urs Wolfer <uwolfer @ kde.org>
|
|
|
74b83a |
+** Copyright (C) 2007 - 2012 Urs Wolfer <uwolfer @ kde.org>
|
|
|
74b83a |
+** Copyright (C) 2012 AceLan Kao <acelan @ acelan.idv.tw>
|
|
|
74b83a |
**
|
|
|
74b83a |
** This file is part of KDE.
|
|
|
74b83a |
**
|
|
|
74b83a |
@@ -167,39 +168,72 @@ bool RdpView::start()
|
|
|
74b83a |
arguments << "-X" << QString::number(m_container->winId());
|
|
|
74b83a |
arguments << "-a" << QString::number((m_hostPreferences->colorDepth() + 1) * 8);
|
|
|
74b83a |
|
|
|
74b83a |
- QString sound;
|
|
|
74b83a |
switch (m_hostPreferences->sound()) {
|
|
|
74b83a |
+ case 1:
|
|
|
74b83a |
+ arguments << "-o";
|
|
|
74b83a |
+ break;
|
|
|
74b83a |
+ case 0:
|
|
|
74b83a |
+ arguments << "--plugin" << "rdpsnd";
|
|
|
74b83a |
+ break;
|
|
|
74b83a |
+ case 2:
|
|
|
74b83a |
+ default:
|
|
|
74b83a |
+ break;
|
|
|
74b83a |
+ }
|
|
|
74b83a |
+
|
|
|
74b83a |
+ if (!m_hostPreferences->shareMedia().isEmpty()) {
|
|
|
74b83a |
+ QStringList shareMedia;
|
|
|
74b83a |
+ shareMedia << "--plugin" << "rdpdr" << "--data" << "disk:media:" + m_hostPreferences->shareMedia() << "--";
|
|
|
74b83a |
+ arguments += shareMedia;
|
|
|
74b83a |
+ }
|
|
|
74b83a |
+
|
|
|
74b83a |
+ QString performance;
|
|
|
74b83a |
+ switch (m_hostPreferences->performance()) {
|
|
|
74b83a |
case 0:
|
|
|
74b83a |
- sound = "local";
|
|
|
74b83a |
+ performance = "m";
|
|
|
74b83a |
break;
|
|
|
74b83a |
case 1:
|
|
|
74b83a |
- sound = "remote";
|
|
|
74b83a |
+ performance = "b";
|
|
|
74b83a |
break;
|
|
|
74b83a |
case 2:
|
|
|
74b83a |
+ performance = "l";
|
|
|
74b83a |
+ break;
|
|
|
74b83a |
default:
|
|
|
74b83a |
- sound = "off";
|
|
|
74b83a |
+ break;
|
|
|
74b83a |
}
|
|
|
74b83a |
- arguments << "-r" << "sound:" + sound;
|
|
|
74b83a |
+
|
|
|
74b83a |
+ arguments << "-x" << performance;
|
|
|
74b83a |
|
|
|
74b83a |
if (m_hostPreferences->console()) {
|
|
|
74b83a |
arguments << "-0";
|
|
|
74b83a |
}
|
|
|
74b83a |
|
|
|
74b83a |
+ if (m_hostPreferences->remoteFX()) {
|
|
|
74b83a |
+ arguments << "--rfx";
|
|
|
74b83a |
+ }
|
|
|
74b83a |
+
|
|
|
74b83a |
if (!m_hostPreferences->extraOptions().isEmpty()) {
|
|
|
74b83a |
const QStringList additionalArguments = KShell::splitArgs(m_hostPreferences->extraOptions());
|
|
|
74b83a |
arguments += additionalArguments;
|
|
|
74b83a |
}
|
|
|
74b83a |
|
|
|
74b83a |
+ // krdc has no support for certificate management yet; it would not be possbile to connect to any host:
|
|
|
74b83a |
+ // "The host key for example.com has changed" ...
|
|
|
74b83a |
+ // "Add correct host key in ~/.freerdp/known_hosts to get rid of this message."
|
|
|
74b83a |
+ arguments << "--ignore-certificate";
|
|
|
74b83a |
+
|
|
|
74b83a |
arguments << (m_host + ':' + QString::number(m_port));
|
|
|
74b83a |
|
|
|
74b83a |
+ kDebug(5012) << "Starting xfreerdp with arguments:" << arguments;
|
|
|
74b83a |
+
|
|
|
74b83a |
setStatus(Connecting);
|
|
|
74b83a |
|
|
|
74b83a |
connect(m_process, SIGNAL(error(QProcess::ProcessError)), SLOT(processError(QProcess::ProcessError)));
|
|
|
74b83a |
connect(m_process, SIGNAL(readyReadStandardError()), SLOT(receivedStandardError()));
|
|
|
74b83a |
+ connect(m_process, SIGNAL(readyReadStandardOutput()), SLOT(receivedStandardOutput()));
|
|
|
74b83a |
connect(m_container, SIGNAL(clientClosed()), SLOT(connectionClosed()));
|
|
|
74b83a |
connect(m_container, SIGNAL(clientIsEmbedded()), SLOT(connectionOpened()));
|
|
|
74b83a |
|
|
|
74b83a |
- m_process->start("rdesktop", arguments);
|
|
|
74b83a |
+ m_process->start("xfreerdp", arguments);
|
|
|
74b83a |
|
|
|
74b83a |
return true;
|
|
|
74b83a |
}
|
|
|
74b83a |
@@ -242,45 +276,85 @@ void RdpView::connectionClosed()
|
|
|
74b83a |
m_quitFlag = true;
|
|
|
74b83a |
}
|
|
|
74b83a |
|
|
|
74b83a |
+void RdpView::connectionError()
|
|
|
74b83a |
+{
|
|
|
74b83a |
+ emit disconnectedError();
|
|
|
74b83a |
+ connectionClosed();
|
|
|
74b83a |
+}
|
|
|
74b83a |
+
|
|
|
74b83a |
void RdpView::processError(QProcess::ProcessError error)
|
|
|
74b83a |
{
|
|
|
74b83a |
+ kDebug(5012) << "processError:" << error;
|
|
|
74b83a |
if (m_quitFlag) // do not try to show error messages while quitting (prevent crashes)
|
|
|
74b83a |
return;
|
|
|
74b83a |
|
|
|
74b83a |
if (m_status == Connecting) {
|
|
|
74b83a |
- setStatus(Disconnected);
|
|
|
74b83a |
-
|
|
|
74b83a |
if (error == QProcess::FailedToStart) {
|
|
|
74b83a |
- KMessageBox::error(0, i18n("Could not start \"rdesktop\"; make sure rdesktop is properly installed."),
|
|
|
74b83a |
+ KMessageBox::error(0, i18n("Could not start \"xfreerdp\"; make sure xfreerdp is properly installed."),
|
|
|
74b83a |
i18n("RDP Failure"));
|
|
|
74b83a |
+ connectionError();
|
|
|
74b83a |
return;
|
|
|
74b83a |
}
|
|
|
74b83a |
+ }
|
|
|
74b83a |
+}
|
|
|
74b83a |
|
|
|
74b83a |
- if (m_clientVersion.isEmpty()) {
|
|
|
74b83a |
- KMessageBox::error(0, i18n("Connection attempt to host failed."),
|
|
|
74b83a |
- i18n("Connection Failure"));
|
|
|
74b83a |
- } else {
|
|
|
74b83a |
- KMessageBox::error(0, i18n("The version of \"rdesktop\" you are using (%1) is too old:\n"
|
|
|
74b83a |
- "rdesktop 1.3.2 or greater is required.", m_clientVersion),
|
|
|
74b83a |
+void RdpView::receivedStandardError()
|
|
|
74b83a |
+{
|
|
|
74b83a |
+ const QString output(m_process->readAllStandardError());
|
|
|
74b83a |
+ kDebug(5012) << "receivedStandardError:" << output;
|
|
|
74b83a |
+ QString line;
|
|
|
74b83a |
+ int i = 0;
|
|
|
74b83a |
+ while (!(line = output.section('\n', i, i)).isEmpty()) {
|
|
|
74b83a |
+
|
|
|
74b83a |
+ // the following error is issued by freerdp because of a bug in freerdp 1.0.1 and below;
|
|
|
74b83a |
+ // see: https://github.com/FreeRDP/FreeRDP/pull/576
|
|
|
74b83a |
+ //"X Error of failed request: BadWindow (invalid Window parameter)
|
|
|
74b83a |
+ // Major opcode of failed request: 7 (X_ReparentWindow)
|
|
|
74b83a |
+ // Resource id in failed request: 0x71303348
|
|
|
74b83a |
+ // Serial number of failed request: 36
|
|
|
74b83a |
+ // Current serial number in output stream: 36"
|
|
|
74b83a |
+ if (line.contains(QLatin1String("X_ReparentWindow"))) {
|
|
|
74b83a |
+ KMessageBox::error(0, i18n("The version of \"xfreerdp\" you are using is too old.\n"
|
|
|
74b83a |
+ "xfreerdp 1.0.2 or greater is required."),
|
|
|
74b83a |
i18n("RDP Failure"));
|
|
|
74b83a |
+ connectionError();
|
|
|
74b83a |
+ return;
|
|
|
74b83a |
}
|
|
|
74b83a |
- emit disconnectedError();
|
|
|
74b83a |
+ i++;
|
|
|
74b83a |
}
|
|
|
74b83a |
}
|
|
|
74b83a |
|
|
|
74b83a |
-void RdpView::receivedStandardError()
|
|
|
74b83a |
+void RdpView::receivedStandardOutput()
|
|
|
74b83a |
{
|
|
|
74b83a |
- const QString output(m_process->readAllStandardError());
|
|
|
74b83a |
+ const QString output(m_process->readAllStandardOutput());
|
|
|
74b83a |
+ kDebug(5012) << "receivedStandardOutput:" << output;
|
|
|
74b83a |
QString line;
|
|
|
74b83a |
int i = 0;
|
|
|
74b83a |
while (!(line = output.section('\n', i, i)).isEmpty()) {
|
|
|
74b83a |
- if (line.startsWith(QLatin1String("Version "))) {
|
|
|
74b83a |
- m_clientVersion = line.section(' ', 1, 1);
|
|
|
74b83a |
- m_clientVersion = m_clientVersion.left(m_clientVersion.length() - 1);
|
|
|
74b83a |
+
|
|
|
74b83a |
+ // full xfreerdp message: "transport_connect: getaddrinfo (Name or service not known)"
|
|
|
74b83a |
+ if (line.contains(QLatin1String("Name or service not known"))) {
|
|
|
74b83a |
+ KMessageBox::error(0, i18n("Name or service not known."),
|
|
|
74b83a |
+ i18n("Connection Failure"));
|
|
|
74b83a |
+ connectionError();
|
|
|
74b83a |
+ return;
|
|
|
74b83a |
+
|
|
|
74b83a |
+ // full xfreerdp message: "unable to connect to example.com:3389"
|
|
|
74b83a |
+ } else if (line.contains(QLatin1String("unable to connect to"))) {
|
|
|
74b83a |
+ KMessageBox::error(0, i18n("Connection attempt to host failed."),
|
|
|
74b83a |
+ i18n("Connection Failure"));
|
|
|
74b83a |
+ connectionError();
|
|
|
74b83a |
+ return;
|
|
|
74b83a |
+
|
|
|
74b83a |
+ // looks like some generic xfreerdp error message, handle it if nothing was handled:
|
|
|
74b83a |
+ // "Error: protocol security negotiation failure"
|
|
|
74b83a |
+ } else if (line.contains(QLatin1String("Error: protocol security negotiation failure"))) {
|
|
|
74b83a |
+ KMessageBox::error(0, i18n("Connection attempt to host failed."),
|
|
|
74b83a |
+ i18n("Connection Failure"));
|
|
|
74b83a |
+ connectionError();
|
|
|
74b83a |
return;
|
|
|
74b83a |
- } else {
|
|
|
74b83a |
- kDebug(5012) << "Process error output: " << line;
|
|
|
74b83a |
}
|
|
|
74b83a |
+
|
|
|
74b83a |
i++;
|
|
|
74b83a |
}
|
|
|
74b83a |
}
|
|
|
74b83a |
diff -up kdenetwork-4.10.5/krdc/rdp/rdpviewfactory.cpp.freerdp kdenetwork-4.10.5/krdc/rdp/rdpviewfactory.cpp
|
|
|
74b83a |
--- kdenetwork-4.10.5/krdc/rdp/rdpviewfactory.cpp.freerdp 2013-06-28 20:08:57.393483968 +0200
|
|
|
74b83a |
+++ kdenetwork-4.10.5/krdc/rdp/rdpviewfactory.cpp 2013-07-04 21:52:45.867029564 +0200
|
|
|
74b83a |
@@ -37,7 +37,7 @@ RdpViewFactory::RdpViewFactory(QObject *
|
|
|
74b83a |
|
|
|
74b83a |
m_connectToolTipString = i18n("Connect to a Windows Remote Desktop (RDP)");
|
|
|
74b83a |
|
|
|
74b83a |
- QMetaObject::invokeMethod(this, "checkRdektopAvailability", Qt::DirectConnection);
|
|
|
74b83a |
+ QMetaObject::invokeMethod(this, "checkFreerdpAvailability", Qt::DirectConnection);
|
|
|
74b83a |
}
|
|
|
74b83a |
|
|
|
74b83a |
RdpViewFactory::~RdpViewFactory()
|
|
|
74b83a |
@@ -80,10 +80,10 @@ QString RdpViewFactory::connectToolTipTe
|
|
|
74b83a |
"Example: rdpserver:3389 (host:port)</html>");
|
|
|
74b83a |
}
|
|
|
74b83a |
|
|
|
74b83a |
-void RdpViewFactory::checkRdektopAvailability()
|
|
|
74b83a |
+void RdpViewFactory::checkFreerdpAvailability()
|
|
|
74b83a |
{
|
|
|
74b83a |
- if (KStandardDirs::findExe("rdesktop").isEmpty()) {
|
|
|
74b83a |
- m_connectToolTipString += '\n' + i18n("The application \"rdesktop\" cannot be found on your system; make sure it is properly installed "
|
|
|
74b83a |
+ if (KStandardDirs::findExe("xfreerdp").isEmpty()) {
|
|
|
74b83a |
+ m_connectToolTipString += '\n' + i18n("The application \"xfreerdp\" cannot be found on your system; make sure it is properly installed "
|
|
|
74b83a |
"if you need RDP support.");
|
|
|
74b83a |
}
|
|
|
74b83a |
}
|
|
|
74b83a |
diff -up kdenetwork-4.10.5/krdc/rdp/rdpviewfactory.h.freerdp kdenetwork-4.10.5/krdc/rdp/rdpviewfactory.h
|
|
|
74b83a |
--- kdenetwork-4.10.5/krdc/rdp/rdpviewfactory.h.freerdp 2013-06-28 20:08:57.393483968 +0200
|
|
|
74b83a |
+++ kdenetwork-4.10.5/krdc/rdp/rdpviewfactory.h 2013-07-04 21:52:45.867029564 +0200
|
|
|
74b83a |
@@ -53,7 +53,7 @@ public:
|
|
|
74b83a |
virtual QString connectToolTipText() const;
|
|
|
74b83a |
|
|
|
74b83a |
private Q_SLOTS:
|
|
|
74b83a |
- void checkRdektopAvailability();
|
|
|
74b83a |
+ void checkFreerdpAvailability();
|
|
|
74b83a |
|
|
|
74b83a |
private:
|
|
|
74b83a |
QString m_connectToolTipString;
|
|
|
74b83a |
diff -up kdenetwork-4.10.5/krdc/rdp/rdpview.h.freerdp kdenetwork-4.10.5/krdc/rdp/rdpview.h
|
|
|
74b83a |
--- kdenetwork-4.10.5/krdc/rdp/rdpview.h.freerdp 2013-06-28 20:08:57.392483928 +0200
|
|
|
74b83a |
+++ kdenetwork-4.10.5/krdc/rdp/rdpview.h 2013-07-04 21:52:45.867029564 +0200
|
|
|
74b83a |
@@ -84,17 +84,18 @@ private:
|
|
|
74b83a |
|
|
|
74b83a |
// other properties
|
|
|
74b83a |
bool m_quitFlag; // if set: die
|
|
|
74b83a |
- QString m_clientVersion; // version number returned by rdesktop
|
|
|
74b83a |
- QX11EmbedContainer *m_container; // container for the rdesktop window
|
|
|
74b83a |
- QProcess *m_process; // rdesktop process
|
|
|
74b83a |
+ QX11EmbedContainer *m_container; // container for the xfreerdp window
|
|
|
74b83a |
+ QProcess *m_process; // xfreerdp process
|
|
|
74b83a |
|
|
|
74b83a |
RdpHostPreferences *m_hostPreferences;
|
|
|
74b83a |
|
|
|
74b83a |
private slots:
|
|
|
74b83a |
- void connectionOpened(); // called if rdesktop started
|
|
|
74b83a |
- void connectionClosed(); // called if rdesktop quits
|
|
|
74b83a |
- void processError(QProcess::ProcessError error); // called if rdesktop dies
|
|
|
74b83a |
- void receivedStandardError(); // catches rdesktop debug output
|
|
|
74b83a |
+ void connectionOpened(); // called if xfreerdp started
|
|
|
74b83a |
+ void connectionClosed(); // called if xfreerdp quits
|
|
|
74b83a |
+ void connectionError(); // called if xfreerdp quits with error
|
|
|
74b83a |
+ void processError(QProcess::ProcessError error); // called if xfreerdp dies
|
|
|
74b83a |
+ void receivedStandardError(); // catches xfreerdp debug output
|
|
|
74b83a |
+ void receivedStandardOutput(); // catches xfreerdp output
|
|
|
74b83a |
};
|
|
|
74b83a |
|
|
|
74b83a |
#endif
|