X2Go Bug report logs - #1305
bad window title encoding for Unicode (Cyrillic) session names

version graph

Package: x2goclient; Maintainer for x2goclient is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goclient is src:x2goclient.

Reported by: Ivan Zakharyaschev <imz@altlinux.org>

Date: Fri, 15 Jun 2018 19:30:02 UTC

Severity: normal

Found in version 4.1.1.1

Full log


Message #5 received at submit@bugs.x2go.org (full text, mbox, reply):

Received: (at submit) by bugs.x2go.org; 15 Jun 2018 19:28:44 +0000
From imz@altlinux.org  Fri Jun 15 21:28:41 2018
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50,URIBL_BLOCKED
	autolearn=ham autolearn_force=no version=3.4.1
Received: from localhost (localhost [127.0.0.1])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 5BDAC5DAE7
	for <submit@bugs.x2go.org>; Fri, 15 Jun 2018 21:28:41 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at ymir.das-netzwerkteam.de
Received: from ymir.das-netzwerkteam.de ([127.0.0.1])
	by localhost (ymir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id WjCN_OE1Fani for <submit@bugs.x2go.org>;
	Fri, 15 Jun 2018 21:28:30 +0200 (CEST)
X-Greylist: delayed 413 seconds by postgrey-1.35 at ymir.das-netzwerkteam.de; Fri, 15 Jun 2018 21:28:29 CEST
Received: from vmicros1.altlinux.org (vmicros1.altlinux.org [194.107.17.57])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id F19A25DACE
	for <submit@bugs.x2go.org>; Fri, 15 Jun 2018 21:28:29 +0200 (CEST)
Received: from imap.altlinux.org (imap.altlinux.org [194.107.17.38])
	by vmicros1.altlinux.org (Postfix) with ESMTP id 8596772D1A7
	for <submit@bugs.x2go.org>; Fri, 15 Jun 2018 22:21:35 +0300 (MSK)
Received: by imap.altlinux.org (Postfix, from userid 620)
	id 54AE04A501E; Fri, 15 Jun 2018 22:21:35 +0300 (MSK)
Received: from localhost (localhost [127.0.0.1])
	by imap.altlinux.org (Postfix) with ESMTP id 3D2C54A4AFE
	for <submit@bugs.x2go.org>; Fri, 15 Jun 2018 22:21:35 +0300 (MSK)
Date: Fri, 15 Jun 2018 22:21:35 +0300 (MSK)
From: Ivan Zakharyaschev <imz@altlinux.org>
To: submit@bugs.x2go.org
Subject: bad window title encoding for Unicode (Cyrillic) session names
Message-ID: <alpine.LFD.2.20.1806152201380.3504@imap.altlinux.org>
User-Agent: Alpine 2.20 (LFD 67 2015-01-07)
X-Debbugs-CC: cas@altlinux.org, mcpain@altlinux.org, zerg@altlinux.org
MIME-Version: 1.0
Content-Type: multipart/mixed; BOUNDARY="1807885841-635674135-1529089935=:3504"
Content-ID: <alpine.LFD.2.20.1806152217320.3504@imap.altlinux.org>
[Message part 1 (text/plain, inline)]
Package: x2goclient
Version: 4.1.1.1
Tag: patch

If the session name is written in Cyrillic (I guess, any Unicode), the 
window title is displayed incorrectly (as if Unicode was not understood, 
with strange symbols) in the task bar in the KDE panel.

See the attached screenshot (made by mcpain@).

Patch (by mcpain@ and zerg@) is attached, too: 
x2goclient-4.1.1.1-window-title-encoding.patch

The client and server OS are: ALT Linux (Sisyphus or p8).
The window manager is KDE.
[x2goclient-4.1.1.1-window-title-encoding.patch (text/x-patch, ATTACHMENT)]
From 877cc06728efac1ccd7c01d47c25df0166de42e8 Mon Sep 17 00:00:00 2001
From: Oleg Solovyov <mcpain@altlinux.org>
Date: Fri, 15 Jun 2018 20:55:26 +0300
Subject: [PATCH] fix window title encoding for Unicode (Cyrillic) session
 names

If the session name was written in Cyrillic, the window title would be
displayed incorrectly (as if Unicode was not understood, with strange
symbols) in the task bar in the KDE panel.

Co-authored-by: Sergey V Turchin <zerg@altlinux.org>
---
 src/onmainwindow.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index fdc043b..7b2c283 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -11233,6 +11233,12 @@ void ONMainWindow::setProxyWinTitle()
 #ifdef Q_OS_LINUX
 
     XStoreName(QX11Info::display(), proxyWinId, title.toLocal8Bit().data());
+    XChangeProperty(QX11Info::display(), proxyWinId,
+                    XInternAtom(QX11Info::display(), "_NET_WM_NAME", 0),
+                    XInternAtom(QX11Info::display(), "UTF8_STRING", 0), 8,
+                    PropModeReplace,
+                    (unsigned char*) title.toUtf8().data(),
+                    strlen(title.toUtf8().data()));
 
     XWMHints* win_hints;
 
-- 
2.10.4

[x2go-window-title-encoding-bug-drkonqi.png (image/png, ATTACHMENT)]

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Thu Nov 21 15:13:16 2024; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.