Control: tags -1 patchI have done more tests with vinagre. I have attached a .debdiff that fixes Vinagre's connection initialization and gives me a working RDP session.
Upstream authors of FreeRDP mentioned that Vinagre's way of using the FreeRDP API is rather old and it should be reworked by Vinagre upstream maintainers.
However, session startup now works, but maybe more flaws are ahead.See attached .debdiff for the proposed fix (and ignore the patch that was attached to my earlier post).
Mike -- DAS-NETZWERKTEAM c\o Technik- und Ökologiezentrum Eckernförde Mike Gabriel, Marienthaler Str. 17, 24340 Eckernförde mobile: +49 (1520) 1976 148 landline: +49 (4351) 850 8940 GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22 0782 9AF4 6B30 2577 1B31 mail: mike.gabr...@das-netzwerkteam.de, http://das-netzwerkteam.de
diff -Nru vinagre-3.22.0/debian/changelog vinagre-3.22.0/debian/changelog --- vinagre-3.22.0/debian/changelog 2021-01-01 01:09:52.000000000 +0100 +++ vinagre-3.22.0/debian/changelog 2021-02-25 19:48:08.000000000 +0100 @@ -1,3 +1,11 @@ +vinagre (3.22.0-8.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * debian/patches: + + Add 0003-fix-hangs-with-recent-FreeRDP-version.patch. (Closes: -1). + + -- Mike Gabriel <sunwea...@debian.org> Thu, 25 Feb 2021 19:48:08 +0100 + vinagre (3.22.0-8) unstable; urgency=medium * Team upload. diff -Nru vinagre-3.22.0/debian/patches/0003-fix-hangs-with-recent-FreeRDP-version.patch vinagre-3.22.0/debian/patches/0003-fix-hangs-with-recent-FreeRDP-version.patch --- vinagre-3.22.0/debian/patches/0003-fix-hangs-with-recent-FreeRDP-version.patch 1970-01-01 01:00:00.000000000 +0100 +++ vinagre-3.22.0/debian/patches/0003-fix-hangs-with-recent-FreeRDP-version.patch 2021-02-25 19:48:08.000000000 +0100 @@ -0,0 +1,78 @@ +From 404a56a11469ef24a1df632847465030d81db091 Mon Sep 17 00:00:00 2001 +From: Ondrej Holy <oh...@redhat.com> +Date: Fri, 15 May 2020 15:43:37 +0200 +Subject: [PATCH] plugins/rdp: Fix hangs with recent FreeRDP versions + +Connection to all my testing servers fails with "SERVER BUG: The support +for this feature was not announced! Use /relax-order-checks to ignore" +currently. This happens always with current FreeRDP versions after +https://github.com/FreeRDP/FreeRDP/pull/4926 has been merged. This can be +fixed by the usage of /relax-order-checks option, however, this option +should be used only if necessary needed and it should not be needed in +most of the cases. This currenlty happens always as it interfere with our +custom OrderSupports settings. Let's use the default OrderSupports +settings to fix this issue, which is possible thanks to +https://github.com/FreeRDP/FreeRDP/pull/5057. + +See: https://gitlab.gnome.org/GNOME/gtk-frdp/-/issues/27 +--- + configure.ac | 2 +- + plugins/rdp/vinagre-rdp-tab.c | 27 --------------------------- + 2 files changed, 1 insertion(+), 28 deletions(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -58,7 +58,7 @@ + AM_CONDITIONAL([VINAGRE_ENABLE_SSH], [test "x$have_ssh" = "xyes"]) + + # Whether to enable support for RDP. +-RDP_DEPS="freerdp2 x11" ++RDP_DEPS="freerdp2 >= 2.0.0 x11" + AC_ARG_ENABLE([rdp], + [AS_HELP_STRING([--disable-rdp], + [Disable Remote Desktop Protocol (RDP) support])]) +--- a/plugins/rdp/vinagre-rdp-tab.c ++++ b/plugins/rdp/vinagre-rdp-tab.c +@@ -524,32 +524,7 @@ frdp_pre_connect (freerdp *instance) + { + rdpSettings *settings = instance->settings; + +-#if HAVE_FREERDP_1_1 +- settings->OrderSupport[NEG_DSTBLT_INDEX] = TRUE; +- settings->OrderSupport[NEG_PATBLT_INDEX] = TRUE; +- settings->OrderSupport[NEG_SCRBLT_INDEX] = TRUE; +- settings->OrderSupport[NEG_OPAQUE_RECT_INDEX] = TRUE; +- settings->OrderSupport[NEG_DRAWNINEGRID_INDEX] = FALSE; +- settings->OrderSupport[NEG_MULTIDSTBLT_INDEX] = FALSE; +- settings->OrderSupport[NEG_MULTIPATBLT_INDEX] = FALSE; +- settings->OrderSupport[NEG_MULTISCRBLT_INDEX] = FALSE; +- settings->OrderSupport[NEG_MULTIOPAQUERECT_INDEX] = TRUE; +- settings->OrderSupport[NEG_MULTI_DRAWNINEGRID_INDEX] = FALSE; +- settings->OrderSupport[NEG_LINETO_INDEX] = TRUE; +- settings->OrderSupport[NEG_POLYLINE_INDEX] = TRUE; +- settings->OrderSupport[NEG_MEMBLT_INDEX] = TRUE; +- settings->OrderSupport[NEG_MEM3BLT_INDEX] = FALSE; +- settings->OrderSupport[NEG_MEMBLT_V2_INDEX] = TRUE; +- settings->OrderSupport[NEG_MEM3BLT_V2_INDEX] = FALSE; +- settings->OrderSupport[NEG_SAVEBITMAP_INDEX] = FALSE; +- settings->OrderSupport[NEG_GLYPH_INDEX_INDEX] = TRUE; +- settings->OrderSupport[NEG_FAST_INDEX_INDEX] = TRUE; +- settings->OrderSupport[NEG_FAST_GLYPH_INDEX] = FALSE; +- settings->OrderSupport[NEG_POLYGON_SC_INDEX] = FALSE; +- settings->OrderSupport[NEG_POLYGON_CB_INDEX] = FALSE; +- settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE; +- settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE; +-#else ++#if !HAVE_FREERDP_1_1 + settings->order_support[NEG_DSTBLT_INDEX] = true; + settings->order_support[NEG_PATBLT_INDEX] = true; + settings->order_support[NEG_SCRBLT_INDEX] = true; +@@ -1122,6 +1097,8 @@ open_freerdp (VinagreRdpTab *rdp_tab) + settings->encryption = true; + settings->encryption_method = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS; + settings->encryption_level = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE; ++ settings->AllowUnanouncedOrdersFromServer = true; ++ settings->BitmapCacheEnabled = true; + #endif + #include <freerdp/version.h> + #if (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 2 && FREERDP_VERSION_REVISION >= 1) || (FREERDP_VERSION_MAJOR == 2) diff -Nru vinagre-3.22.0/debian/patches/0004-fix-FreeRDP-API-usage.patch vinagre-3.22.0/debian/patches/0004-fix-FreeRDP-API-usage.patch --- vinagre-3.22.0/debian/patches/0004-fix-FreeRDP-API-usage.patch 1970-01-01 01:00:00.000000000 +0100 +++ vinagre-3.22.0/debian/patches/0004-fix-FreeRDP-API-usage.patch 2021-02-25 19:48:08.000000000 +0100 @@ -0,0 +1,64 @@ +From 18150f00a889e7f02d15f04e868e7b019ccdf0f2 Mon Sep 17 00:00:00 2001 +From: akallabeth <akallab...@posteo.net> +Date: Fri, 26 Feb 2021 08:11:35 +0100 +Subject: [PATCH] Fixed freerdp API use + +* Use PostDisconnect callback to free up resources allocated + during Pre/PostConnect phase +* Only call freerdp_disconnect if there was an actual connection +--- + plugins/rdp/vinagre-rdp-tab.c | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +--- a/plugins/rdp/vinagre-rdp-tab.c ++++ b/plugins/rdp/vinagre-rdp-tab.c +@@ -70,6 +70,8 @@ + gboolean scaling; + double scale; + double offset_x, offset_y; ++ ++ gboolean is_connected; + }; + + G_DEFINE_TYPE (VinagreRdpTab, vinagre_rdp_tab, VINAGRE_TYPE_TAB) +@@ -178,8 +180,9 @@ + + if (priv->freerdp_session) + { +- gdi_free (priv->freerdp_session); +- freerdp_disconnect (priv->freerdp_session); ++ if (priv->is_connected) ++ freerdp_disconnect (priv->freerdp_session); ++ + freerdp_context_free (priv->freerdp_session); + g_clear_pointer (&priv->freerdp_session, freerdp_free); + } +@@ -584,6 +587,12 @@ + return TRUE; + } + ++static void ++frdp_post_disconnect (freerdp *instance) ++{ ++ gdi_free(instance); ++} ++ + static gboolean + update (gpointer user_data) + { +@@ -1065,6 +1074,7 @@ + priv->freerdp_session = freerdp_new (); + priv->freerdp_session->PreConnect = frdp_pre_connect; + priv->freerdp_session->PostConnect = frdp_post_connect; ++ priv->freerdp_session->PostDisconnect = frdp_post_disconnect; + priv->freerdp_session->Authenticate = frdp_authenticate; + priv->freerdp_session->VerifyCertificate = frdp_certificate_verify; + #if HAVE_FREERDP_1_1 +@@ -1199,6 +1209,7 @@ + /* Run FreeRDP session */ + success = freerdp_connect (priv->freerdp_session); + ++ priv->is_connected = success; + if (!success) + { + gtk_window_unfullscreen (window); diff -Nru vinagre-3.22.0/debian/patches/series vinagre-3.22.0/debian/patches/series --- vinagre-3.22.0/debian/patches/series 2021-01-01 01:06:19.000000000 +0100 +++ vinagre-3.22.0/debian/patches/series 2021-02-25 19:48:08.000000000 +0100 @@ -3,3 +3,5 @@ freerdp2017.patch 131d151cb02245f84918f9ba5b3ef055758bcf61.patch gcc-10.patch +0003-fix-hangs-with-recent-FreeRDP-version.patch +0004-fix-FreeRDP-API-usage.patch
pgpqXFyjp0Nr2.pgp
Description: Digitale PGP-Signatur