Subject: Bug#1469: X2Go Client connection issue (Socket error)

From: Melroy van den Berg <[email-masked]>
Date: Mon, 18 May 2020 18:54:06 +0000

Package: x2goclient
Version: 4.1.2.2

I often get an error message when I try to connect to my Debian buster docker image, running x2goserver and XFCE, via the X2Go Client on my host machine.
It will give the following error message (when using the --debug flag on the x2goclient):

x2go-DEBUG-../src/sshmasterconnection.cpp:2071> "ssh_channel_open_session failed": "Socket error: No such file or directory"
x2go-DEBUG-../src/sshprocess.cpp:478> I/O error: "ssh_channel_open_session failed."" - Socket error: No such file or directory" (0).

I created a detailed video, I posted it on YouTube, please take a look at the video:
https://youtu.be/LAlLtBNTIUo

Logging details, reproducibility and more is explained in the video itself. You'll notice that I can sometimes connect to the XFCE session and sometimes I can't. Although connecting via the ssh cli command is always working without any issues. Meaning there is really some kind of bug in the X2Go Client. I'm afraid.

Again, I really hope somebody could help me in finding the root-cause and fixing the issue.
Since I really love X2Go. And I would like to use this tool in production.
I'm also a software developer so maybe I can help debugging the problem.

Similar (same) bug is reported in the past (from 2019): https://lists.x2go.org/pipermail/x2go-user/2019-March/005512.html
All the details regarding this Docker image and setup can be found in this git repo: https://gitlab.melroy.org/melroy/xfcevdi

See attachments for additional debug logs of the client itself. One when successful and one during the error.

Thanks in advance!

Kind regards,
Melroy van den Berg

Ps. You can contact me by mail of course. But I can understand that debugging this issue would be preferable be done via VoIP for example.

---

From: Melroy van den Berg <[email-masked]>
Date: Mon, 18 May 2020 21:02:38 +0000

In this additional mail I would like to add two things:
1) Additional attachments for the logs (see the attachments in the mail)
2) Trying to reproduce the same issue in the other client (pyhoca),
I was NOT able to reproduce the issue in pyhoca. Everything worked as expected, meaning it's definitely an issue in the x2goclient v4.1.2.2.

Regarding the pyhoca test, I created a second follow-up video which shows that this works: https://www.youtube.com/watch?v=meOZ3YEfkyM

I can confirm even after stopping and starting pyhoca multiple times, it *always* works via pyhoca. Yet again not via x2goclient. That still gives often the error: Socket error: No such file or directory" (0). See my first mail.

Kind regards,
Melroy van den Berg

---

From: Melroy van den Berg <[email-masked]>
Date: Tue, 19 May 2020 01:59:16 +0000

Hi,

I did some refactoring in the sshmasterconnection.cpp file. I think it can definitely use some clean-up and further splitting functions and even into multiple files eventually.
I cloned the master branch of code.x2go.org/x2goclient repo.

The changes I applied are in the attachment of this mail (a git patch file). I think closing previous sessions and connection solved my strange SSH connection is resulting into Socket error: No such file or directory".
Although X2Go client is calling [libssh calls](https://api.libssh.org/master/index.html) (libssh version currently in use runtime on my host is: 0.7.0).
For some reason this vague error message popped-up by libssh, properly a result of previous session being created and not correctly closed. And/or not closed in the right order (/missing API calls), like a good example:

ssh_channel_send_eof(channel);
ssh_channel_close(channel);
ssh_channel_free(channel);

And I created yet again a new YT video showing my result:
https://youtu.be/vmASLJq0CKM
(including some brief explanation what I did so far, I also ran an formatted on the code, because it was very very hard to read with all the wrong indents)

I also made another video showing yet another bug I found regarding the SSH tunneling (during some heavy testing), the only solution was to restart the whole docker image:
https://youtu.be/xEpIyo84fWc (I think this issue is unrelated, but maybe wise to take serious as well)

Again see attachment for the patch (branched from master).

Regards,
Melroy van den Berg

diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
index 8b59fe7..2007df7 100644
--- a/src/sshmasterconnection.cpp
+++ b/src/sshmasterconnection.cpp
@@ -23,7 +23,6 @@
 #include <stddef.h>
 #include "sshprocess.h"
 
-
 #include <QStringList>
 #include <QFile>
 #include <QDir>
@@ -43,36 +42,33 @@
 #include <QtNetwork/qabstractsocket.h>
 #endif
 
-
 #include "onmainwindow.h"
 
-
 #define PROXYTUNNELPORT 44444
 
 const QString SshMasterConnection::challenge_auth_code_prompts_[] = {
-  "Verification code:",            // GA      (http://github.com/google/google-authenticator)
-  "One-time password (OATH) for",  // OATH    (http://www.nongnu.org/oath-toolkit/pam_oath.html)
-  "passcode:",                     // MOTP    (http://motp.sourceforge.net)
-  "Enter PASSCODE:",               // SecurID
-  "YubiKey for"                    // YubiKey (https://en.wikipedia.org/wiki/YubiKey)
+    "Verification code:",           // GA      (http://github.com/google/google-authenticator)
+    "One-time password (OATH) for", // OATH    (http://www.nongnu.org/oath-toolkit/pam_oath.html)
+    "passcode:",                    // MOTP    (http://motp.sourceforge.net)
+    "Enter PASSCODE:",              // SecurID
+    "YubiKey for"                   // YubiKey (https://en.wikipedia.org/wiki/YubiKey)
 };
 
-
 #ifdef Q_OS_WIN
 #include <QSettings>
 // parse known_hosts file from libssh and export keys in registry to use with plink.exe
 void SshMasterConnection::parseKnownHosts()
 {
-    QFile fl(mainWnd->getHomeDirectory()+"/ssh/known_hosts");
+    QFile fl(mainWnd->getHomeDirectory() + "/ssh/known_hosts");
     if (!fl.open(QFile::ReadOnly))
         return;
     QSettings settings("HKEY_CURRENT_USER\\Software\\SimonTatham\\PuTTY\\SshHostKeys",
                        QSettings::NativeFormat);
     while (!fl.atEnd())
     {
-        QString line=fl.readLine();
-        QStringList parts=line.split(' ',QString::SkipEmptyParts);
-        if (parts.count()!=3)
+        QString line = fl.readLine();
+        QStringList parts = line.split(' ', QString::SkipEmptyParts);
+        if (parts.count() != 3)
             continue;
 
         //lines in known_hosts have format:
@@ -80,257 +76,255 @@ void SshMasterConnection::parseKnownHosts()
         //we proceeding only lines from libssh - no hashed hostnames
         //or patterns are allowed
 
-        QString type="unknown";
-        QString port="22";
-        if (parts[1]=="ssh-dss")
-            type="dss";
-        if (parts[1]=="ssh-rsa")
-            type="rsa2";
+        QString type = "unknown";
+        QString port = "22";
+        if (parts[1] == "ssh-dss")
+            type = "dss";
+        if (parts[1] == "ssh-rsa")
+            type = "rsa2";
 
+        QStringList hostParts = parts[0].split(":", QString::SkipEmptyParts);
+        if (hostParts.count() > 1)
+            port = hostParts[1];
+        hostParts[0].replace("[", "");
+        hostParts[0].replace("]", "");
 
-        QStringList hostParts=parts[0].split(":",QString::SkipEmptyParts);
-        if (hostParts.count()>1)
-            port=hostParts[1];
-        hostParts[0].replace("[","");
-        hostParts[0].replace("]","");
+        QString keyName = type + "@" + port + ":" + hostParts[0];
 
-        QString keyName=type+"@"+port+":"+hostParts[0];
-
-        QByteArray bytes=QByteArray::fromBase64(parts[2].toLatin1());
+        QByteArray bytes = QByteArray::fromBase64(parts[2].toLatin1());
         QStringList fields;
 
         //key is a set of data fields:
         //[size][data][size][data].....[size][data]
 
-        for (int i=0; i<bytes.count();)
+        for (int i = 0; i < bytes.count();)
         {
-            int size=0;
+            int size = 0;
             //first 4 bytes are for size of data field (big-endian)
-            for (int j=0; j<4; ++j)
+            for (int j = 0; j < 4; ++j)
             {
-                size+=((uchar)(bytes[i])) * pow((float)256,3-j);
+                size += ((uchar)(bytes[i])) * pow((float)256, 3 - j);
                 i++;
             }
             QByteArray data;
-            data=bytes.mid(i,size);
+            data = bytes.mid(i, size);
             QString hex;
 
-            for (int j=0; j<data.count(); ++j)
+            for (int j = 0; j < data.count(); ++j)
             {
                 QString byte;
-                byte.sprintf("%02x",(uchar)(data[j]));
-                hex+=byte;
+                byte.sprintf("%02x", (uchar)(data[j]));
+                hex += byte;
             }
             //remove leading '0'
             for (;;)
             {
-                if (hex.length()==0)
+                if (hex.length() == 0)
                     break;
-                if (hex[0]=='0')
-                    hex.remove(0,1);
+                if (hex[0] == '0')
+                    hex.remove(0, 1);
                 else
                     break;
             }
-            hex="0x"+hex;
-            fields<<hex;
-            i+=size;
+            hex = "0x" + hex;
+            fields << hex;
+            i += size;
         }
         //first element is a type of key, we don't need it
         fields.removeFirst();
-        settings.setValue(keyName,fields.join(","));
-        x2goDebug<<"Writing key to registry: HKEY_CURRENT_USER\\Software\\SimonTatham\\PuTTY\\SshHostKeys"<<endl;
-        x2goDebug<<keyName<<"="<<fields.join(",")<<endl;
+        settings.setValue(keyName, fields.join(","));
+        x2goDebug << "Writing key to registry: HKEY_CURRENT_USER\\Software\\SimonTatham\\PuTTY\\SshHostKeys" << endl;
+        x2goDebug << keyName << "=" << fields.join(",") << endl;
     }
     settings.sync();
 }
 #endif
 
-
-SshMasterConnection::SshMasterConnection (QObject* parent, QString host, int port, bool acceptUnknownServers, QString user,
-        QString pass, QString key, bool autologin, bool krblogin,
-        bool useproxy, ProxyType type, QString proxyserver, quint16 proxyport,
-        QString proxylogin, QString proxypassword, QString proxykey,
-        bool proxyautologin, bool proxyKrbLogin ) : QThread ( parent )
+SshMasterConnection::SshMasterConnection(QObject *parent, QString host, int port, bool acceptUnknownServers, QString user,
+                                         QString pass, QString key, bool autologin, bool krblogin,
+                                         bool useproxy, ProxyType type, QString proxyserver, quint16 proxyport,
+                                         QString proxylogin, QString proxypassword, QString proxykey,
+                                         bool proxyautologin, bool proxyKrbLogin) : QThread(parent)
 {
-#if defined ( Q_OS_DARWIN )
+#if defined(Q_OS_DARWIN)
     // Mac OS X provides only 512KB stack space for secondary threads.
     // As we put a 512KB buffer on the stack later on, we need a bigger stack space.
-    setStackSize (sizeof (char) * 1024 * 1024 * 2);
+    setStackSize(sizeof(char) * 1024 * 1024 * 2);
 #endif
     tcpProxySocket = NULL;
     tcpNetworkProxy = NULL;
-    sshProxy= NULL;
-    sshProxyReady=false;
-    nextPid=0;
+    sshProxy = NULL;
+    sshProxyReady = false;
+    nextPid = 0;
 
-    breakLoop=false;
-    kerberosDelegation=false;
+    breakLoop = false;
+    kerberosDelegation = false;
     x2goDebug << "SshMasterConnection, host " << host << "; port " << port << "; user " << user
               << "; useproxy " << useproxy << "; proxyserver " << proxyserver
-              << "; proxyport " << proxyport;
-    this->host=host;
+              << "; proxyport " << proxyport << endl;
+    this->host = host;
     // If the hostname starts with "!" do not perform loginCheck() for this connection
     if (this->host.indexOf("!") == 0)
     {
-        this->loginCheck=false;
+        this->loginCheck = false;
         this->host.remove(0, 1);
     }
     else
     {
-        this->loginCheck=true;
-    }
-    this->port=port;
-    this->user=user;
-    this->pass=pass;
-    this->key=key;
-    this->autologin=autologin;
-    this->acceptUnknownServers=acceptUnknownServers;
-    this->useproxy=useproxy;
-    this->proxytype=type;
-    this->proxyautologin=proxyautologin;
-    this->proxykey=proxykey;
-    this->proxyserver=proxyserver;
-    this->proxyport=proxyport;
-    this->proxylogin=proxylogin;
-    this->proxypassword=proxypassword;
-    this->proxyKrbLogin=proxyKrbLogin;
-    mainWnd=(ONMainWindow*) parent;
-    kerberos=krblogin;
-    challengeAuthVerificationCode=QString::null;
-
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
-    if (this->user.isEmpty ()) {
+        this->loginCheck = true;
+    }
+    this->port = port;
+    this->user = user;
+    this->pass = pass;
+    this->key = key;
+    this->autologin = autologin;
+    this->acceptUnknownServers = acceptUnknownServers;
+    this->useproxy = useproxy;
+    this->proxytype = type;
+    this->proxyautologin = proxyautologin;
+    this->proxykey = proxykey;
+    this->proxyserver = proxyserver;
+    this->proxyport = proxyport;
+    this->proxylogin = proxylogin;
+    this->proxypassword = proxypassword;
+    this->proxyKrbLogin = proxyKrbLogin;
+    mainWnd = (ONMainWindow *)parent;
+    kerberos = krblogin;
+    challengeAuthVerificationCode = QString::null;
+
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
+    if (this->user.isEmpty())
+    {
         /* We might have a config file request pending, honor this. */
-        ssh_session tmp_session = ssh_new ();
+        ssh_session tmp_session = ssh_new();
 
-        if (!tmp_session) {
-            QString error_msg = tr ("Cannot create SSH session.");
-            error_msg += " " + tr ("Using environment-provided username.");
-            x2goDebug << error_msg;
+        if (!tmp_session)
+        {
+            QString error_msg = tr("Cannot create SSH session.");
+            error_msg += " " + tr("Using environment-provided username.");
+            x2goDebug << error_msg << endl;
         }
-        else {
+        else
+        {
             QByteArray tmp_BA;
 
-            tmp_BA = this->host.toLocal8Bit ();
+            tmp_BA = this->host.toLocal8Bit();
 
-            ssh_options_set (tmp_session, SSH_OPTIONS_HOST, tmp_BA.data ());
+            ssh_options_set(tmp_session, SSH_OPTIONS_HOST, tmp_BA.data());
 
-            if (ssh_options_parse_config (tmp_session, NULL) < 0) {
-                x2goDebug << "Warning: unable to parse the SSH config file.";
+            if (ssh_options_parse_config(tmp_session, NULL) < 0)
+            {
+                x2goDebug << "Warning: unable to parse the SSH config file." << endl;
             }
 
             char *inferred_username = NULL;
-            ssh_options_get (tmp_session, SSH_OPTIONS_USER, &inferred_username);
-            x2goDebug << "Temporary session user name after config file parse: " << inferred_username;
+            ssh_options_get(tmp_session, SSH_OPTIONS_USER, &inferred_username);
+            x2goDebug << "Temporary session user name after config file parse: " << inferred_username << endl;
 
-            this->user = QString::fromLocal8Bit (inferred_username);
+            this->user = QString::fromLocal8Bit(inferred_username);
 
-            ssh_string_free_char (inferred_username);
-            ssh_free (tmp_session);
+            ssh_string_free_char(inferred_username);
+            ssh_free(tmp_session);
         }
     }
 #endif
 
-    if (this->user.isEmpty ()) {
+    if (this->user.isEmpty())
+    {
 #ifdef Q_OS_WIN
-        this->user = getenv ("USERNAME");
+        this->user = getenv("USERNAME");
 #else
-        this->user = getenv ("USER");
+        this->user = getenv("USER");
 #endif
     }
 
     if (kerberos)
     {
-        x2goDebug<<"Starting SSH connection with Kerberos authentication.";
+        x2goDebug << "Starting SSH connection with Kerberos authentication." << endl;
     }
     else
     {
-        x2goDebug<<"Starting SSH connection without Kerberos authentication.";
+        x2goDebug << "Starting SSH connection without Kerberos authentication." << endl;
     }
-    x2goDebug<<"SshMasterConnection, instance "<<this<<" created.";
+    x2goDebug << "SshMasterConnection, instance " << this << " created." << endl;
 }
 
-
 void SshMasterConnection::slotSshProxyConnectionOk()
 {
-    x2goDebug<<"SSH proxy connected.";
-
+    x2goDebug << "SSH proxy connected." << endl;
 
-    localProxyPort=PROXYTUNNELPORT;
-    while ( ONMainWindow::isServerRunning ( localProxyPort ) )
+    localProxyPort = PROXYTUNNELPORT;
+    while (ONMainWindow::isServerRunning(localProxyPort))
         ++localProxyPort;
 
-    sshProxy->startTunnel ( host, port, "127.0.0.1",localProxyPort,false,this, SLOT ( slotSshProxyTunnelOk(int)),
-                            SLOT ( slotSshProxyTunnelFailed(bool,QString,int)));
-
+    sshProxy->startTunnel(host, port, "127.0.0.1", localProxyPort, false, this, SLOT(slotSshProxyTunnelOk(int)),
+                          SLOT(slotSshProxyTunnelFailed(bool, QString, int)));
 }
 
-
-int SshMasterConnection::copyFile(const QString& src, const QString dst, QObject* receiver, const char* slotFinished)
+int SshMasterConnection::copyFile(const QString &src, const QString dst, QObject *receiver, const char *slotFinished)
 {
-    SshProcess* proc=new SshProcess(this, nextPid++);
-    if(receiver && slotFinished)
+    SshProcess *proc = new SshProcess(this, nextPid++);
+    if (receiver && slotFinished)
     {
-        connect(proc, SIGNAL(sshFinished(bool,QString,int)), receiver, slotFinished);
+        connect(proc, SIGNAL(sshFinished(bool, QString, int)), receiver, slotFinished);
     }
-    proc->start_cp(src,dst);
-    processes<<proc;
+    proc->start_cp(src, dst);
+    processes << proc;
     return proc->pid;
 }
 
-int SshMasterConnection::executeCommand(const QString& command, QObject* receiver, const char* slotFinished, bool overridePath)
+int SshMasterConnection::executeCommand(const QString &command, QObject *receiver, const char *slotFinished, bool overridePath)
 {
-    SshProcess* proc=new SshProcess(this, nextPid++);
-    if(receiver && slotFinished)
+    SshProcess *proc = new SshProcess(this, nextPid++);
+    if (receiver && slotFinished)
     {
-        connect(proc, SIGNAL(sshFinished(bool,QString,int)), receiver, slotFinished);
+        connect(proc, SIGNAL(sshFinished(bool, QString, int)), receiver, slotFinished);
     }
     proc->startNormal(command, overridePath);
-    processes<<proc;
+    processes << proc;
     return proc->pid;
-
 }
 
 QString SshMasterConnection::getSourceFile(int pid)
 {
-    foreach (SshProcess* proc, processes)
+    foreach (SshProcess *proc, processes)
     {
-        if(proc->pid==pid)
+        if (proc->pid == pid)
             return proc->getSource();
     }
     return QString ::null;
 }
 
-
 void SshMasterConnection::addReverseTunnelConnections()
 {
     reverseTunnelRequestMutex.lock();
-    for(int i=0; i<reverseTunnelRequest.count(); ++i)
+    for (int i = 0; i < reverseTunnelRequest.count(); ++i)
     {
-        if(!reverseTunnelRequest[i].listen)
+        if (!reverseTunnelRequest[i].listen)
         {
-            reverseTunnelRequest[i].listen=true;
+            reverseTunnelRequest[i].listen = true;
 
             int rc = SSH_AGAIN;
 
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 7, 0)
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 7, 0)
             /* Non-blocking mode may return SSH_AGAIN, so try again if neceassary. */
-            while (SSH_AGAIN == rc) {
+            while (SSH_AGAIN == rc)
+            {
                 rc = ssh_channel_listen_forward(my_ssh_session, NULL, reverseTunnelRequest[i].forwardPort, NULL);
 #else
             {
                 rc = ssh_forward_listen(my_ssh_session, NULL, reverseTunnelRequest[i].forwardPort, NULL);
 #endif
 
-                if(rc==SSH_OK)
+                if (rc == SSH_OK)
                 {
                     emit reverseTunnelOk(reverseTunnelRequest[i].creator);
-                    x2goDebug<<"Listening for TCP/IP connections on "<<reverseTunnelRequest[i].forwardPort;
+                    x2goDebug << "Listening for TCP/IP connections on " << reverseTunnelRequest[i].forwardPort << endl;
                 }
-                if(rc==SSH_ERROR)
+                if (rc == SSH_ERROR)
                 {
-                    QString err=ssh_get_error(my_ssh_session);
-                    x2goDebug<<"Forward port "<<reverseTunnelRequest[i].forwardPort<<" failed:"<<err;
+                    QString err = ssh_get_error(my_ssh_session);
+                    x2goDebug << "Forward port " << reverseTunnelRequest[i].forwardPort << " failed:" << err << endl;
                     emit reverseTunnelFailed(reverseTunnelRequest[i].creator, err);
                 }
             }
@@ -342,192 +336,185 @@ void SshMasterConnection::addReverseTunnelConnections()
 void SshMasterConnection::checkReverseTunnelConnections()
 {
     int port;
-    ssh_channel chan=ssh_channel_accept_forward(my_ssh_session, 0, &port);
-    if(chan)
+    ssh_channel chan = ssh_channel_accept_forward(my_ssh_session, 0, &port);
+    if (chan)
     {
-        x2goDebug<<"New reverse connection on port "<<port;
+        x2goDebug << "New reverse connection on port " << port << endl;
 
         reverseTunnelRequestMutex.lock();
-        for(int i=0; i<reverseTunnelRequest.count(); ++i)
+        for (int i = 0; i < reverseTunnelRequest.count(); ++i)
         {
-            ReverseTunnelRequest req=reverseTunnelRequest[i];
-            if (static_cast<int> (req.forwardPort) == port)
+            ReverseTunnelRequest req = reverseTunnelRequest[i];
+            if (static_cast<int>(req.forwardPort) == port)
             {
-                x2goDebug<<"Creating new channel for reverse tunnel "<<port;
-                int sock=socket ( AF_INET, SOCK_STREAM,0 );
+                x2goDebug << "Creating new channel for reverse tunnel " << port << endl;
+                int sock = socket(AF_INET, SOCK_STREAM, 0);
 #ifndef Q_OS_WIN
-                const int y=1;
+                const int y = 1;
 #else
-                const char y=1;
+                const char y = 1;
 #endif
-                setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,&y, sizeof(int));
+                setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &y, sizeof(int));
 
                 struct sockaddr_in address;
-                address.sin_family=AF_INET;
-                address.sin_port=htons ( req.localPort );
-                x2goDebug<<"Connecting to "<<req.localHost<<":"<<req.localPort<<endl;
+                address.sin_family = AF_INET;
+                address.sin_port = htons(req.localPort);
+                x2goDebug << "Connecting to " << req.localHost << ":" << req.localPort << endl;
 #ifndef Q_OS_WIN
-                inet_aton ( req.localHost.toLatin1(), &address.sin_addr );
+                inet_aton(req.localHost.toLatin1(), &address.sin_addr);
 #else
-                address.sin_addr.s_addr=inet_addr (
-                                            req.localHost.toLatin1() );
+                address.sin_addr.s_addr = inet_addr(
+                    req.localHost.toLatin1());
 #endif
 
-                if ( ::connect ( sock, ( struct sockaddr * ) &address,sizeof ( address ) ) !=0 )
+                if (::connect(sock, (struct sockaddr *)&address, sizeof(address)) != 0)
                 {
-                    QString errMsg=tr ( "Cannot connect to " ) +
-                                   req.localHost+":"+QString::number ( req.localPort );
-                    x2goDebug<<errMsg<<endl;
-                    emit ioErr ( req.creator, errMsg, "" );
+                    QString errMsg = tr("Cannot connect to ") +
+                                     req.localHost + ":" + QString::number(req.localPort);
+                    x2goDebug << errMsg << endl;
+                    emit ioErr(req.creator, errMsg, "");
                     break;
                 }
 
                 ChannelConnection con;
-                con.channel=chan;
-                con.sock=sock;
-                con.creator=req.creator;
+                con.channel = chan;
+                con.sock = sock;
+                con.creator = req.creator;
                 channelConnectionsMutex.lock();
-                channelConnections<<con;
+                channelConnections << con;
                 channelConnectionsMutex.unlock();
-                x2goDebug<<"New channel created";
+                x2goDebug << "New channel created" << endl;
                 break;
             }
         }
         reverseTunnelRequestMutex.unlock();
-
-
     }
 }
 
-
-int SshMasterConnection::startTunnel(const QString& forwardHost, uint forwardPort, const QString& localHost, uint localPort, bool reverse,
-                                     QObject* receiver, const char* slotTunnelOk, const char* slotFinished)
+int SshMasterConnection::startTunnel(const QString &forwardHost, uint forwardPort, const QString &localHost, uint localPort, bool reverse,
+                                     QObject *receiver, const char *slotTunnelOk, const char *slotFinished)
 {
-    SshProcess* proc=new SshProcess(this, nextPid++);
-    if(receiver && slotFinished)
+    SshProcess *proc = new SshProcess(this, nextPid++);
+    if (receiver && slotFinished)
     {
-        connect(proc, SIGNAL(sshFinished(bool,QString,int)), receiver, slotFinished);
+        connect(proc, SIGNAL(sshFinished(bool, QString, int)), receiver, slotFinished);
     }
-    if(receiver && slotTunnelOk)
+    if (receiver && slotTunnelOk)
     {
         connect(proc, SIGNAL(sshTunnelOk(int)), receiver, slotTunnelOk);
     }
     proc->startTunnel(forwardHost, forwardPort, localHost, localPort, reverse);
-    if(reverse && !kerberos)
+    if (reverse && !kerberos)
     {
-        connect(this, SIGNAL(reverseTunnelOk(SshProcess*)), proc, SLOT(slotReverseTunnelOk(SshProcess*)));
-        connect(this, SIGNAL(reverseTunnelFailed(SshProcess*,QString)), proc, SLOT(slotReverseTunnelFailed(SshProcess*,QString)));
+        connect(this, SIGNAL(reverseTunnelOk(SshProcess *)), proc, SLOT(slotReverseTunnelOk(SshProcess *)));
+        connect(this, SIGNAL(reverseTunnelFailed(SshProcess *, QString)), proc, SLOT(slotReverseTunnelFailed(SshProcess *, QString)));
         ReverseTunnelRequest req;
-        req.creator=proc;
-        req.localPort=localPort;
-        req.localHost=localHost;
-        req.forwardPort=forwardPort;
-        req.listen=false;
-        x2goDebug<<"Requesting reverse tunnel from port "<<forwardPort<< " to "<<localPort;
+        req.creator = proc;
+        req.localPort = localPort;
+        req.localHost = localHost;
+        req.forwardPort = forwardPort;
+        req.listen = false;
+        x2goDebug << "Requesting reverse tunnel from port " << forwardPort << " to " << localPort;
         reverseTunnelRequestMutex.lock();
-        reverseTunnelRequest<<req;
+        reverseTunnelRequest << req;
         reverseTunnelRequestMutex.unlock();
     }
-    processes<<proc;
+    processes << proc;
     return proc->pid;
 }
 
-void SshMasterConnection::slotSshProxyInteractionFinish(SshMasterConnection* connection)
+void SshMasterConnection::slotSshProxyInteractionFinish(SshMasterConnection *connection /* unused */)
 {
-    x2goDebug<<"SSH proxy interaction finished";
+    x2goDebug << "SSH proxy interaction finished";
     slotSshProxyUserAuthError("NO_ERROR");
 }
 
-void SshMasterConnection::slotSshProxyInteractionStart(SshMasterConnection* connection, QString prompt)
+void SshMasterConnection::slotSshProxyInteractionStart(SshMasterConnection *connection /* unused */, QString prompt)
 {
     emit startInteraction(this, prompt);
 }
 
-void SshMasterConnection::slotSshProxyInteractionUpdate(SshMasterConnection* connection, QString output)
+void SshMasterConnection::slotSshProxyInteractionUpdate(SshMasterConnection *connection /* unused */, QString output)
 {
     emit updateInteraction(this, output);
 }
 
-
 void SshMasterConnection::slotSshProxyConnectionError(QString err1, QString err2)
 {
-    breakLoop=true;
-    emit connectionError(tr("SSH proxy connection error."),err1+" "+err2);
+    breakLoop = true;
+    emit connectionError(tr("SSH proxy connection error."), err1 + " " + err2);
 }
 
-void SshMasterConnection::slotSshProxyServerAuthError(int errCode, QString err, SshMasterConnection* con)
+void SshMasterConnection::slotSshProxyServerAuthError(int errCode, QString err, SshMasterConnection *con)
 {
-    emit serverAuthError(errCode, tr("SSH proxy connection error: ")+err, con);
+    emit serverAuthError(errCode, tr("SSH proxy connection error: ") + err, con);
 }
 
 void SshMasterConnection::slotSshProxyUserAuthError(QString err)
 {
-    breakLoop=true;
-    if(err=="NO_ERROR" || err=="NO_PROXY_ERROR")
-      emit userAuthError(err);
+    breakLoop = true;
+    if (err == "NO_ERROR" || err == "NO_PROXY_ERROR")
+        emit userAuthError(err);
     else
-      emit userAuthError(tr("SSH proxy connection error: ")+err);
+        emit userAuthError(tr("SSH proxy connection error: ") + err);
 }
 
-
 void SshMasterConnection::slotSshProxyTunnelOk(int)
 {
-    x2goDebug<<"SSH proxy tunnel established.";
-    sshProxyReady=true;
+    x2goDebug << "SSH proxy tunnel established." << endl;
+    sshProxyReady = true;
 }
 
-void SshMasterConnection::slotSshProxyTunnelFailed(bool ,  QString output,
-        int)
+void SshMasterConnection::slotSshProxyTunnelFailed(bool, QString output,
+                                                   int)
 {
-    breakLoop=true;
+    breakLoop = true;
     emit connectionError(tr("Failed to create SSH proxy tunnel."), output);
 }
 
-
-
 void SshMasterConnection::slotSshProxyServerAuthAborted()
 {
-    breakLoop=true;
+    breakLoop = true;
 }
 
 void SshMasterConnection::run()
 {
-    x2goDebug<<"SshMasterConnection, instance "<<this<<" entering thread.";
-    if(useproxy && proxytype==PROXYSSH)
+    x2goDebug << "SshMasterConnection, instance " << this << " entering thread." << endl;
+    if (useproxy && proxytype == PROXYSSH)
     {
         x2goDebug << "proxyserver: " << proxyserver << "; proxyport: " << proxyport << "; proxylogin: " << proxylogin;
-        sshProxy=new SshMasterConnection (0, proxyserver, proxyport,acceptUnknownServers,
-                                          proxylogin, proxypassword, proxykey, proxyautologin, proxyKrbLogin, false);
-
-        qRegisterMetaType<SshMasterConnection::passphrase_types> ("SshMasterConnection::passphrase_types");
-
-        connect ( sshProxy, SIGNAL ( connectionOk(QString) ), this, SLOT ( slotSshProxyConnectionOk() ) );
-
-        connect ( sshProxy, SIGNAL ( serverAuthError ( int,QString,SshMasterConnection* ) ),this,
-                  SLOT ( slotSshProxyServerAuthError ( int,QString, SshMasterConnection* ) ) );
-        connect ( sshProxy, SIGNAL ( needPassPhrase(SshMasterConnection*, SshMasterConnection::passphrase_types)),this,
-                  SIGNAL ( needPassPhrase(SshMasterConnection*, SshMasterConnection::passphrase_types)) );
-        connect ( sshProxy, SIGNAL ( serverAuthAborted()),this,
-                  SLOT ( slotSshProxyServerAuthAborted()) );
-        connect ( sshProxy, SIGNAL ( userAuthError ( QString ) ),this,SLOT ( slotSshProxyUserAuthError ( QString ) ) );
-        connect ( sshProxy, SIGNAL ( connectionError ( QString,QString ) ), this,
-                  SLOT ( slotSshProxyConnectionError ( QString,QString ) ) );
-
-        connect ( sshProxy, SIGNAL(startInteraction(SshMasterConnection*,QString)),this,
-                  SLOT(slotSshProxyInteractionStart(SshMasterConnection*,QString)) );
-        connect ( sshProxy, SIGNAL(updateInteraction(SshMasterConnection*,QString)),this,
-                  SLOT(slotSshProxyInteractionUpdate(SshMasterConnection*,QString)) );
-        connect ( sshProxy, SIGNAL(finishInteraction(SshMasterConnection*)),this,
-		  SLOT(slotSshProxyInteractionFinish(SshMasterConnection*)));
-//         connect ( interDlg, SIGNAL(textEntered(QString)), con, SLOT(interactionTextEnter(QString)));
-//         connect ( interDlg, SIGNAL(interrupt()), con, SLOT(interactionInterruptSlot()));
-
-        sshProxyReady=false;
+        sshProxy = new SshMasterConnection(0, proxyserver, proxyport, acceptUnknownServers,
+                                           proxylogin, proxypassword, proxykey, proxyautologin, proxyKrbLogin, false);
+
+        qRegisterMetaType<SshMasterConnection::passphrase_types>("SshMasterConnection::passphrase_types");
+
+        connect(sshProxy, SIGNAL(connectionOk(QString)), this, SLOT(slotSshProxyConnectionOk()));
+
+        connect(sshProxy, SIGNAL(serverAuthError(int, QString, SshMasterConnection *)), this,
+                SLOT(slotSshProxyServerAuthError(int, QString, SshMasterConnection *)));
+        connect(sshProxy, SIGNAL(needPassPhrase(SshMasterConnection *, SshMasterConnection::passphrase_types)), this,
+                SIGNAL(needPassPhrase(SshMasterConnection *, SshMasterConnection::passphrase_types)));
+        connect(sshProxy, SIGNAL(serverAuthAborted()), this,
+                SLOT(slotSshProxyServerAuthAborted()));
+        connect(sshProxy, SIGNAL(userAuthError(QString)), this, SLOT(slotSshProxyUserAuthError(QString)));
+        connect(sshProxy, SIGNAL(connectionError(QString, QString)), this,
+                SLOT(slotSshProxyConnectionError(QString, QString)));
+
+        connect(sshProxy, SIGNAL(startInteraction(SshMasterConnection *, QString)), this,
+                SLOT(slotSshProxyInteractionStart(SshMasterConnection *, QString)));
+        connect(sshProxy, SIGNAL(updateInteraction(SshMasterConnection *, QString)), this,
+                SLOT(slotSshProxyInteractionUpdate(SshMasterConnection *, QString)));
+        connect(sshProxy, SIGNAL(finishInteraction(SshMasterConnection *)), this,
+                SLOT(slotSshProxyInteractionFinish(SshMasterConnection *)));
+        //         connect ( interDlg, SIGNAL(textEntered(QString)), con, SLOT(interactionTextEnter(QString)));
+        //         connect ( interDlg, SIGNAL(interrupt()), con, SLOT(interactionInterruptSlot()));
+
+        sshProxyReady = false;
         sshProxy->start();
 
-        while(! sshProxyReady)
+        while (!sshProxyReady)
         {
-            if(breakLoop)
+            if (breakLoop)
             {
                 quit();
                 return;
@@ -535,44 +522,47 @@ void SshMasterConnection::run()
             this->usleep(200);
         }
     }
-    disconnectSessionFlag=false;
+    disconnectSessionFlag = false;
 
     int verbosity = SSH_LOG_NOLOG;
 
-    if (ONMainWindow::libssh_debugging) {
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
-      verbosity = SSH_LOG_INFO;
+    if (ONMainWindow::libssh_debugging)
+    {
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
+        verbosity = SSH_LOG_INFO;
 #else
-      verbosity = SSH_LOG_PROTOCOL;
+        verbosity = SSH_LOG_PROTOCOL;
 #endif
     }
 
-    if (ONMainWindow::libssh_packetlog) {
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
-      verbosity = SSH_LOG_DEBUG;
+    if (ONMainWindow::libssh_packetlog)
+    {
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
+        verbosity = SSH_LOG_DEBUG;
 #else
-      verbosity = SSH_LOG_PACKET;
+        verbosity = SSH_LOG_PACKET;
 #endif
     }
 
+    // Set time-out to 1 min.
     long timeout = 60;
 
     my_ssh_session = ssh_new();
-    if ( my_ssh_session == NULL )
+    if (my_ssh_session == NULL)
     {
-        QString err=tr ( "Cannot create SSH session." );
-        x2goDebug<<err<<endl;
-        emit connectionError ( err,"" );
+        QString err = tr("Cannot create SSH session.");
+        x2goDebug << err << endl;
+        emit connectionError(err, "");
         quit();
         return;
     }
 
 #ifdef Q_OS_WIN
     {
-        QByteArray tmp_BA = (mainWnd->getHomeDirectory () + "/ssh").toLocal8Bit ();
+        QByteArray tmp_BA = (mainWnd->getHomeDirectory() + "/ssh").toLocal8Bit();
 
-        ssh_options_set ( my_ssh_session, SSH_OPTIONS_SSH_DIR, tmp_BA.data ());
-        x2goDebug << "Setting SSH directory to " << tmp_BA.data ();
+        ssh_options_set(my_ssh_session, SSH_OPTIONS_SSH_DIR, tmp_BA.data());
+        x2goDebug << "Setting SSH directory to " << tmp_BA.data();
         if (kerberos)
         {
             parseKnownHosts();
@@ -581,136 +571,135 @@ void SshMasterConnection::run()
 #endif
 
     ssh_options_set(my_ssh_session, SSH_OPTIONS_LOG_VERBOSITY, &verbosity);
-
     ssh_options_set(my_ssh_session, SSH_OPTIONS_TIMEOUT, &timeout);
 
     if (useproxy && proxytype == PROXYHTTP)
     {
         socket_t proxysocket = SSH_INVALID_SOCKET;
 
-        tcpNetworkProxy = new QNetworkProxy( QNetworkProxy::HttpProxy,
-                                             proxyserver, proxyport, proxylogin, proxypassword);
+        tcpNetworkProxy = new QNetworkProxy(QNetworkProxy::HttpProxy,
+                                            proxyserver, proxyport, proxylogin, proxypassword);
         tcpProxySocket = new QTcpSocket();
-        tcpProxySocket->setProxy( *tcpNetworkProxy );
+        tcpProxySocket->setProxy(*tcpNetworkProxy);
         tcpProxySocket->connectToHost(host, port);
         if (!tcpProxySocket->waitForConnected(30000))
         {
-            QString message=tr ( "Cannot connect to proxy server." );
-            x2goDebug<<message<<endl;
-            emit connectionError ( "Proxy", message );
-            ssh_free ( my_ssh_session );
+            QString message = tr("Cannot connect to proxy server.");
+            x2goDebug << message << endl;
+            emit connectionError("Proxy", message);
+            ssh_free(my_ssh_session);
             quit();
             return;
         }
         proxysocket = tcpProxySocket->socketDescriptor();
         x2goDebug << "Created HTTP proxy socket: " << proxysocket << endl;
-        ssh_options_set( my_ssh_session, SSH_OPTIONS_FD, &proxysocket);
-        ssh_set_fd_toread( my_ssh_session);
-        x2goDebug<<"Connected to HTTP proxy server: " << proxyserver << ":"
-                 << proxyport <<endl;
+        ssh_options_set(my_ssh_session, SSH_OPTIONS_FD, &proxysocket);
+        ssh_set_fd_toread(my_ssh_session);
+        x2goDebug << "Connected to HTTP proxy server: " << proxyserver << ":"
+                  << proxyport << endl;
     }
 
-    if ( !sshConnect() )
+    if (!sshConnect())
     {
-        if(disconnectSessionFlag)
+        if (disconnectSessionFlag)
         {
-            x2goDebug<<"Session is already disconnected, exiting."<<endl;
+            x2goDebug << "Session is already disconnected, exiting." << endl;
             return;
         }
-        QString err=ssh_get_error ( my_ssh_session );
-        QString message=tr ( "Cannot connect to " ) +host+":"+QString::number ( port );
-        x2goDebug<<message<<" - "<<err;
-        emit connectionError ( message, err );
-        ssh_free ( my_ssh_session );
+        QString err = ssh_get_error(my_ssh_session);
+        QString message = tr("Cannot connect to ") + host + ":" + QString::number(port);
+        x2goDebug << message << " - " << err;
+        emit connectionError(message, err);
+        ssh_free(my_ssh_session);
         quit();
         return;
     }
-    if(disconnectSessionFlag)
+    if (disconnectSessionFlag)
     {
-        x2goDebug<<"Session is already disconnected, exiting."<<endl;
+        x2goDebug << "Session is already disconnected, exiting." << endl;
         return;
     }
     QString errMsg;
-    int state=serverAuth ( errMsg );
-    if ( state != SSH_SERVER_KNOWN_OK )
+    int state = serverAuth(errMsg);
+    if (state != SSH_SERVER_KNOWN_OK)
     {
-        if(disconnectSessionFlag)
+        if (disconnectSessionFlag)
         {
-            x2goDebug<<"Session is already disconnected, exiting."<<endl;
+            x2goDebug << "Session is already disconnected, exiting." << endl;
             return;
         }
-        writeHostKey=writeHostKeyReady=false;
-        emit serverAuthError ( state,errMsg, this );
-        for(;;)
+        writeHostKey = writeHostKeyReady = false;
+        emit serverAuthError(state, errMsg, this);
+        for (;;)
         {
             this->usleep(100);
             writeHostKeyMutex.lock();
-            if(writeHostKeyReady)
+            if (writeHostKeyReady)
             {
-                if(writeHostKey)
+                if (writeHostKey)
                     ssh_write_knownhost(my_ssh_session);
                 writeHostKeyMutex.unlock();
                 break;
             }
             writeHostKeyMutex.unlock();
         }
-        ssh_disconnect ( my_ssh_session );
-        ssh_free ( my_ssh_session );
+        ssh_disconnect(my_ssh_session);
+        ssh_free(my_ssh_session);
         return;
     }
 
-    if(disconnectSessionFlag)
+    if (disconnectSessionFlag)
     {
-        x2goDebug<<"Session is already disconnected, exiting."<<endl;
+        x2goDebug << "Session is already disconnected, exiting." << endl;
         return;
     }
 
-    QByteArray tmp_BA = user.toLocal8Bit ();
-    ssh_options_set ( my_ssh_session, SSH_OPTIONS_USER, tmp_BA.data () );
+    QByteArray tmp_BA = user.toLocal8Bit();
+    ssh_options_set(my_ssh_session, SSH_OPTIONS_USER, tmp_BA.data());
 
 #ifdef Q_OS_WIN
     {
-        QByteArray tmp_BA = (mainWnd->getHomeDirectory () + "/ssh").toLocal8Bit ();
+        QByteArray tmp_BA = (mainWnd->getHomeDirectory() + "/ssh").toLocal8Bit();
 
-        ssh_options_set ( my_ssh_session, SSH_OPTIONS_SSH_DIR, tmp_BA.data () );
-        x2goDebug << "Setting SSH directory to " << tmp_BA.data ();
+        ssh_options_set(my_ssh_session, SSH_OPTIONS_SSH_DIR, tmp_BA.data());
+        x2goDebug << "Setting SSH directory to " << tmp_BA.data();
     }
 #endif
 
-    if ( userAuth() )
+    if (userAuth())
     {
-        if(disconnectSessionFlag)
+        if (disconnectSessionFlag)
         {
-            x2goDebug<<"Session is already disconnected, exiting."<<endl;
+            x2goDebug << "Session is already disconnected, exiting." << endl;
             return;
         }
-        x2goDebug<<"User authentication OK.";
+        x2goDebug << "User authentication OK.";
         // checkLogin() is currently specific to libssh.
-        if(kerberos)
+        if (kerberos)
         {
             emit connectionOk(host);
         }
-        else if(this->loginCheck == false)
+        else if (this->loginCheck == false)
         {
-            x2goDebug<<"Skipping Login Check as requested by configuration";
+            x2goDebug << "Skipping Login Check as requested by configuration" << endl;
             emit connectionOk(host);
         }
         else
         {
-            if(checkLogin())
+            if (checkLogin())
             {
-                x2goDebug<<"Login Check - OK";
+                x2goDebug << "Login Check - OK" << endl;
                 emit connectionOk(host);
             }
             else
             {
-                x2goDebug<<"Login Check - Failed";
-//          if(!interactionInterrupt)
+                x2goDebug << "Login Check - Failed" << endl;
+                // if(!interactionInterrupt)
                 {
-                  emit finishInteraction(this);
+                    emit finishInteraction(this);
                 }
-                ssh_disconnect ( my_ssh_session );
-                ssh_free ( my_ssh_session );
+                ssh_disconnect(my_ssh_session);
+                ssh_free(my_ssh_session);
                 quit();
                 return;
             }
@@ -718,105 +707,104 @@ void SshMasterConnection::run()
     }
     else
     {
-        if(disconnectSessionFlag)
+        if (disconnectSessionFlag)
         {
-            x2goDebug<<"Session is already disconnected, exiting."<<endl;
+            x2goDebug << "Session is already disconnected, exiting." << endl;
             return;
         }
         QString err;
         if (!kerberos)
         {
-            err=ssh_get_error ( my_ssh_session );
+            err = ssh_get_error(my_ssh_session);
         }
         else
         {
-            err=sshProcErrString;
+            err = sshProcErrString;
         }
-        QString message=tr ( "Authentication failed." );
-        x2goDebug<<message<<" - "<<err;
-        emit userAuthError ( authErrors.join ( "\n" ) );
-        ssh_disconnect ( my_ssh_session );
-        ssh_free ( my_ssh_session );
+        QString message = tr("Authentication failed.");
+        x2goDebug << message << " - " << err;
+        emit userAuthError(authErrors.join("\n"));
+        ssh_disconnect(my_ssh_session);
+        ssh_free(my_ssh_session);
         quit();
         return;
     }
 
-
 #ifndef Q_OS_WIN
-    const int y=1;
+    const int y = 1;
 #else
-    const char y=1;
+    const char y = 1;
 #endif
-    socket_t session_sock=ssh_get_fd(my_ssh_session);
-    setsockopt(session_sock, IPPROTO_TCP, TCP_NODELAY,&y, sizeof(int));
-
+    socket_t session_sock = ssh_get_fd(my_ssh_session);
+    setsockopt(session_sock, IPPROTO_TCP, TCP_NODELAY, &y, sizeof(int));
 
     channelLoop();
 }
 
-
 SshMasterConnection::~SshMasterConnection()
 {
 
     disconnectFlagMutex.lock();
-    disconnectSessionFlag=true;
+    disconnectSessionFlag = true;
     disconnectFlagMutex.unlock();
-    x2goDebug<<"SshMasterConnection, instance "<<this<<" waiting for thread to finish.";
+    x2goDebug << "SshMasterConnection, instance " << this << " waiting for thread to finish." << endl;
     wait(15000);
-    x2goDebug<<"SshMasterConnection, instance "<<this<<" thread finished.";
-    for(int i=processes.count()-1; i>=0; --i)
+    x2goDebug << "SshMasterConnection, instance " << this << " thread finished." << endl;
+    for (int i = processes.count() - 1; i >= 0; --i)
     {
         delete processes[i];
     }
-    x2goDebug<<"SshMasterConnection, instance "<<this<<" finished destructor.";
+    x2goDebug << "SshMasterConnection, instance " << this << " finished destructor." << endl;
 }
 
-
 bool SshMasterConnection::sshConnect()
 {
     int rc;
     QByteArray tmpBA = host.toLocal8Bit();
-    if(useproxy && proxytype==PROXYSSH)
+    if (useproxy && proxytype == PROXYSSH)
     {
-        ssh_options_set ( my_ssh_session, SSH_OPTIONS_HOST, "127.0.0.1" );
-        if (localProxyPort) {
-            ssh_options_set ( my_ssh_session, SSH_OPTIONS_PORT, &localProxyPort );
+        ssh_options_set(my_ssh_session, SSH_OPTIONS_HOST, "127.0.0.1");
+        if (localProxyPort)
+        {
+            ssh_options_set(my_ssh_session, SSH_OPTIONS_PORT, &localProxyPort);
         }
     }
     else
     {
-        ssh_options_set ( my_ssh_session, SSH_OPTIONS_HOST, tmpBA.data() );
-        if (port) {
-            ssh_options_set ( my_ssh_session, SSH_OPTIONS_PORT, &port );
+        ssh_options_set(my_ssh_session, SSH_OPTIONS_HOST, tmpBA.data());
+        if (port)
+        {
+            ssh_options_set(my_ssh_session, SSH_OPTIONS_PORT, &port);
         }
     }
 
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
     unsigned int cur_port = 0;
-    ssh_options_get_port (my_ssh_session, &cur_port);
-    x2goDebug << "Session port before config file parse: " << cur_port;
+    ssh_options_get_port(my_ssh_session, &cur_port);
+    x2goDebug << "Session port before config file parse: " << cur_port << endl;
 #endif
 
     /* Parse ~/.ssh/config. */
-    if (ssh_options_parse_config (my_ssh_session, NULL) < 0) {
-        x2goDebug << "Warning: unable to parse the SSH config file.";
+    if (ssh_options_parse_config(my_ssh_session, NULL) < 0)
+    {
+        x2goDebug << "Warning: unable to parse the SSH config file." << endl;
     }
 
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
-    ssh_options_get_port (my_ssh_session, &cur_port);
-    x2goDebug << "Session port after config file parse: " << cur_port;
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
+    ssh_options_get_port(my_ssh_session, &cur_port);
+    x2goDebug << "Session port after config file parse: " << cur_port << endl;
 #endif
 
-    rc = ssh_connect ( my_ssh_session );
-    if ( rc != SSH_OK )
+    rc = ssh_connect(my_ssh_session);
+    if (rc != SSH_OK)
     {
         return false;
     }
-//set values for remote host for proper server authentication
-    if(useproxy && proxytype==PROXYSSH)
+    //set values for remote host for proper server authentication
+    if (useproxy && proxytype == PROXYSSH)
     {
-        x2goDebug << "Connected via proxy, resetting connection values on session to " << tmpBA.data() << ":" << port;
-        ssh_options_set ( my_ssh_session, SSH_OPTIONS_HOST, tmpBA.data() );
+        x2goDebug << "Connected via proxy, resetting connection values on session to " << tmpBA.data() << ":" << port << endl;
+        ssh_options_set(my_ssh_session, SSH_OPTIONS_HOST, tmpBA.data());
 
         /*
          * The SSH port might be 0, which indicates to use the default port
@@ -834,205 +822,212 @@ bool SshMasterConnection::sshConnect()
         int work_port = port;
 
         /* Oh, yeah, and we don't really support port values of 0 for pre-0.6.0 libssh. Sorry. */
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
-        if (!work_port) {
-            ssh_session tmp_session = ssh_new ();
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
+        if (!work_port)
+        {
+            ssh_session tmp_session = ssh_new();
 
-            if (!tmp_session) {
-                QString error_msg = tr ("Cannot create SSH session.");
-                x2goDebug << error_msg;
+            if (!tmp_session)
+            {
+                QString error_msg = tr("Cannot create SSH session.");
+                x2goDebug << error_msg << endl;
                 return (false);
             }
-            else {
-                ssh_options_set (tmp_session, SSH_OPTIONS_HOST, tmpBA.data ());
+            else
+            {
+                ssh_options_set(tmp_session, SSH_OPTIONS_HOST, tmpBA.data());
 
                 /* Parse ~/.ssh/config. */
-                if (ssh_options_parse_config (tmp_session, NULL) < 0) {
-                    x2goDebug << "Warning: unable to parse the SSH config file.";
+                if (ssh_options_parse_config(tmp_session, NULL) < 0)
+                {
+                    x2goDebug << "Warning: unable to parse the SSH config file." << endl;
                 }
 
                 unsigned int inferred_port = 0;
-                ssh_options_get_port (tmp_session, &inferred_port);
-                x2goDebug << "Fetched inferred session port: " << inferred_port;
+                ssh_options_get_port(tmp_session, &inferred_port);
+                x2goDebug << "Fetched inferred session port: " << inferred_port << endl;
 
                 work_port = inferred_port & 0xFFFF;
 
-                ssh_free (tmp_session);
+                ssh_disconnect(tmp_session);
+                ssh_free(tmp_session);
             }
         }
 #endif
 
-        ssh_options_set ( my_ssh_session, SSH_OPTIONS_PORT, &work_port );
+        ssh_options_set(my_ssh_session, SSH_OPTIONS_PORT, &work_port);
     }
 
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
-    ssh_options_get_port (my_ssh_session, &cur_port);
-    x2goDebug << "Session port before config file parse (part 2): " << cur_port;
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
+    ssh_options_get_port(my_ssh_session, &cur_port);
+    x2goDebug << "Session port before config file parse (part 2): " << cur_port << endl;
 #endif
 
     /* Parse ~/.ssh/config. */
-    if (ssh_options_parse_config (my_ssh_session, NULL) < 0) {
-        x2goDebug << "Warning: unable to parse the SSH config file.";
+    if (ssh_options_parse_config(my_ssh_session, NULL) < 0)
+    {
+        x2goDebug << "Warning: unable to parse the SSH config file." << endl;
     }
 
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
-    ssh_options_get_port (my_ssh_session, &cur_port);
-    x2goDebug << "Session port after config file parse (part 2): " << cur_port;
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
+    ssh_options_get_port(my_ssh_session, &cur_port);
+    x2goDebug << "Session port after config file parse (part 2): " << cur_port << endl;
 #endif
 
     return true;
 }
 
-
 void SshMasterConnection::writeKnownHosts(bool write)
 {
     writeHostKeyMutex.lock();
-    writeHostKeyReady=true;
-    writeHostKey=write;
-    if(!write)
+    writeHostKeyReady = true;
+    writeHostKey = write;
+    if (!write)
     {
-        breakLoop=true;
+        breakLoop = true;
         emit serverAuthAborted();
     }
     writeHostKeyMutex.unlock();
-
 }
 
-
-int SshMasterConnection::serverAuth ( QString& errorMsg )
+int SshMasterConnection::serverAuth(QString &errorMsg)
 {
-    x2goDebug<<"cserverAuth";
+    x2goDebug << "cserverAuth" << endl;
 
     int state = SSH_SERVER_ERROR;
     unsigned char *hash = NULL;
     char *hexa = NULL;
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
-    ssh_key srv_pubkey = { 0 };
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
+    ssh_key srv_pubkey = {0};
     int rc = SSH_ERROR;
     size_t hlen = 0;
 #else
     int hlen = 0;
 #endif
 
-    state = ssh_is_server_known ( my_ssh_session );
+    state = ssh_is_server_known(my_ssh_session);
 
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 8, 0)
-    rc = ssh_get_server_publickey (my_ssh_session, &srv_pubkey);
-#else /* LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 8, 0) */
-    rc = ssh_get_publickey (my_ssh_session, &srv_pubkey);
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 8, 0)
+    rc = ssh_get_server_publickey(my_ssh_session, &srv_pubkey);
+#else  /* LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 8, 0) */
+    rc = ssh_get_server_publickey(my_ssh_session, &srv_pubkey);
+    if (SSH_OK != rc)
+    {
+        return (SSH_SERVER_ERROR);
+    }
 #endif /* LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 8, 0) */
 
-    if (SSH_OK != rc) {
+    if (SSH_OK != rc)
+    {
         return (SSH_SERVER_ERROR);
     }
 
-    rc = ssh_get_publickey_hash (srv_pubkey, SSH_PUBLICKEY_HASH_SHA1, &hash, &hlen);
-    ssh_key_free (srv_pubkey);
+    rc = ssh_get_publickey_hash(srv_pubkey, SSH_PUBLICKEY_HASH_SHA1, &hash, &hlen);
+    ssh_key_free(srv_pubkey);
 
-    if (0 != rc) {
+    if (0 != rc)
+    {
         return (SSH_SERVER_ERROR);
     }
 #else
-    hlen = ssh_get_pubkey_hash ( my_ssh_session, &hash );
+    hlen = ssh_get_pubkey_hash(my_ssh_session, &hash);
 #endif
 
-    if ( 0 >= hlen )
+    if (0 >= hlen)
         return SSH_SERVER_ERROR;
 
-    x2goDebug<<"state: "<<state<<endl;
+    x2goDebug << "state: " << state << endl;
 
-    switch ( state )
+    switch (state)
     {
     case SSH_SERVER_KNOWN_OK:
         break; /* ok */
 
     case SSH_SERVER_KNOWN_CHANGED:
-        hexa = ssh_get_hexa ( hash, hlen );
-        errorMsg=host+":"+QString::number(port)+" - "+hexa;
-        ssh_string_free_char ( hexa );
+        hexa = ssh_get_hexa(hash, hlen);
+        errorMsg = host + ":" + QString::number(port) + " - " + hexa;
+        ssh_string_free_char(hexa);
         break;
     case SSH_SERVER_FOUND_OTHER:
         break;
     case SSH_SERVER_FILE_NOT_FOUND:
     case SSH_SERVER_NOT_KNOWN:
-        if ( !acceptUnknownServers )
+        if (!acceptUnknownServers)
         {
-            hexa = ssh_get_hexa ( hash, hlen );
-            errorMsg=host+":"+QString::number(port)+" - "+hexa;
-            ssh_string_free_char ( hexa );
+            hexa = ssh_get_hexa(hash, hlen);
+            errorMsg = host + ":" + QString::number(port) + " - " + hexa;
+            ssh_string_free_char(hexa);
             break;
         }
-        ssh_write_knownhost ( my_ssh_session );
-        state=SSH_SERVER_KNOWN_OK;
+        ssh_write_knownhost(my_ssh_session);
+        state = SSH_SERVER_KNOWN_OK;
         break;
 
     case SSH_SERVER_ERROR:
-        errorMsg=host+":"+QString::number(port)+" - "+ssh_get_error ( my_ssh_session );
+        errorMsg = host + ":" + QString::number(port) + " - " + ssh_get_error(my_ssh_session);
         break;
     }
-    ssh_clean_pubkey_hash ( &hash );
+    ssh_clean_pubkey_hash(&hash);
     return state;
 }
 
 void SshMasterConnection::setVerficationCode(QString code)
 {
-    challengeAuthVerificationCode=code;
+    challengeAuthVerificationCode = code;
 }
 
-
-
 bool SshMasterConnection::userAuthKeyboardInteractive(QString prompt)
 {
-    x2goDebug<<"Open Interaction dialog to complete authentication";
+    x2goDebug << "Open Interaction dialog to complete authentication" << endl;
     emit startInteraction(this, prompt);
-    interactionInterrupt=false;
-    interactionInputText=QString::null;
-    int rez=SSH_AUTH_INFO;
-    bool firstLoop=true;
-    int prompts=1;
+    interactionInterrupt = false;
+    interactionInputText = QString::null;
+    int rez = SSH_AUTH_INFO;
+    bool firstLoop = true;
+    int prompts = 1;
     QString instruction;
-    while (rez==SSH_AUTH_INFO)
+    while (rez == SSH_AUTH_INFO)
     {
 
-        if(firstLoop)
+        if (firstLoop)
         {
-            firstLoop=false;
+            firstLoop = false;
         }
         else
         {
-            prompts=ssh_userauth_kbdint_getnprompts(my_ssh_session);
-            if(prompts>0)
-                emit updateInteraction(this, ssh_userauth_kbdint_getprompt(my_ssh_session,0,NULL));
+            prompts = ssh_userauth_kbdint_getnprompts(my_ssh_session);
+            if (prompts > 0)
+                emit updateInteraction(this, ssh_userauth_kbdint_getprompt(my_ssh_session, 0, NULL));
 
-            QString name= ssh_userauth_kbdint_getname(my_ssh_session);
+            QString name = ssh_userauth_kbdint_getname(my_ssh_session);
             instruction = ssh_userauth_kbdint_getinstruction(my_ssh_session);
-            x2goDebug<<"Have prompts: "<<prompts<<endl;
-            x2goDebug<<"Name: "<<name<<endl;
-            x2goDebug<<"Instruction: "<<instruction<<endl;
+            x2goDebug << "Have prompts: " << prompts << endl;
+            x2goDebug << "Name: " << name << endl;
+            x2goDebug << "Instruction: " << instruction << endl;
         }
-        if(prompts>0)
+        if (prompts > 0)
         {
-            while(true)
+            while (true)
             {
                 bool interrupt;
                 interactionInputMutex.lock();
-                interrupt=interactionInterrupt;
-                QString textToSend=interactionInputText;
-                interactionInputText=QString::null;
+                interrupt = interactionInterrupt;
+                QString textToSend = interactionInputText;
+                interactionInputText = QString::null;
                 interactionInputMutex.unlock();
-                if(textToSend.length()>0)
+                if (textToSend.length() > 0)
                 {
-                    x2goDebug<<"SEND Input to SERVER";
-                    textToSend.replace("\n","");
-                    ssh_userauth_kbdint_setanswer(my_ssh_session,0,textToSend.toLocal8Bit());
+                    x2goDebug << "SEND Input to SERVER" << endl;
+                    textToSend.replace("\n", "");
+                    ssh_userauth_kbdint_setanswer(my_ssh_session, 0, textToSend.toLocal8Bit());
                     break;
                 }
-                if(interrupt)
+                if (interrupt)
                 {
-                    x2goDebug<<"Keyboard authentication failed";
-//         QString err=ssh_get_error ( my_ssh_session );
-                    authErrors<<"NO_ERROR";
+                    x2goDebug << "Keyboard authentication failed" << endl;
+                    //         QString err=ssh_get_error ( my_ssh_session );
+                    authErrors << "NO_ERROR";
                     emit finishInteraction(this);
 
                     return false;
@@ -1041,159 +1036,163 @@ bool SshMasterConnection::userAuthKeyboardInteractive(QString prompt)
             }
         }
 
-        rez=ssh_userauth_kbdint(my_ssh_session, NULL, NULL);
-
+        rez = ssh_userauth_kbdint(my_ssh_session, NULL, NULL);
     }
-    if(rez==SSH_AUTH_SUCCESS)
+    if (rez == SSH_AUTH_SUCCESS)
     {
-        x2goDebug<<"Keyboard authentication successful";
+        x2goDebug << "Keyboard authentication successful" << endl;
         emit finishInteraction(this);
         return true;
     }
-    if(rez==SSH_AUTH_DENIED)
+    if (rez == SSH_AUTH_DENIED)
     {
-        x2goDebug<<"Keyboard authentication failed";
-        QString err=ssh_get_error ( my_ssh_session );
-        if(instruction.length()>0)
+        x2goDebug << "Keyboard authentication failed" << endl;
+        QString err = ssh_get_error(my_ssh_session);
+        if (instruction.length() > 0)
         {
-            authErrors<<instruction;
+            authErrors << instruction;
         }
-        authErrors<<err;
+        authErrors << err;
         emit finishInteraction(this);
 
         return false;
     }
 
-    QString err=ssh_get_error ( my_ssh_session );
-    authErrors<<err;
+    QString err = ssh_get_error(my_ssh_session);
+    authErrors << err;
 
     return false;
-
 }
 
-
-
 bool SshMasterConnection::userChallengeAuth()
 {
-    int rez=ssh_userauth_kbdint(my_ssh_session, NULL, NULL);
+    int rez = ssh_userauth_kbdint(my_ssh_session, NULL, NULL);
     int prompts;
 
-    switch( rez)
+    switch (rez)
     {
     case SSH_AUTH_INFO:
-        prompts=ssh_userauth_kbdint_getnprompts(my_ssh_session);
-        x2goDebug<<"Have prompts: "<<prompts<<endl;
-        if(prompts)
+        prompts = ssh_userauth_kbdint_getnprompts(my_ssh_session);
+        x2goDebug << "Have prompts: " << prompts << endl;
+        if (prompts)
         {
-            const char *prompt= ssh_userauth_kbdint_getprompt(my_ssh_session,0,NULL);
-            x2goDebug<<"Prompt[0]: |"<<prompt<<"|"<<endl;
-            QString pr=prompt;
-            if(pr.startsWith ("Password:"))
+            const char *prompt = ssh_userauth_kbdint_getprompt(my_ssh_session, 0, NULL);
+            x2goDebug << "Prompt[0]: |" << prompt << "|" << endl;
+            QString pr = prompt;
+            if (pr.startsWith("Password:"))
             {
-                x2goDebug<<"Password request"<<endl;
-                ssh_userauth_kbdint_setanswer(my_ssh_session,0,pass.toLatin1());
+                x2goDebug << "Password request" << endl;
+                ssh_userauth_kbdint_setanswer(my_ssh_session, 0, pass.toLatin1());
                 return userChallengeAuth();
             }
 
             bool has_challenge_auth_code_prompt = false;
             bool need_to_display_auth_code_prompt = false;
-            const std::size_t challenge_auth_code_prompts_size = (sizeof (challenge_auth_code_prompts_)/sizeof (*challenge_auth_code_prompts_));
+            const std::size_t challenge_auth_code_prompts_size = (sizeof(challenge_auth_code_prompts_) / sizeof(*challenge_auth_code_prompts_));
 
-            if (pr.contains ("challenge", Qt::CaseInsensitive)) {
-              x2goDebug << "prompt contains 'challenge': " << pr << endl;
-              has_challenge_auth_code_prompt = true;
-              need_to_display_auth_code_prompt = true;
+            if (pr.contains("challenge", Qt::CaseInsensitive))
+            {
+                x2goDebug << "prompt contains 'challenge': " << pr << endl;
+                has_challenge_auth_code_prompt = true;
+                need_to_display_auth_code_prompt = true;
             }
-            else {
-              for (std::size_t i = 0; i < challenge_auth_code_prompts_size; ++i) {
-                x2goDebug << "Checking against known prompt #" << i << ": " << challenge_auth_code_prompts_[i] << endl;
+            else
+            {
+                for (std::size_t i = 0; i < challenge_auth_code_prompts_size; ++i)
+                {
+                    x2goDebug << "Checking against known prompt #" << i << ": " << challenge_auth_code_prompts_[i] << endl;
 
-                /* Ignore "garbage" at the start of the string, but require at least one line to start with a known prompt. */
-                QStringList tmp_str_list = pr.split ("\n", QString::SkipEmptyParts);
+                    /* Ignore "garbage" at the start of the string, but require at least one line to start with a known prompt. */
+                    QStringList tmp_str_list = pr.split("\n", QString::SkipEmptyParts);
 
-                for (QStringList::const_iterator cit = tmp_str_list.constBegin (); cit != tmp_str_list.constEnd (); ++cit) {
-                  if ((*cit).startsWith (challenge_auth_code_prompts_[i])) {
-                    has_challenge_auth_code_prompt = true;
-                    break;
-                  }
-                }
+                    for (QStringList::const_iterator cit = tmp_str_list.constBegin(); cit != tmp_str_list.constEnd(); ++cit)
+                    {
+                        if ((*cit).startsWith(challenge_auth_code_prompts_[i]))
+                        {
+                            has_challenge_auth_code_prompt = true;
+                            break;
+                        }
+                    }
 
-                /* Skip over other challenge auth code prompts if we found one already. */
-                if (has_challenge_auth_code_prompt) {
-                  break;
+                    /* Skip over other challenge auth code prompts if we found one already. */
+                    if (has_challenge_auth_code_prompt)
+                    {
+                        break;
+                    }
                 }
-              }
             }
 
-            if (has_challenge_auth_code_prompt) {
-                x2goDebug<<"Verification code request"<<endl;
+            if (has_challenge_auth_code_prompt)
+            {
+                x2goDebug << "Verification code request" << endl;
 
-                challengeAuthPasswordAccepted=true;
-                if(challengeAuthVerificationCode == QString::null)
+                challengeAuthPasswordAccepted = true;
+                if (challengeAuthVerificationCode == QString::null)
                 {
-                    keyPhraseReady=false;
-                    if (need_to_display_auth_code_prompt) {
-                      emit needChallengeResponse(this, pr);
-                    } else {
-                      emit needPassPhrase(this, PASSPHRASE_CHALLENGE);
+                    keyPhraseReady = false;
+                    if (need_to_display_auth_code_prompt)
+                    {
+                        emit needChallengeResponse(this, pr);
                     }
-                    for(;;)
+                    else
                     {
-                        bool ready=false;
+                        emit needPassPhrase(this, PASSPHRASE_CHALLENGE);
+                    }
+                    for (;;)
+                    {
+                        bool ready = false;
                         this->usleep(200);
                         keyPhraseMutex.lock();
-                        if(keyPhraseReady)
-                            ready=true;
+                        if (keyPhraseReady)
+                            ready = true;
                         keyPhraseMutex.unlock();
-                        if(ready)
+                        if (ready)
                             break;
                     }
-                    challengeAuthVerificationCode=keyPhrase;
-                    if(challengeAuthVerificationCode==QString::null)
+                    challengeAuthVerificationCode = keyPhrase;
+                    if (challengeAuthVerificationCode == QString::null)
                     {
-                        authErrors<<tr("Authentication failed.");
+                        authErrors << tr("Authentication failed.");
                         return false;
                     }
                 }
-                ssh_userauth_kbdint_setanswer(my_ssh_session,0,challengeAuthVerificationCode.toLatin1());
+                ssh_userauth_kbdint_setanswer(my_ssh_session, 0, challengeAuthVerificationCode.toLatin1());
                 return userChallengeAuth();
             }
             else
-	    {
-	        return userAuthKeyboardInteractive(prompt);
-	    }
+            {
+                return userAuthKeyboardInteractive(prompt);
+            }
         }
         else
         {
             return userChallengeAuth();
         }
     case SSH_AUTH_SUCCESS:
-        x2goDebug<<"Challenge authentication OK."<<endl;
+        x2goDebug << "Challenge authentication OK." << endl;
         return true;
     case SSH_AUTH_DENIED:
-        if(!challengeAuthPasswordAccepted )
+        if (!challengeAuthPasswordAccepted)
         {
-            QString err=ssh_get_error ( my_ssh_session );
-            authErrors<<err;
+            QString err = ssh_get_error(my_ssh_session);
+            authErrors << err;
             return false;
         }
         else
         {
-            challengeAuthVerificationCode=QString::null;
+            challengeAuthVerificationCode = QString::null;
             //try with another verification code
             return userChallengeAuth();
         }
     default:
-        QString err=ssh_get_error ( my_ssh_session );
-        authErrors<<err;
+        QString err = ssh_get_error(my_ssh_session);
+        authErrors << err;
 
         return false;
     }
     return false;
-
 }
 
-
 bool SshMasterConnection::userAuthWithPass()
 {
     bool ret = false;
@@ -1203,107 +1202,117 @@ bool SshMasterConnection::userAuthWithPass()
 
     int method = ssh_userauth_list(my_ssh_session, NULL);
 
-    if (method & SSH_AUTH_METHOD_INTERACTIVE) {
+    if (method & SSH_AUTH_METHOD_INTERACTIVE)
+    {
         x2goDebug << "Challenge authentication requested." << endl;
 
         challengeAuthPasswordAccepted = false;
-        ret = userChallengeAuth ();
+        ret = userChallengeAuth();
 
-        if (!ret) {
+        if (!ret)
+        {
             x2goDebug << "Challenge authentication failed." << endl;
         }
     }
 
-    if (!ret) {
+    if (!ret)
+    {
         x2goDebug << "Trying password mechanism if available." << endl;
     }
 
-    if ((!ret) && (method & SSH_AUTH_METHOD_PASSWORD)) {
+    if ((!ret) && (method & SSH_AUTH_METHOD_PASSWORD))
+    {
         x2goDebug << "Password mechanism available. Continuing." << endl;
 
         QString auth_password = pass;
 
-        if (auth_password.isEmpty ()) {
+        if (auth_password.isEmpty())
+        {
             keyPhraseReady = false;
-            emit needPassPhrase (this, PASSPHRASE_PASSWORD);
+            emit needPassPhrase(this, PASSPHRASE_PASSWORD);
 
-            for (bool ready = false; !ready;) {
-                this->usleep (200);
+            for (bool ready = false; !ready;)
+            {
+                this->usleep(200);
 
-                keyPhraseMutex.lock ();
+                keyPhraseMutex.lock();
                 ready = keyPhraseReady;
-                keyPhraseMutex.unlock ();
+                keyPhraseMutex.unlock();
             }
 
-            if (keyPhrase.isNull ()) {
+            if (keyPhrase.isNull())
+            {
                 authErrors << "No password provided.";
                 return (ret);
             }
-            else {
+            else
+            {
                 auth_password = keyPhrase;
             }
         }
-        int rc = ssh_userauth_password (my_ssh_session, NULL, auth_password.toLatin1 ());
-        if ( rc != SSH_AUTH_SUCCESS )
+        int rc = ssh_userauth_password(my_ssh_session, NULL, auth_password.toLatin1());
+        if (rc != SSH_AUTH_SUCCESS)
         {
-            QString err=ssh_get_error ( my_ssh_session );
-            authErrors<<err;
+            QString err = ssh_get_error(my_ssh_session);
+            authErrors << err;
             x2goDebug << "Password authentication failed: " << err << endl;
         }
-        else {
+        else
+        {
             ret = true;
         }
     }
 
-    if ((!ret) && (method & ~SSH_AUTH_METHOD_PASSWORD)) {
+    if ((!ret) && !(method & SSH_AUTH_METHOD_PASSWORD))
+    {
         /* In case password auth is disabled, make sure the error message is not empty. */
-        QString err = ssh_get_error (my_ssh_session);
+        QString err = ssh_get_error(my_ssh_session);
         authErrors << err;
         x2goDebug << "Password authentication not available: " << err << endl;
     }
 
-    return (ret);
+    return ret;
 }
 
-
 bool SshMasterConnection::userAuthAuto()
 {
-    int rc = ssh_userauth_autopubkey ( my_ssh_session, "" );
-    int i=0;
-    while(rc != SSH_AUTH_SUCCESS)
+    int rc = ssh_userauth_autopubkey(my_ssh_session, "");
+    int i = 0;
+    while (rc != SSH_AUTH_SUCCESS)
     {
-        if (SSH_AUTH_DENIED == rc) {
-          /* No need to continue, all keys have been rejected by the server. */
-          break;
+        if (SSH_AUTH_DENIED == rc)
+        {
+            /* No need to continue, all keys have been rejected by the server. */
+            break;
         }
 
         /* This section should only be executed if rc is SSH_AUTH_ERROR. */
-        keyPhraseReady=false;
+        keyPhraseReady = false;
         emit needPassPhrase(this, PASSPHRASE_PRIVKEY);
-        for(;;)
+        for (;;)
         {
-            bool ready=false;
+            bool ready = false;
             this->usleep(200);
             keyPhraseMutex.lock();
-            if(keyPhraseReady)
-                ready=true;
+            if (keyPhraseReady)
+                ready = true;
             keyPhraseMutex.unlock();
-            if(ready)
+            if (ready)
                 break;
         }
-        if(keyPhrase==QString::null)
+        if (keyPhrase == QString::null)
             break;
-        rc = ssh_userauth_autopubkey ( my_ssh_session, keyPhrase.toLatin1() );
-        if(i++==2)
+        rc = ssh_userauth_autopubkey(my_ssh_session, keyPhrase.toLatin1());
+        if (i++ == 2)
         {
             break;
         }
     }
 
-    if ( rc != SSH_AUTH_SUCCESS )
+    if (rc != SSH_AUTH_SUCCESS)
     {
-        QString err=ssh_get_error ( my_ssh_session );
-        authErrors<<err;
+        QString err = ssh_get_error(my_ssh_session);
+        authErrors << err;
         x2goDebug << "userAuthAuto failed:" << err << " (code " << rc << ")" << endl;
         return false;
     }
@@ -1313,37 +1322,36 @@ bool SshMasterConnection::userAuthAuto()
 void SshMasterConnection::setKeyPhrase(QString phrase)
 {
     keyPhraseMutex.lock();
-    keyPhrase=phrase;
-    keyPhraseReady=true;
+    keyPhrase = phrase;
+    keyPhraseReady = true;
     keyPhraseMutex.unlock();
 }
 
-
 bool SshMasterConnection::userAuthWithKey()
 {
-    x2goDebug<<"Trying to authenticate user with private key.";
-    QString keyName=key;
-    bool autoRemove=false;
-    if ( key.indexOf ( "PRIVATE KEY" ) !=-1 )
+    x2goDebug << "Trying to authenticate user with private key.";
+    QString keyName = key;
+    bool autoRemove = false;
+    if (key.indexOf("PRIVATE KEY") != -1)
     {
         QDir dr;
-        QString keyPath=mainWnd->getHomeDirectory() +"/.x2go/ssh/gen";
-        dr.mkpath ( keyPath );
-        QTemporaryFile fl ( keyPath+"/key" );
+        QString keyPath = mainWnd->getHomeDirectory() + "/.x2go/ssh/gen";
+        dr.mkpath(keyPath);
+        QTemporaryFile fl(keyPath + "/key");
         fl.open();
-        keyName=fl.fileName();
-        fl.setAutoRemove ( false );
-        QTextStream out ( &fl );
-        out<<key;
+        keyName = fl.fileName();
+        fl.setAutoRemove(false);
+        QTextStream out(&fl);
+        out << key;
         fl.close();
-        autoRemove=true;
-        x2goDebug<<"Temporarily saved key in "<<keyName;
+        autoRemove = true;
+        x2goDebug << "Temporarily saved key in " << keyName;
     }
 
-    QByteArray tmp_ba = keyName.toLocal8Bit ();
+    QByteArray tmp_ba = keyName.toLocal8Bit();
 
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
-    ssh_key priv_key = { 0 };
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
+    ssh_key priv_key = {0};
 
     /*
      * Passing an empty string as a passphrase parameter is a workaround for inconsistent
@@ -1356,166 +1364,175 @@ bool SshMasterConnection::userAuthWithKey()
      * passphrase on a terminal (and the client not reacting to any input while this
      * happens), so work around this inconsistency by providing an empty passphrase.
      */
-    int rc = ssh_pki_import_privkey_file (tmp_ba.data (), "", NULL, NULL, &priv_key);
+    int rc = ssh_pki_import_privkey_file(tmp_ba.data(), "", NULL, NULL, &priv_key);
 
-    if (SSH_EOF == rc) {
+    if (SSH_EOF == rc)
+    {
         x2goDebug << "Failed to get private key from " << keyName << "; file does not exist.";
 
-        ssh_key_free (priv_key);
+        ssh_key_free(priv_key);
 
         return (false);
     }
-    else if (SSH_OK != rc) {
+    else if (SSH_OK != rc)
+    {
         x2goDebug << "Failed to get private key from " << keyName << "; trying to query passphrase.";
 
-        ssh_key_free (priv_key);
+        ssh_key_free(priv_key);
         priv_key = NULL;
     }
 #else
     /* This is TOCTU, but forced upon us by libssh's legacy function. */
     {
-      QFile tmp_file (keyName);
-      if (tmp_file.open (QIODevice::ReadOnly)) {
-        tmp_file.close ();
-      }
-      else {
-        /* Don't pass invalid files to privatekey_from_file () - it crashes in this case. */
-        return (false);
-      }
+        QFile tmp_file(keyName);
+        if (tmp_file.open(QIODevice::ReadOnly))
+        {
+            tmp_file.close();
+        }
+        else
+        {
+            /* Don't pass invalid files to privatekey_from_file () - it crashes in this case. */
+            return (false);
+        }
     }
-    ssh_private_key priv_key = privatekey_from_file (my_ssh_session, tmp_ba.data (), 0, NULL);
+    ssh_private_key priv_key = privatekey_from_file(my_ssh_session, tmp_ba.data(), 0, NULL);
 #endif
 
-    int i=0;
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
+    int i = 0;
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
     while (SSH_OK != rc)
 #else
     while (!priv_key)
 #endif
     {
-        keyPhraseReady=false;
+        keyPhraseReady = false;
         emit needPassPhrase(this, PASSPHRASE_PRIVKEY);
-        for(;;)
+        for (;;)
         {
-            bool ready=false;
+            bool ready = false;
             this->usleep(200);
             keyPhraseMutex.lock();
-            if(keyPhraseReady)
-                ready=true;
+            if (keyPhraseReady)
+                ready = true;
             keyPhraseMutex.unlock();
-            if(ready)
+            if (ready)
                 break;
         }
-        if(keyPhrase==QString::null)
+        if (keyPhrase == QString::null)
             break;
 
-        QByteArray tmp_ba_passphrase = keyPhrase.toLocal8Bit ();
+        QByteArray tmp_ba_passphrase = keyPhrase.toLocal8Bit();
 
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
-        rc = ssh_pki_import_privkey_file (tmp_ba.data (), tmp_ba_passphrase.data (), NULL, NULL, &priv_key);
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
+        rc = ssh_pki_import_privkey_file(tmp_ba.data(), tmp_ba_passphrase.data(), NULL, NULL, &priv_key);
 
-        if (SSH_OK != rc) {
-            ssh_key_free (priv_key);
+        if (SSH_OK != rc)
+        {
+            ssh_key_free(priv_key);
             priv_key = NULL;
         }
 #else
-        priv_key = privatekey_from_file (my_ssh_session, tmp_ba.data (), 0, tmp_ba_passphrase.data ());
+        priv_key = privatekey_from_file(my_ssh_session, tmp_ba.data(), 0, tmp_ba_passphrase.data());
 #endif
 
-        if(i++==2)
+        if (i++ == 2)
         {
             break;
         }
     }
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
     if (SSH_OK != rc)
 #else
     if (!priv_key)
 #endif
     {
-        x2goDebug<<"Failed to get private key from "<<keyName;
-        if ( autoRemove )
-            QFile::remove ( keyName );
+        x2goDebug << "Failed to get private key from " << keyName << endl;
+        if (autoRemove)
+            QFile::remove(keyName);
         return false;
     }
 
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
-    ssh_key pub_key = { 0 };
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
+    ssh_key pub_key = {0};
 
-    rc = ssh_pki_export_privkey_to_pubkey (priv_key, &pub_key);
+    rc = ssh_pki_export_privkey_to_pubkey(priv_key, &pub_key);
 #else
-    ssh_public_key pub_key = publickey_from_privatekey (priv_key);
+    ssh_public_key pub_key = publickey_from_privatekey(priv_key);
 #endif
 
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
     if (SSH_OK != rc)
 #else
     if (!pub_key)
 #endif
     {
-        x2goDebug<<"Failed to get public key from private key.";
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
-        ssh_key_free (priv_key);
+        x2goDebug << "Failed to get public key from private key." << endl;
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
+        ssh_key_free(priv_key);
         priv_key = NULL;
 
-        ssh_key_free (pub_key);
+        ssh_key_free(pub_key);
         pub_key = NULL;
 #else
         privatekey_free(priv_key);
 #endif
-        if ( autoRemove )
-            QFile::remove ( keyName );
+        if (autoRemove)
+            QFile::remove(keyName);
         return false;
     }
 
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
-    do {
-        rc = ssh_userauth_try_publickey (my_ssh_session, NULL, pub_key);
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
+    do
+    {
+        rc = ssh_userauth_try_publickey(my_ssh_session, NULL, pub_key);
     } while (SSH_AUTH_AGAIN == rc);
 
-    ssh_key_free (pub_key);
+    ssh_key_free(pub_key);
     pub_key = NULL;
 
     /* FIXME: handle SSH_AUTH_PARTIAL correctly! */
-    if (SSH_AUTH_SUCCESS != rc) {
-        x2goDebug << "Unable to authenticate with public key.";
+    if (SSH_AUTH_SUCCESS != rc)
+    {
+        x2goDebug << "Unable to authenticate with public key." << endl;
 
-        ssh_key_free (priv_key);
+        ssh_key_free(priv_key);
         priv_key = NULL;
 
-        if (autoRemove) {
-            QFile::remove (keyName);
+        if (autoRemove)
+        {
+            QFile::remove(keyName);
         }
 
         return (false);
     }
 
-    do {
-        rc = ssh_userauth_publickey (my_ssh_session, NULL, priv_key);
+    do
+    {
+        rc = ssh_userauth_publickey(my_ssh_session, NULL, priv_key);
     } while (SSH_AUTH_AGAIN == rc);
 
-    ssh_key_free (priv_key);
+    ssh_key_free(priv_key);
     priv_key = NULL;
 #else
-    ssh_string pubkeyStr=publickey_to_string(pub_key);
+    ssh_string pubkeyStr = publickey_to_string(pub_key);
     publickey_free(pub_key);
-    int rc=ssh_userauth_pubkey(my_ssh_session, NULL, pubkeyStr, priv_key);
+    int rc = ssh_userauth_pubkey(my_ssh_session, NULL, pubkeyStr, priv_key);
     privatekey_free(priv_key);
     ssh_string_free(pubkeyStr);
 #endif
 
-    x2goDebug<<"Authenticating with key: "<<rc<<endl;
+    x2goDebug << "Authenticating with key: " << rc << endl;
 
-    if ( autoRemove )
-        QFile::remove ( keyName );
+    if (autoRemove)
+        QFile::remove(keyName);
 
     /* FIXME: handle SSH_AUTH_PARTIAL correctly! */
-    if ( rc != SSH_AUTH_SUCCESS )
+    if (rc != SSH_AUTH_SUCCESS)
     {
-        QString err=ssh_get_error ( my_ssh_session );
-        authErrors<<err;
+        QString err = ssh_get_error(my_ssh_session);
+        authErrors << err;
 
-        x2goDebug<<"userAuthWithKey failed:" <<err<<endl;
+        x2goDebug << "userAuthWithKey failed:" << err << endl;
 
         return false;
     }
@@ -1556,14 +1573,17 @@ bool SshMasterConnection::userAuthKrb()
     local_cmd = "ssh";
 
     /* Kerberos options. */
-    local_args << "-o" << "GSSApiAuthentication=yes"
-               << "-o" << "PasswordAuthentication=no"
-               << "-o" << "PubkeyAuthentication=no";
+    local_args << "-o"
+               << "GSSApiAuthentication=yes"
+               << "-o"
+               << "PasswordAuthentication=no"
+               << "-o"
+               << "PubkeyAuthentication=no";
 
     /* Port option. Must be the last one added! */
     local_args << "-p";
 #endif
-    local_args << QString::number (port)
+    local_args << QString::number(port)
                << "-l" << user
                << host;
 
@@ -1576,125 +1596,123 @@ bool SshMasterConnection::userAuthKrb()
      */
     local_args << shcmd;
 
-    x2goDebug << "Starting ssh:" << local_cmd << " " << local_args.join (" ") << endl;
-    ssh.start (local_cmd, local_args);
-
+    x2goDebug << "Starting ssh:" << local_cmd << " " << local_args.join(" ") << endl;
+    ssh.start(local_cmd, local_args);
 
     if (!ssh.waitForStarted(5000))
     {
-        sshProcErrString=ssh.errorString();
-        authErrors<<sshProcErrString;
-        x2goDebug<<"SSH start failed:" <<sshProcErrString<<endl;
+        sshProcErrString = ssh.errorString();
+        authErrors << sshProcErrString;
+        x2goDebug << "SSH start failed:" << sshProcErrString << endl;
         return false;
     }
     if (!ssh.waitForFinished(20000))
     {
-        sshProcErrString=ssh.errorString();
-        authErrors<<tr("Failed to start SSH client. Please check your installation and GSSApi configuration.");
-        authErrors<<sshProcErrString;
-        x2goDebug<<"SSH did not finish:" <<sshProcErrString<<endl;
+        sshProcErrString = ssh.errorString();
+        authErrors << tr("Failed to start SSH client. Please check your installation and GSSApi configuration.");
+        authErrors << sshProcErrString;
+        x2goDebug << "SSH did not finish:" << sshProcErrString << endl;
 
         return false;
     }
-    QString outp=ssh.readAllStandardOutput();
-    QString err=ssh.readAllStandardError();
-    x2goDebug<<"SSH exited.";
-    x2goDebug<<"stdout: "<<outp<<endl;
-    x2goDebug<<"stderr: "<<err<<endl;
-    x2goDebug<<"Exit code: "<<ssh.exitCode()<<"; status: "<<ssh.exitStatus()<<endl;
-
-    QString begin_marker = "X2GODATABEGIN:"+uuidStr+"\n";
-    QString end_marker = "X2GODATAEND:"+uuidStr+"\n";
-    int output_begin=outp.indexOf(begin_marker) + begin_marker.length();
-    int output_end=outp.indexOf(end_marker);
-    outp = outp.mid(output_begin, output_end-output_begin);
-    outp.replace("\n","");
-
-    if (ssh.exitCode() == 0 && ssh.exitStatus() == 0 && outp== user)
+    QString outp = ssh.readAllStandardOutput();
+    QString err = ssh.readAllStandardError();
+    x2goDebug << "SSH exited.";
+    x2goDebug << "stdout: " << outp << endl;
+    x2goDebug << "stderr: " << err << endl;
+    x2goDebug << "Exit code: " << ssh.exitCode() << "; status: " << ssh.exitStatus() << endl;
+
+    QString begin_marker = "X2GODATABEGIN:" + uuidStr + "\n";
+    QString end_marker = "X2GODATAEND:" + uuidStr + "\n";
+    int output_begin = outp.indexOf(begin_marker) + begin_marker.length();
+    int output_end = outp.indexOf(end_marker);
+    outp = outp.mid(output_begin, output_end - output_begin);
+    outp.replace("\n", "");
+
+    if (ssh.exitCode() == 0 && ssh.exitStatus() == 0 && outp == user)
         return true;
-    authErrors<<tr("Check your GSSApi configuration or choose another authentication method.");
+    authErrors << tr("Check your GSSApi configuration or choose another authentication method.");
     return false;
 }
 
-
 void SshMasterConnection::interactionTextEnter(QString text)
 {
-    if(sshProxy && ! sshProxyReady)
+    if (sshProxy && !sshProxyReady)
     {
         sshProxy->interactionTextEnter(text);
-	return;
+        return;
     }
     interactionInputMutex.lock();
-    interactionInputText=text;
+    interactionInputText = text;
     interactionInputMutex.unlock();
 }
 
 void SshMasterConnection::interactionInterruptSlot()
 {
-    if(sshProxy && ! sshProxyReady)
+    if (sshProxy && !sshProxyReady)
     {
         sshProxy->interactionInterruptSlot();
-	return;
+        return;
     }
     interactionInputMutex.lock();
-    interactionInterrupt=true;
+    interactionInterrupt = true;
     interactionInputMutex.unlock();
 }
 
 bool SshMasterConnection::checkLogin()
 {
-    interactionInterrupt=false;
-    interactionInputText=QString::null;
-
-
-    ssh_channel channel = ssh_channel_new ( my_ssh_session );
+    interactionInterrupt = false;
+    interactionInputText = QString::null;
 
-    if (!channel) {
-        QString err = ssh_get_error (my_ssh_session);
-        QString error_msg = tr ("%1 failed.").arg ("ssh_channel_new");
+    ssh_channel channel = ssh_channel_new(my_ssh_session);
+    if (!channel)
+    {
+        QString err = ssh_get_error(my_ssh_session);
+        QString error_msg = tr("%1 failed.").arg("ssh_channel_new");
 
-        x2goDebug << error_msg.left (error_msg.size () - 1) << ": " << err << endl;
+        x2goDebug << error_msg.left(error_msg.size() - 1) << ": " << err << endl;
         return false;
     }
-    if ( ssh_channel_open_session ( channel ) !=SSH_OK )
+    if (ssh_channel_open_session(channel) != SSH_OK)
     {
-        QString err=ssh_get_error ( my_ssh_session );
-        QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_open_session");
-        x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
+        QString err = ssh_get_error(my_ssh_session);
+        QString errorMsg = tr("%1 failed.").arg("ssh_channel_open_session");
+        x2goDebug << errorMsg.left(errorMsg.size() - 1) << ": " << err << endl;
         ssh_channel_free(channel);
         return false;
     }
-    if (ssh_channel_request_pty(channel)!=SSH_OK)
+    if (ssh_channel_request_pty(channel) != SSH_OK)
     {
-        QString err=ssh_get_error ( my_ssh_session );
-        QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_request_pty");
-        x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
+        QString err = ssh_get_error(my_ssh_session);
+        QString errorMsg = tr("%1 failed.").arg("ssh_channel_request_pty");
+        x2goDebug << errorMsg.left(errorMsg.size() - 1) << ": " << err << endl;
         ssh_channel_free(channel);
         return false;
     }
-    if(ssh_channel_change_pty_size(channel, 80, 24)!=SSH_OK)
+    if (ssh_channel_change_pty_size(channel, 80, 24) != SSH_OK)
     {
-        QString err=ssh_get_error ( my_ssh_session );
-        QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_change_pty_size");
-        x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
+        QString err = ssh_get_error(my_ssh_session);
+        QString errorMsg = tr("%1 failed.").arg("ssh_channel_change_pty_size");
+        x2goDebug << errorMsg.left(errorMsg.size() - 1) << ": " << err << endl;
         ssh_channel_free(channel);
         return false;
     }
-    if ( ssh_channel_request_exec ( channel, "echo \"LOGIN OK\"" ) != SSH_OK )
+    if (ssh_channel_request_exec(channel, "echo \"LOGIN OK\"") != SSH_OK)
     {
-        QString err=ssh_get_error ( my_ssh_session );
-        QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_request_exec");
-        x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
+        QString err = ssh_get_error(my_ssh_session);
+        QString errorMsg = tr("%1 failed.").arg("ssh_channel_request_exec");
+        x2goDebug << errorMsg.left(errorMsg.size() - 1) << ": " << err << endl;
         ssh_channel_free(channel);
+        return false;
     }
     else
     {
-        char buffer[1024*512]; //512K buffer
-        bool hasInterraction=true;
-	bool interactionStarted=false;
-//         x2goDebug<<"CHECK LOGIN channel created."<<endl;
+        char buffer[1024 * 512]; //512K buffer
+        bool hasInterraction = true;
+        bool interactionStarted = false;
+        //         x2goDebug<<"CHECK LOGIN channel created."<<endl;
         while (ssh_channel_is_open(channel) &&
-                !ssh_channel_is_eof(channel))
+               !ssh_channel_is_eof(channel))
         {
             int nbytes = ssh_channel_read_nonblocking(channel, buffer, sizeof(buffer), 0);
             if (nbytes < 0)
@@ -1704,194 +1722,188 @@ bool SshMasterConnection::checkLogin()
             }
             if (nbytes > 0)
             {
-                QString inf=QByteArray ( buffer,nbytes );
-                x2goDebug<<"LOGIN CHECK:"<<inf;
-                if(inf.indexOf("LOGIN OK")!=-1)
+                QString inf = QByteArray(buffer, nbytes);
+                x2goDebug << "LOGIN CHECK:" << inf;
+                if (inf.indexOf("LOGIN OK") != -1)
                 {
-		    x2goDebug<<"don't have interaction";
-                    hasInterraction=false;
-		    break;
+                    x2goDebug << "don't have interaction";
+                    hasInterraction = false;
+                    break;
                 }
                 else
-		{
-		  if(!interactionStarted)
-		  {
-		     interactionStarted=true;
-		     emit startInteraction(this, inf);
-		  }
-		  else
-		     emit updateInteraction(this,inf);
-		}
+                {
+                    if (!interactionStarted)
+                    {
+                        interactionStarted = true;
+                        emit startInteraction(this, inf);
+                    }
+                    else
+                        emit updateInteraction(this, inf);
+                }
             }
             bool interrupt;
             interactionInputMutex.lock();
-	    interrupt=interactionInterrupt;
-	    QString textToSend=interactionInputText;
-	    interactionInputText=QString::null;
-	    interactionInputMutex.unlock();
-	    if(textToSend.length()>0)
-	    {
-// 	        x2goDebug<<"SEND Input to SERVER";
-	        ssh_channel_write(channel, textToSend.toLocal8Bit().constData(), textToSend.length());
-	    }
-	    if(interrupt)
-	    {
-	        break;
-	    }
+            interrupt = interactionInterrupt;
+            QString textToSend = interactionInputText;
+            interactionInputText = QString::null;
+            interactionInputMutex.unlock();
+            if (textToSend.length() > 0)
+            {
+                // 	        x2goDebug<<"SEND Input to SERVER";
+                ssh_channel_write(channel, textToSend.toLocal8Bit().constData(), textToSend.length());
+            }
+            if (interrupt)
+            {
+                break;
+            }
             this->usleep(30);
         }
 
-        x2goDebug<<"LOOP FINISHED";
-	bool retVal=false;
-        if(!hasInterraction)
-	{
-	    x2goDebug<<"No interaction needed, continue session";
-            retVal=true;
-	}
-	else
+        x2goDebug << "LOOP FINISHED";
+        bool retVal = false;
+        if (!hasInterraction)
         {
-            sshProcErrString=tr("Reconnect session");
-            x2goDebug<<"Reconnect session";
+            x2goDebug << "No interaction needed, continue session";
+            retVal = true;
+        }
+        else
+        {
+            sshProcErrString = tr("Reconnect session");
+            x2goDebug << "Reconnect session";
         }
-        ssh_channel_close(channel);
         ssh_channel_send_eof(channel);
+        ssh_channel_close(channel);
         ssh_channel_free(channel);
-	return retVal;
-
+        return retVal;
     }
     return false;
-
 }
 
 bool SshMasterConnection::userAuth()
 {
     if (kerberos)
         return userAuthKrb();
-    if ( autologin && key=="" )
-        if ( userAuthAuto() )
+    if (autologin && key == "")
+        if (userAuthAuto())
             return true;
-    if ( key!="" )
+    if (key != "")
     {
-        if ( userAuthWithKey() )
+        if (userAuthWithKey())
             return true;
     }
     return userAuthWithPass();
 }
 
-
-void SshMasterConnection::addChannelConnection ( SshProcess* creator, int sock, QString forwardHost, int forwardPort,
-        QString localHost, int localPort, void* channel )
+void SshMasterConnection::addChannelConnection(SshProcess *creator, int sock, QString forwardHost, int forwardPort,
+                                               QString localHost, int localPort, void *channel)
 {
     ChannelConnection con;
-    con.channel= ( ssh_channel ) channel;
-    con.sock=sock;
-    con.creator=creator;
-    con.forwardHost=forwardHost;
-    con.forwardPort=forwardPort;
-    con.localHost=localHost;
-    con.localPort=localPort;
+    con.channel = (ssh_channel)channel;
+    con.sock = sock;
+    con.creator = creator;
+    con.forwardHost = forwardHost;
+    con.forwardPort = forwardPort;
+    con.localHost = localHost;
+    con.localPort = localPort;
 
     channelConnectionsMutex.lock();
-    channelConnections<<con;
+    channelConnections << con;
     channelConnectionsMutex.unlock();
 }
 
-
-void SshMasterConnection::addChannelConnection ( SshProcess* creator, QString uuid, QString cmd )
+void SshMasterConnection::addChannelConnection(SshProcess *creator, QString uuid, QString cmd)
 {
 
     ChannelConnection con;
-    con.channel=NULL;
-    con.sock=-1;
-    con.creator=creator;
-    con.command=cmd;
-    con.uuid=uuid;
+    con.channel = NULL;
+    con.sock = -1;
+    con.creator = creator;
+    con.command = cmd;
+    con.uuid = uuid;
 
     x2goDebug << "Locking SSH channel connection MUTEX.";
     channelConnectionsMutex.lock();
     x2goDebug << "Passing new channel connection object to channelConnections.";
-    channelConnections<<con;
+    channelConnections << con;
     x2goDebug << "Unlocking SSH channel connection MUTEX.";
     channelConnectionsMutex.unlock();
 }
 
-
-void SshMasterConnection::addCopyRequest ( SshProcess* creator, QString src, QString dst )
+void SshMasterConnection::addCopyRequest(SshProcess *creator, QString src, QString dst)
 {
     CopyRequest req;
-    req.src=src;
-    req.dst=dst;
-    req.creator=creator;
+    req.src = src;
+    req.dst = dst;
+    req.creator = creator;
     copyRequestMutex.lock();
-    copyRequests<<req;
+    copyRequests << req;
     copyRequestMutex.unlock();
 }
 
-
 void SshMasterConnection::copy()
 {
 
-    for ( int i=copyRequests.size()-1; i>=0; --i )
+    for (int i = copyRequests.size() - 1; i >= 0; --i)
     {
-        QStringList lst=copyRequests[i].dst.split ( "/" );
-        QString dstFile=lst.last();
+        QStringList lst = copyRequests[i].dst.split("/");
+        QString dstFile = lst.last();
         lst.removeLast();
-        QString dstPath=lst.join ( "/" );
-        x2goDebug<<"SSH Master Connection copy - dst path:"<<dstPath<<" file:"<<dstFile<<endl;
-        ssh_scp scp=ssh_scp_new ( my_ssh_session, SSH_SCP_WRITE|SSH_SCP_RECURSIVE, dstPath.toLatin1() );
-        if ( scp == NULL )
+        QString dstPath = lst.join("/");
+        x2goDebug << "SSH Master Connection copy - dst path:" << dstPath << " file:" << dstFile << endl;
+        ssh_scp scp = ssh_scp_new(my_ssh_session, SSH_SCP_WRITE | SSH_SCP_RECURSIVE, dstPath.toLatin1());
+        if (scp == NULL)
         {
-            x2goDebug<<"Error allocating SCP session: "<< ssh_get_error ( my_ssh_session ) <<endl;
+            x2goDebug << "Error allocating SCP session: " << ssh_get_error(my_ssh_session) << endl;
             return;
         }
-        int rc = ssh_scp_init ( scp );
-        if ( rc != SSH_OK )
+        int rc = ssh_scp_init(scp);
+        if (rc != SSH_OK)
         {
-            x2goDebug<<"Error initializing SCP session: "<< ssh_get_error ( my_ssh_session ) <<endl;
-            ssh_scp_free ( scp );
+            x2goDebug << "Error initializing SCP session: " << ssh_get_error(my_ssh_session) << endl;
+            ssh_scp_free(scp);
             return;
         }
-        QFile file ( copyRequests[i].src );
-        if ( !file.open ( QIODevice::ReadOnly ) )
+        QFile file(copyRequests[i].src);
+        if (!file.open(QIODevice::ReadOnly))
         {
-            QString errMsg=tr ( "Cannot open file " ) +copyRequests[i].src;
-            emit copyErr ( copyRequests[i].creator, errMsg, "" );
-            copyRequests.removeAt ( i );
-            ssh_scp_close ( scp );
-            ssh_scp_free ( scp );
+            QString errMsg = tr("Cannot open file ") + copyRequests[i].src;
+            emit copyErr(copyRequests[i].creator, errMsg, "");
+            copyRequests.removeAt(i);
+            ssh_scp_close(scp);
+            ssh_scp_free(scp);
             continue;
         }
-        QByteArray arr=file.readAll();
+        QByteArray arr = file.readAll();
         file.close();
-        rc=ssh_scp_push_file ( scp,dstFile.toLatin1(),arr.size(), 0600 );
-        if ( rc != SSH_OK )
+        rc = ssh_scp_push_file(scp, dstFile.toLatin1(), arr.size(), 0600);
+        if (rc != SSH_OK)
         {
-            QString errMsg=tr ( "Cannot create remote file " ) +copyRequests[i].dst;
-            QString serr=ssh_get_error ( my_ssh_session );
-            x2goDebug<<errMsg<<" - "<<serr<<endl;
-            emit copyErr ( copyRequests[i].creator, errMsg, serr );
-            copyRequests.removeAt ( i );
-            ssh_scp_close ( scp );
-            ssh_scp_free ( scp );
+            QString errMsg = tr("Cannot create remote file ") + copyRequests[i].dst;
+            QString serr = ssh_get_error(my_ssh_session);
+            x2goDebug << errMsg << " - " << serr << endl;
+            emit copyErr(copyRequests[i].creator, errMsg, serr);
+            copyRequests.removeAt(i);
+            ssh_scp_close(scp);
+            ssh_scp_free(scp);
             continue;
         }
-        rc=ssh_scp_write ( scp,arr.data(),arr.size() );
-        if ( rc != SSH_OK )
+        rc = ssh_scp_write(scp, arr.data(), arr.size());
+        if (rc != SSH_OK)
         {
-            QString serr=ssh_get_error ( my_ssh_session );
-            QString errMsg=tr ( "Cannot write to remote file " ) +copyRequests[i].dst;
-            x2goDebug<<errMsg<<" - "<<serr<<endl;
-            emit copyErr ( copyRequests[i].creator, errMsg, serr );
-            copyRequests.removeAt ( i );
-            ssh_scp_close ( scp );
-            ssh_scp_free ( scp );
+            QString serr = ssh_get_error(my_ssh_session);
+            QString errMsg = tr("Cannot write to remote file ") + copyRequests[i].dst;
+            x2goDebug << errMsg << " - " << serr << endl;
+            emit copyErr(copyRequests[i].creator, errMsg, serr);
+            copyRequests.removeAt(i);
+            ssh_scp_close(scp);
+            ssh_scp_free(scp);
             continue;
         }
-        emit copyOk ( copyRequests[i].creator );
-        x2goDebug<<"scp ok: "<<copyRequests[i].src<<" -> "<<user<<"@"<<host<<":"<<copyRequests[i].dst<<endl;
-        copyRequests.removeAt ( i );
-        ssh_scp_close ( scp );
-        ssh_scp_free ( scp );
+        emit copyOk(copyRequests[i].creator);
+        x2goDebug << "scp ok: " << copyRequests[i].src << " -> " << user << "@" << host << ":" << copyRequests[i].dst << endl;
+        copyRequests.removeAt(i);
+        ssh_scp_close(scp);
+        ssh_scp_free(scp);
     }
 }
 
@@ -1900,47 +1912,47 @@ void SshMasterConnection::channelLoop()
     forever
     {
         disconnectFlagMutex.lock();
-        bool disconnect=disconnectSessionFlag;
+        bool disconnect = disconnectSessionFlag;
         disconnectFlagMutex.unlock();
 
-        if ( disconnect )
+        if (disconnect)
         {
-            x2goDebug<<"Disconnecting ..."<<endl;
+            x2goDebug << "Disconnecting ..." << endl;
 
-            if (useproxy && proxytype==PROXYSSH&&sshProxy)
+            if (useproxy && proxytype == PROXYSSH && sshProxy)
             {
                 delete sshProxy;
-                sshProxy=0;
+                sshProxy = 0;
             }
 
             channelConnectionsMutex.lock();
-            x2goDebug<<"Deleting channel connections."<<endl;
-            for ( int i=0; i<channelConnections.size(); ++i )
+            x2goDebug << "Deleting channel connections." << endl;
+            for (int i = 0; i < channelConnections.size(); ++i)
             {
-                finalize ( i );
+                finalize(i);
             }
             channelConnectionsMutex.unlock();
-            x2goDebug<<"Disconnecting session."<<endl;
-            ssh_disconnect ( my_ssh_session );
-            ssh_free ( my_ssh_session );
+            x2goDebug << "Disconnecting session." << endl;
+            ssh_disconnect(my_ssh_session);
+            ssh_free(my_ssh_session);
 
-            x2goDebug<<"Deleting sockets."<<endl;
+            x2goDebug << "Deleting sockets." << endl;
             if (tcpProxySocket != NULL)
                 delete tcpProxySocket;
             if (tcpNetworkProxy != NULL)
                 delete tcpNetworkProxy;
-            x2goDebug<<"All channels closed and session disconnected. Quitting session loop."<<endl;
+            x2goDebug << "All channels closed and session disconnected. Quitting session loop." << endl;
             quit();
             return;
         }
         addReverseTunnelConnections();
         checkReverseTunnelConnections();
         copyRequestMutex.lock();
-        if ( copyRequests.size() >0 )
+        if (copyRequests.size() > 0)
             copy();
         copyRequestMutex.unlock();
 
-        char buffer[1024*512]; //512K buffer
+        char buffer[1024 * 512]; //512K buffer
         int nbytes;
         fd_set rfds;
 
@@ -1950,260 +1962,148 @@ void SshMasterConnection::channelLoop()
         tv.tv_usec = 500000;
 
         int retval;
-        int maxsock=-1;
-
+        int maxsock = -1;
 
         channelConnectionsMutex.lock();
-        if ( channelConnections.size() <=0 )
+        if (channelConnections.size() <= 0)
         {
             //             x2goDebug<<"no channel connections, waiting\n";
             channelConnectionsMutex.unlock();
-            usleep ( 500 );
+            usleep(500);
             continue;
         }
-        ssh_channel* read_chan=new ssh_channel[channelConnections.size() +1];
-        ssh_channel* out_chan=new ssh_channel[channelConnections.size() +1];
-        read_chan[channelConnections.size() ]=NULL;
+        ssh_channel *read_chan = new ssh_channel[channelConnections.size() + 1];
+        ssh_channel *out_chan = new ssh_channel[channelConnections.size() + 1];
+        read_chan[channelConnections.size()] = NULL;
 
-        FD_ZERO ( &rfds );
+        FD_ZERO(&rfds);
 
-        for ( int i=0; i<channelConnections.size(); ++i )
+        for (int i = 0; i < channelConnections.size(); ++i)
         {
-            int tcpSocket=channelConnections.at ( i ).sock;
-            if ( tcpSocket>0 )
-                FD_SET ( tcpSocket, &rfds );
-            if ( channelConnections.at ( i ).channel==0l )
+            // Try to make a channel connection
+            // TODO: Mabye a retry?
+            bool res = createChannelConnection(i, maxsock, rfds, read_chan);
+            if (!res)
             {
-                x2goDebug<<"Creating new channel."<<endl;
-                ssh_channel channel = ssh_channel_new ( my_ssh_session );
-
-                if (!channel) {
-                    QString err = ssh_get_error (my_ssh_session);
-                    /*: Argument in this context will be a function name. */
-                    QString error_msg = tr ("%1 failed.").arg ("ssh_channel_new");
-                    emit ioErr (channelConnections[i].creator, error_msg, err);
-
-                    x2goDebug << error_msg.left (error_msg.size () - 1) << ": " << err << endl;
-
-                    continue;
-                }
-                x2goDebug<<"New channel:"<<channel<<endl;
-                channelConnections[i].channel=channel;
-                if ( tcpSocket>0 )
-                {
-                    x2goDebug << "Forwarding parameters: from remote (" << channelConnections.at (i).forwardHost << ":"
-                              << channelConnections.at (i).forwardPort << ") to local ("
-                              << channelConnections.at (i).localHost << ":" << channelConnections.at (i).localPort
-                              << ")";
-
-                    /*
-                     * Cannot support config file parsing here with pre-0.6.0 libssh versions.
-                     * There's just no way to get the inferred host and port values.
-                     */
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
-                    ssh_session tmp_session = ssh_new ();
-
-                    if (!tmp_session) {
-                        QString error_msg = tr ("Cannot create SSH session.");
-                        x2goDebug << error_msg;
-                        emit ioErr (channelConnections[i].creator, error_msg, "");
-                    }
-                    else {
-                        QByteArray tmp_BA = channelConnections.at (i).forwardHost.toLocal8Bit ();
-                        const int tmp_port = channelConnections.at (i).forwardPort;
-
-                        ssh_options_set (tmp_session, SSH_OPTIONS_HOST, tmp_BA.data ());
-
-                        if (tmp_port) {
-                            ssh_options_set (tmp_session, SSH_OPTIONS_PORT, &tmp_port);
-                        }
-
-                        /* The host and port might be a shorthand and zero, so fetch the actual data. */
-                        if (ssh_options_parse_config (tmp_session, NULL) < 0) {
-                            x2goDebug << "Warning: unable to parse the SSH config file.";
-                        }
-
-                        unsigned int inferred_port = 0;
-                        ssh_options_get_port (tmp_session, &inferred_port);
-                        x2goDebug << "Temporary session port after config file parse: " << inferred_port;
-
-                        char *inferred_host = NULL;
-                        ssh_options_get (tmp_session, SSH_OPTIONS_HOST, &inferred_host);
-                        x2goDebug << "Temporary session host after config file parse: " << inferred_host;
-
-                        channelConnections[i].forwardHost = QString (inferred_host);
-                        channelConnections[i].forwardPort = static_cast<int> (inferred_port);
-
-                        ssh_string_free_char (inferred_host);
-                        ssh_free (tmp_session);
-                    }
-#endif
-
-                    {
-                        QByteArray tmp_BA_forward = channelConnections.at (i).forwardHost.toLocal8Bit ();
-                        QByteArray tmp_BA_local = channelConnections.at (i).localHost.toLocal8Bit ();
-
-                        if ( ssh_channel_open_forward ( channel,
-                                                        tmp_BA_forward.data (),
-                                                        channelConnections.at ( i ).forwardPort,
-                                                        tmp_BA_local.data (),
-                                                        channelConnections.at ( i ).localPort ) != SSH_OK )
-                        {
-                            QString err=ssh_get_error ( my_ssh_session );
-                            QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_open_forward");
-                            emit ioErr ( channelConnections[i].creator, errorMsg, err );
-                            x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
-                        }
-                        else
-                        {
-                            x2goDebug<<"New channel forwarded."<<endl;
-                        }
-                    }
-                }
-                else
-                {
-                    x2goDebug<<"Executing remote: "<<channelConnections.at ( i ).command<<endl;
-                    if ( ssh_channel_open_session ( channel ) !=SSH_OK )
-                    {
-                        QString err=ssh_get_error ( my_ssh_session );
-                        QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_open_session");
-                        emit ioErr ( channelConnections[i].creator, errorMsg, err );
-                        x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
-                    }
-                    else if ( ssh_channel_request_exec ( channel, channelConnections[i].command.toLatin1() ) != SSH_OK )
-                    {
-                        QString err=ssh_get_error ( my_ssh_session );
-                        QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_request_exec");
-                        emit ioErr ( channelConnections[i].creator, errorMsg, err );
-                        x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
-                    }
-                    else
-                    {
-                        x2goDebug<<"New exec channel created."<<endl;
-                    }
-                }
-
+                x2goDebug << "Connection to channel went wrong.";
+                continue;
             }
-            read_chan[i]=channelConnections.at ( i ).channel;
-            if ( tcpSocket>maxsock )
-                maxsock=tcpSocket;
         }
+
         channelConnectionsMutex.unlock();
-        retval=ssh_select ( read_chan,out_chan,maxsock+1,&rfds,&tv );
-        delete [] read_chan;
-        delete [] out_chan;
+        retval = ssh_select(read_chan, out_chan, maxsock + 1, &rfds, &tv);
+        delete[] read_chan;
+        delete[] out_chan;
 
-        if ( retval == -1 )
+        if (SSH_OK != retval)
         {
-            x2goDebug<<"select() error.";
+            x2goDebug << "select() error." << endl;
             continue;
         }
 
-        //         x2goDebug<<"select exited"<<endl;
-
         channelConnectionsMutex.lock();
-        for ( int i=channelConnections.size()-1; i>=0; --i )
+        for (int i = channelConnections.size() - 1; i >= 0; --i)
         {
-            int tcpSocket=channelConnections.at ( i ).sock;
-            ssh_channel channel=channelConnections.at ( i ).channel;
-            if ( channel==0l )
+            int tcpSocket = channelConnections.at(i).sock;
+            ssh_channel channel = channelConnections.at(i).channel;
+            if (channel == 0l)
                 continue;
-            if ( ssh_channel_poll ( channel,1 ) > 0 )
+            if (ssh_channel_poll(channel, 1) > 0)
             {
                 //              x2goDebug<<"read err data from channel\n";
-                nbytes = ssh_channel_read ( channel, buffer, sizeof ( buffer )-1, 1 );
-                emit stdErr ( channelConnections[i].creator, QByteArray ( buffer,nbytes ) );
+                nbytes = ssh_channel_read(channel, buffer, sizeof(buffer) - 1, 1);
+                emit stdErr(channelConnections[i].creator, QByteArray(buffer, nbytes));
                 //              x2goDebug<<nbytes<<" err from channel"<<endl;
             }
-            int rez = ssh_channel_poll ( channel, 0 );
-            if ( rez==SSH_EOF )
+            int rez = ssh_channel_poll(channel, 0);
+            if (rez == SSH_EOF)
             {
-                x2goDebug<<"EOF on channel "<<channel<<"; SshProcess object: "<<channelConnections[i].creator->pid;
+                x2goDebug << "EOF on channel " << channel << "; SshProcess object: " << channelConnections[i].creator->pid << endl;
 
                 //////Finished////////
-                finalize ( i );
+                finalize(i);
                 continue;
             }
-            if ( rez>0 )
+            if (rez > 0)
             {
                 //                  x2goDebug<<"read data from channel "<<channel<<endl;
-                nbytes = ssh_channel_read ( channel, buffer, sizeof ( buffer )-1, 0 );
+                nbytes = ssh_channel_read(channel, buffer, sizeof(buffer) - 1, 0);
                 //                  x2goDebug<<nbytes<<" from channel "<<channel<<endl;
-                if ( nbytes > 0 )
+                if (nbytes > 0)
                 {
-                    if ( tcpSocket>0 )
+                    if (tcpSocket > 0)
                     {
-                        if ( send ( tcpSocket,buffer, nbytes,0 ) != nbytes )
+                        if (send(tcpSocket, buffer, nbytes, 0) != nbytes)
                         {
-                            QString errMsg=tr ( "Error writing to socket." );
-                            x2goDebug<<"Error writing "<<nbytes<<" to TCP socket"<<tcpSocket<<endl;
-                            emit ioErr ( channelConnections[i].creator,errMsg,"" );
-                            finalize ( i );
+                            QString errMsg = tr("Error writing to socket.");
+                            x2goDebug << "Error writing " << nbytes << " to TCP socket" << tcpSocket << endl;
+                            emit ioErr(channelConnections[i].creator, errMsg, "");
+                            finalize(i);
                             continue;
                         }
                         //                      x2goDebug<<"wrote "<<nbytes<<" to tcp socket "<<tcpSocket<<endl;
                     }
                     else
                     {
-                        emit stdOut ( channelConnections[i].creator, QByteArray ( buffer,nbytes ) );
+                        emit stdOut(channelConnections[i].creator, QByteArray(buffer, nbytes));
                     }
                 }
 
-                if ( nbytes < 0 )
+                if (nbytes < 0)
                 {
                     //////ERROR!!!!!////////
-                    QString err=ssh_get_error ( my_ssh_session );
-                    QString errorMsg=tr ( "Error reading channel." );
-                    emit ioErr ( channelConnections[i].creator, errorMsg, err );
-                    x2goDebug<<errorMsg<<" - "<<err<<endl;
-                    finalize ( i );
+                    QString err = ssh_get_error(my_ssh_session);
+                    QString errorMsg = tr("Error reading channel.");
+                    emit ioErr(channelConnections[i].creator, errorMsg, err);
+                    x2goDebug << errorMsg << " - " << err << endl;
+                    finalize(i);
                     continue;
                 }
 
-                if ( ssh_channel_is_eof ( channel ) )
+                if (ssh_channel_is_eof(channel))
                 {
-                    x2goDebug<<"EOF on channel "<<channel<<"; SshProcess object: "<<channelConnections[i].creator->pid;
+                    x2goDebug << "EOF on channel " << channel << "; SshProcess object: " << channelConnections[i].creator->pid << endl;
 
                     //////Finished////////
-                    finalize ( i );
+                    finalize(i);
                     continue;
                 }
             }
-            if ( tcpSocket<=0 )
+            if (tcpSocket <= 0)
             {
                 continue;
             }
-            if ( FD_ISSET ( tcpSocket,&rfds ) )
+            if (FD_ISSET(tcpSocket, &rfds))
             {
-                nbytes = recv ( tcpSocket, buffer, sizeof ( buffer )-1,0 );
+                nbytes = recv(tcpSocket, buffer, sizeof(buffer) - 1, 0);
                 //                  x2goDebug<<nbytes<<" bytes from tcp socket "<<tcpSocket<<endl;
-                if ( nbytes > 0 )
+                if (nbytes > 0)
                 {
-                    if ( ssh_channel_write ( channel, buffer, nbytes ) !=nbytes )
+                    if (ssh_channel_write(channel, buffer, nbytes) != nbytes)
                     {
-                        QString err=ssh_get_error ( my_ssh_session );
-                        QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_write");
-                        emit ioErr ( channelConnections[i].creator, errorMsg, err );
-                        x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
-                        finalize ( i );
+                        QString err = ssh_get_error(my_ssh_session);
+                        QString errorMsg = tr("%1 failed.").arg("ssh_channel_write");
+                        emit ioErr(channelConnections[i].creator, errorMsg, err);
+                        x2goDebug << errorMsg.left(errorMsg.size() - 1) << ": " << err << endl;
+                        finalize(i);
                         continue;
                     }
                     //                      x2goDebug<<nbytes<<" bytes wrote to channel"<<channel<<endl;
                 }
-                if ( nbytes < 0 )
+                if (nbytes < 0)
                 {
                     //////ERROR!!!!!////////
-                    QString err="";
-                    QString errorMsg=tr ( "Error reading from TCP socket." );
-                    emit ioErr ( channelConnections[i].creator, errorMsg, err );
-                    x2goDebug<<errorMsg<<" - "<<err<<endl;
-                    finalize ( i );
+                    QString err = "";
+                    QString errorMsg = tr("Error reading from TCP socket.");
+                    emit ioErr(channelConnections[i].creator, errorMsg, err);
+                    x2goDebug << errorMsg << " - " << err << endl;
+                    finalize(i);
                     continue;
                 }
-                if ( nbytes==0 )
+                if (nbytes == 0)
                 {
-                    x2goDebug<<"Socket "<<tcpSocket<<" closed."<<endl;
-                    finalize ( i );
+                    x2goDebug << "Socket " << tcpSocket << " closed." << endl;
+                    finalize(i);
                     continue;
                 }
             }
@@ -2212,34 +2112,169 @@ void SshMasterConnection::channelLoop()
     }
 }
 
-void SshMasterConnection::finalize ( int item )
+/**
+ * Create SSH channel connection (used within a loop of channels)
+ */
+bool SshMasterConnection::createChannelConnection(int i, int &maxsock, fd_set &rfds, ssh_channel read_chan[])
 {
-    int tcpSocket=channelConnections.at ( item ).sock;
-    ssh_channel channel=channelConnections.at ( item ).channel;
-    if ( channel )
+    int tcpSocket = channelConnections.at(i).sock;
+    if (tcpSocket > 0)
+        FD_SET(tcpSocket, &rfds);
+    if (channelConnections.at(i).channel == 0l)
     {
-        ssh_channel_send_eof ( channel );
-        x2goDebug<<"EOF sent.";
-        ssh_channel_close ( channel );
-        x2goDebug<<"Channel closed.";
-        ssh_channel_free ( channel );
+        x2goDebug << "Creating new channel." << endl;
+
+        ssh_channel channel = ssh_channel_new(my_ssh_session);
+        if (!channel)
+        {
+            QString err = ssh_get_error(my_ssh_session);
+            /*: Argument in this context will be a function name. */
+            QString error_msg = tr("%1 failed.").arg("ssh_channel_new");
+            emit ioErr(channelConnections[i].creator, error_msg, err);
+
+            x2goDebug << error_msg.left(error_msg.size() - 1) << ": " << err << endl;
+            return false;
+        }
+        x2goDebug << "New channel:" << channel << endl;
+        channelConnections[i].channel = channel;
+        if (tcpSocket > 0)
+        {
+            x2goDebug << "Forwarding parameters: from remote (" << channelConnections.at(i).forwardHost << ":"
+                      << channelConnections.at(i).forwardPort << ") to local ("
+                      << channelConnections.at(i).localHost << ":" << channelConnections.at(i).localPort
+                      << ")";
+
+            /*
+                * Cannot support config file parsing here with pre-0.6.0 libssh versions.
+                * There's just no way to get the inferred host and port values.
+                */
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
+            ssh_session tmp_session = ssh_new();
+
+            if (!tmp_session)
+            {
+                QString error_msg = tr("Cannot create SSH session.");
+                x2goDebug << error_msg << endl;
+                emit ioErr(channelConnections[i].creator, error_msg, "");
+            }
+            else
+            {
+                QByteArray tmp_BA = channelConnections.at(i).forwardHost.toLocal8Bit();
+                const int tmp_port = channelConnections.at(i).forwardPort;
+
+                ssh_options_set(tmp_session, SSH_OPTIONS_HOST, tmp_BA.data());
+
+                if (tmp_port)
+                {
+                    ssh_options_set(tmp_session, SSH_OPTIONS_PORT, &tmp_port);
+                }
+
+                /* The host and port might be a shorthand and zero, so fetch the actual data. */
+                if (ssh_options_parse_config(tmp_session, NULL) < 0)
+                {
+                    x2goDebug << "Warning: unable to parse the SSH config file." << endl;
+                }
+
+                unsigned int inferred_port = 0;
+                ssh_options_get_port(tmp_session, &inferred_port);
+                x2goDebug << "Temporary session port after config file parse: " << inferred_port << endl;
+
+                char *inferred_host = NULL;
+                ssh_options_get(tmp_session, SSH_OPTIONS_HOST, &inferred_host);
+                x2goDebug << "Temporary session host after config file parse: " << inferred_host << endl;
+
+                channelConnections[i].forwardHost = QString(inferred_host);
+                channelConnections[i].forwardPort = static_cast<int>(inferred_port);
+
+                ssh_string_free_char(inferred_host);
+                ssh_free(tmp_session);
+            }
+#endif
+
+            {
+                QByteArray tmp_BA_forward = channelConnections.at(i).forwardHost.toLocal8Bit();
+                QByteArray tmp_BA_local = channelConnections.at(i).localHost.toLocal8Bit();
+
+                if (ssh_channel_open_forward(channel,
+                                             tmp_BA_forward.data(),
+                                             channelConnections.at(i).forwardPort,
+                                             tmp_BA_local.data(),
+                                             channelConnections.at(i).localPort) != SSH_OK)
+                {
+                    QString err = ssh_get_error(my_ssh_session);
+                    QString errorMsg = tr("%1 failed.").arg("ssh_channel_open_forward");
+                    emit ioErr(channelConnections[i].creator, errorMsg, err);
+                    x2goDebug << errorMsg.left(errorMsg.size() - 1) << ": " << err << endl;
+                }
+                else
+                {
+                    x2goDebug << "New channel forwarded." << endl;
+                }
+            }
+        }
+        else
+        {
+            x2goDebug << "Executing remote: " << channelConnections.at(i).command << endl;
+            if (ssh_channel_open_session(channel) != SSH_OK)
+            {
+                QString err = ssh_get_error(my_ssh_session);
+                QString errorMsg = tr("%1 failed.").arg("ssh_channel_open_session");
+
+                // Free channel
+                ssh_channel_free(channel);
+                emit ioErr(channelConnections[i].creator, errorMsg, err);
+                x2goDebug << errorMsg.left(errorMsg.size() - 1) << ": " << err << endl;
+                return false;
+            }
+            else if (ssh_channel_request_exec(channel, channelConnections[i].command.toLatin1()) != SSH_OK)
+            {
+                QString err = ssh_get_error(my_ssh_session);
+                QString errorMsg = tr("%1 failed.").arg("ssh_channel_request_exec");
+
+                // Free close connection and free channel
+                ssh_channel_close(channel);
+                ssh_channel_free(channel);
+                emit ioErr(channelConnections[i].creator, errorMsg, err);
+                x2goDebug << errorMsg.left(errorMsg.size() - 1) << ": " << err << endl;
+                return false;
+            }
+            else
+            {
+                // Everything is OK
+                x2goDebug << "New exec channel created." << endl;
+            }
+        }
     }
-    if ( tcpSocket>0 )
+    read_chan[i] = channelConnections.at(i).channel;
+    if (tcpSocket > maxsock)
+        maxsock = tcpSocket;
+    return true;
+}
+
+void SshMasterConnection::finalize(int item)
+{
+    int tcpSocket = channelConnections.at(item).sock;
+    ssh_channel channel = channelConnections.at(item).channel;
+    if (channel)
+    {
+        ssh_channel_send_eof(channel);
+        x2goDebug << "EOF sent." << endl;
+        ssh_channel_close(channel);
+        x2goDebug << "Channel closed." << endl;
+        ssh_channel_free(channel);
+    }
+    if (tcpSocket > 0)
     {
 #ifndef Q_OS_WIN
         shutdown(tcpSocket, SHUT_RDWR);
-        close ( tcpSocket );
+        close(tcpSocket);
 #else
         shutdown(tcpSocket, SD_BOTH);
-        closesocket ( tcpSocket );
+        closesocket(tcpSocket);
 #endif
     }
-    SshProcess* proc=channelConnections[item].creator;
-    QString uuid=channelConnections[item].uuid;
-    channelConnections.removeAt ( item );
-    emit channelClosed ( proc, uuid );
+    SshProcess *proc = channelConnections[item].creator;
+    QString uuid = channelConnections[item].uuid;
+    channelConnections.removeAt(item);
+    emit channelClosed(proc, uuid);
 }
-
-
-
-
diff --git a/src/sshmasterconnection.h b/src/sshmasterconnection.h
index ffb853b..23abfb1 100644
--- a/src/sshmasterconnection.h
+++ b/src/sshmasterconnection.h
@@ -134,6 +134,7 @@ private:
     bool userAuthKrb();
     bool userAuthKeyboardInteractive(QString prompt);
     void channelLoop();
+    bool createChannelConnection(int i, int& maxsock, fd_set& rfds, ssh_channel read_chan[]);
     void finalize(int arg1);
     void copy();
     int serverAuth(QString& errorMsg);

---

From: Mike Gabriel <[email-masked]>
Date: Tue, 19 May 2020 19:48:33 +0000

Hi Melroy,

On  Di 19 Mai 2020 03:59:16 CEST, Melroy van den Berg wrote:

> Hi,
>
> I did some refactoring in the sshmasterconnection.cpp file. I think  
> it can definitely use some clean-up and further splitting functions  
> and even into multiple files eventually.
> The changes I applied are in the attachment of this mail (a git  
> patch file). I think closing previous sessions and connection solved  
> my strange SSH connection is resulting into Socket error: No such  
> file or directory".
> Although X2Go client is calling [libssh  
> calls](https://api.libssh.org/master/index.html) (libssh version  
> currently in use runtime on my host is: 0.7.0).
> For some reason this vague error message popped-up by libssh,  
> properly a result of previous session being created and not  
> correctly closed. And/or not closed in the right order (/missing API  
> calls), like a good example:
>
> (including some brief explanation what I did so far, I also ran an  
> formatted on the code, because it was very very hard to read with  
> all the wrong indents)
>
> I also made another video showing yet another bug I found regarding  
> the SSH tunneling (during some heavy testing), the only solution was  
> to restart the whole docker image:

Thanks for working on X2Go Client. With your patch, there is a problem  
though. It is barely unreviewable, because you have so many changes  
(also white space changes) in one patch file.

Please clone the X2Go Client Git repo, add atomic changes with good  
commit messages. Keep white-space changes and technical changes fully  
separate (ideally: technical changes first, white-space changes last).

Then export your patches using 'git format-patch  
<last-official-commit>..HEAD' and send us the set of patches instead  
this one bulk commit/patch.

Thanks for your efforts!!!

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: [email-masked], http://das-netzwerkteam.de

---

From: Melroy van den Berg <[email-masked]>
Date: Tue, 19 May 2020 20:00:40 +0000

Hi,

Well.. it was not unnecessary. The code was actually unreadable, wrong indentations and inconsistent throughout the whole file.
I needed to execute this auto-formatter, before I could even begin to understand the code.

In fact, I urge you to execute this on the whole archive. And keep the code quality high via a CI pipeline or something.

I can understand it makes it hard to read. I also fixed other some issues like this double error message during login and all the debug statements.
What would be your approach? I think it's still wise to auto-format the code in consistent matter.

Regards,
Melroy van den Berg

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Op dinsdag, mei 19, 2020 9:48 PM, Mike Gabriel <[email-masked]> schreef:

> > I did some refactoring in the sshmasterconnection.cpp file. I think > it can definitely use some clean-up and further splitting functions > and even into multiple files eventually.
> > The changes I applied are in the attachment of this mail (a git > patch file). I think closing previous sessions and connection solved > my strange SSH connection is resulting into Socket error: No such > file or directory".
> > Although X2Go client is calling libssh > calls (libssh version > currently in use runtime on my host is: 0.7.0).
> > For some reason this vague error message popped-up by libssh, > properly a result of previous session being created and not > correctly closed. And/or not closed in the right order (/missing API > calls), like a good example:
> > (including some brief explanation what I did so far, I also ran an > formatted on the code, because it was very very hard to read with > all the wrong indents)
> > I also made another video showing yet another bug I found regarding > the SSH tunneling (during some heavy testing), the only solution was > to restart the whole docker image:
> > https://youtu.be/xEpIyo84fWc (I think this issue is unrelated, but > maybe wise to take serious as well)
> Thanks for working on X2Go Client. With your patch, there is a problem though. It is barely unreviewable, because you have so many changes (also white space changes) in one patch file.
>
> Please clone the X2Go Client Git repo, add atomic changes with good commit messages. Keep white-space changes and technical changes fully separate (ideally: technical changes first, white-space changes last).
>
> Then export your patches using 'git format-patch <last-official-commit>..HEAD' and send us the set of patches instead this one bulk commit/patch.
>
> -----------------------------------
>
> DAS-NETZWERKTEAM

---

From: Ulrich Sibiller <[email-masked]>
Date: Tue, 19 May 2020 22:37:08 +0200

What about taking the original code, run your auto-formatter (what
tool are you using?), make a patch. Then copy your patched version
over the auto-formatted version and create one or more other patches,
depending on your changes. Using git add -p this is very easy to
accomplish.

Uli

On Tue, May 19, 2020 at 10:08 PM Melroy van den Berg
<[email-masked]> wrote:
> _______________________________________________
> x2go-dev mailing list
> [email-masked]
> https://lists.x2go.org/listinfo/x2go-dev

---

From: Melroy van den Berg <[email-masked]>
Date: Tue, 19 May 2020 21:24:09 +0000

Hi Mike & Uli,

As Mike suggested, I redone all changes (plus even some more bonus items).
Since I was in a separate git branch I could run the format-patch easily via:git format-patch master. Thanks for the suggestion.

@Uli I'm using the auto-formatter for C++ built-in in VS Code.

I think the end-result with all the separate patches makes more sense now, sorry I didn't do it right away. I think once I have a wiki account, I will add all these best practices your x2go wiki. Instead of Attachment: <your-patch.diff>: https://wiki.x2go.org/doku.php/wiki:bugs?s[]=git&s[]=patch#bug_submission_with_a_patch.

See the attachments for all the patches in this mail (11 in total). Thanks in advance.

Best regards,
Melroy van den Berg

From c633f110532587e1568e93735688d926bce99cb7 Mon Sep 17 00:00:00 2001
From: Melroy van den Berg <[email-masked]>
Date: Tue, 19 May 2020 22:40:06 +0200
Subject: [PATCH 02/11] endl for every debug line..

---
 src/sshmasterconnection.cpp | 140 ++++++++++++++++++------------------
 1 file changed, 68 insertions(+), 72 deletions(-)

diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
index 424cad2..f598e9c 100644
--- a/src/sshmasterconnection.cpp
+++ b/src/sshmasterconnection.cpp
@@ -161,7 +161,7 @@ SshMasterConnection::SshMasterConnection(QObject *parent, QString host, int port
     kerberosDelegation = false;
     x2goDebug << "SshMasterConnection, host " << host << "; port " << port << "; user " << user
               << "; useproxy " << useproxy << "; proxyserver " << proxyserver
-              << "; proxyport " << proxyport;
+              << "; proxyport " << proxyport << endl;
     this->host = host;
     // If the hostname starts with "!" do not perform loginCheck() for this connection
     if (this->host.indexOf("!") == 0)
@@ -202,7 +202,7 @@ SshMasterConnection::SshMasterConnection(QObject *parent, QString host, int port
         {
             QString error_msg = tr("Cannot create SSH session.");
             error_msg += " " + tr("Using environment-provided username.");
-            x2goDebug << error_msg;
+            x2goDebug << error_msg << endl;
         }
         else
         {
@@ -214,12 +214,12 @@ SshMasterConnection::SshMasterConnection(QObject *parent, QString host, int port
 
             if (ssh_options_parse_config(tmp_session, NULL) < 0)
             {
-                x2goDebug << "Warning: unable to parse the SSH config file.";
+                x2goDebug << "Warning: unable to parse the SSH config file." << endl;
             }
 
             char *inferred_username = NULL;
             ssh_options_get(tmp_session, SSH_OPTIONS_USER, &inferred_username);
-            x2goDebug << "Temporary session user name after config file parse: " << inferred_username;
+            x2goDebug << "Temporary session user name after config file parse: " << inferred_username << endl;
 
             this->user = QString::fromLocal8Bit(inferred_username);
 
@@ -240,18 +240,18 @@ SshMasterConnection::SshMasterConnection(QObject *parent, QString host, int port
 
     if (kerberos)
     {
-        x2goDebug << "Starting SSH connection with Kerberos authentication.";
+        x2goDebug << "Starting SSH connection with Kerberos authentication." << endl;
     }
     else
     {
-        x2goDebug << "Starting SSH connection without Kerberos authentication.";
+        x2goDebug << "Starting SSH connection without Kerberos authentication." << endl;
     }
-    x2goDebug << "SshMasterConnection, instance " << this << " created.";
+    x2goDebug << "SshMasterConnection, instance " << this << " created." << endl;
 }
 
 void SshMasterConnection::slotSshProxyConnectionOk()
 {
-    x2goDebug << "SSH proxy connected.";
+    x2goDebug << "SSH proxy connected." << endl;
 
     localProxyPort = PROXYTUNNELPORT;
     while (ONMainWindow::isServerRunning(localProxyPort))
@@ -319,12 +319,12 @@ void SshMasterConnection::addReverseTunnelConnections()
                 if (rc == SSH_OK)
                 {
                     emit reverseTunnelOk(reverseTunnelRequest[i].creator);
-                    x2goDebug << "Listening for TCP/IP connections on " << reverseTunnelRequest[i].forwardPort;
+                    x2goDebug << "Listening for TCP/IP connections on " << reverseTunnelRequest[i].forwardPort << endl;
                 }
                 if (rc == SSH_ERROR)
                 {
                     QString err = ssh_get_error(my_ssh_session);
-                    x2goDebug << "Forward port " << reverseTunnelRequest[i].forwardPort << " failed:" << err;
+                    x2goDebug << "Forward port " << reverseTunnelRequest[i].forwardPort << " failed:" << err << endl;
                     emit reverseTunnelFailed(reverseTunnelRequest[i].creator, err);
                 }
             }
@@ -339,7 +339,7 @@ void SshMasterConnection::checkReverseTunnelConnections()
     ssh_channel chan = ssh_channel_accept_forward(my_ssh_session, 0, &port);
     if (chan)
     {
-        x2goDebug << "New reverse connection on port " << port;
+        x2goDebug << "New reverse connection on port " << port << endl;
 
         reverseTunnelRequestMutex.lock();
         for (int i = 0; i < reverseTunnelRequest.count(); ++i)
@@ -347,7 +347,7 @@ void SshMasterConnection::checkReverseTunnelConnections()
             ReverseTunnelRequest req = reverseTunnelRequest[i];
             if (static_cast<int>(req.forwardPort) == port)
             {
-                x2goDebug << "Creating new channel for reverse tunnel " << port;
+                x2goDebug << "Creating new channel for reverse tunnel " << port << endl;
                 int sock = socket(AF_INET, SOCK_STREAM, 0);
 #ifndef Q_OS_WIN
                 const int y = 1;
@@ -383,7 +383,7 @@ void SshMasterConnection::checkReverseTunnelConnections()
                 channelConnectionsMutex.lock();
                 channelConnections << con;
                 channelConnectionsMutex.unlock();
-                x2goDebug << "New channel created";
+                x2goDebug << "New channel created" << endl;
                 break;
             }
         }
@@ -414,7 +414,7 @@ int SshMasterConnection::startTunnel(const QString &forwardHost, uint forwardPor
         req.localHost = localHost;
         req.forwardPort = forwardPort;
         req.listen = false;
-        x2goDebug << "Requesting reverse tunnel from port " << forwardPort << " to " << localPort;
+        x2goDebug << "Requesting reverse tunnel from port " << forwardPort << " to " << localPort << endl;
         reverseTunnelRequestMutex.lock();
         reverseTunnelRequest << req;
         reverseTunnelRequestMutex.unlock();
@@ -425,7 +425,7 @@ int SshMasterConnection::startTunnel(const QString &forwardHost, uint forwardPor
 
 void SshMasterConnection::slotSshProxyInteractionFinish(SshMasterConnection *connection)
 {
-    x2goDebug << "SSH proxy interaction finished";
+    x2goDebug << "SSH proxy interaction finished" << endl;
     slotSshProxyUserAuthError("NO_ERROR");
 }
 
@@ -461,7 +461,7 @@ void SshMasterConnection::slotSshProxyUserAuthError(QString err)
 
 void SshMasterConnection::slotSshProxyTunnelOk(int)
 {
-    x2goDebug << "SSH proxy tunnel established.";
+    x2goDebug << "SSH proxy tunnel established." << endl;
     sshProxyReady = true;
 }
 
@@ -479,10 +479,10 @@ void SshMasterConnection::slotSshProxyServerAuthAborted()
 
 void SshMasterConnection::run()
 {
-    x2goDebug << "SshMasterConnection, instance " << this << " entering thread.";
+    x2goDebug << "SshMasterConnection, instance " << this << " entering thread." << endl;
     if (useproxy && proxytype == PROXYSSH)
     {
-        x2goDebug << "proxyserver: " << proxyserver << "; proxyport: " << proxyport << "; proxylogin: " << proxylogin;
+        x2goDebug << "proxyserver: " << proxyserver << "; proxyport: " << proxyport << "; proxylogin: " << proxylogin << endl;
         sshProxy = new SshMasterConnection(0, proxyserver, proxyport, acceptUnknownServers,
                                            proxylogin, proxypassword, proxykey, proxyautologin, proxyKrbLogin, false);
 
@@ -608,7 +608,7 @@ void SshMasterConnection::run()
         }
         QString err = ssh_get_error(my_ssh_session);
         QString message = tr("Cannot connect to ") + host + ":" + QString::number(port);
-        x2goDebug << message << " - " << err;
+        x2goDebug << message << " - " << err << endl;
         emit connectionError(message, err);
         ssh_free(my_ssh_session);
         quit();
@@ -673,7 +673,7 @@ void SshMasterConnection::run()
             x2goDebug << "Session is already disconnected, exiting." << endl;
             return;
         }
-        x2goDebug << "User authentication OK.";
+        x2goDebug << "User authentication OK." << endl;
         // checkLogin() is currently specific to libssh.
         if (kerberos)
         {
@@ -681,19 +681,19 @@ void SshMasterConnection::run()
         }
         else if (this->loginCheck == false)
         {
-            x2goDebug << "Skipping Login Check as requested by configuration";
+            x2goDebug << "Skipping Login Check as requested by configuration" << endl;
             emit connectionOk(host);
         }
         else
         {
             if (checkLogin())
             {
-                x2goDebug << "Login Check - OK";
+                x2goDebug << "Login Check - OK" << endl;
                 emit connectionOk(host);
             }
             else
             {
-                x2goDebug << "Login Check - Failed";
+                x2goDebug << "Login Check - Failed" << endl;
                 //          if(!interactionInterrupt)
                 {
                     emit finishInteraction(this);
@@ -722,7 +722,7 @@ void SshMasterConnection::run()
             err = sshProcErrString;
         }
         QString message = tr("Authentication failed.");
-        x2goDebug << message << " - " << err;
+        x2goDebug << message << " - " << err << endl;
         emit userAuthError(authErrors.join("\n"));
         ssh_disconnect(my_ssh_session);
         ssh_free(my_ssh_session);
@@ -747,14 +747,14 @@ SshMasterConnection::~SshMasterConnection()
     disconnectFlagMutex.lock();
     disconnectSessionFlag = true;
     disconnectFlagMutex.unlock();
-    x2goDebug << "SshMasterConnection, instance " << this << " waiting for thread to finish.";
+    x2goDebug << "SshMasterConnection, instance " << this << " waiting for thread to finish." << endl;
     wait(15000);
-    x2goDebug << "SshMasterConnection, instance " << this << " thread finished.";
+    x2goDebug << "SshMasterConnection, instance " << this << " thread finished." << endl;
     for (int i = processes.count() - 1; i >= 0; --i)
     {
         delete processes[i];
     }
-    x2goDebug << "SshMasterConnection, instance " << this << " finished destructor.";
+    x2goDebug << "SshMasterConnection, instance " << this << " finished destructor." << endl;
 }
 
 bool SshMasterConnection::sshConnect()
@@ -781,7 +781,7 @@ bool SshMasterConnection::sshConnect()
 #if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
     unsigned int cur_port = 0;
     ssh_options_get_port(my_ssh_session, &cur_port);
-    x2goDebug << "Session port before config file parse: " << cur_port;
+    x2goDebug << "Session port before config file parse: " << cur_port << endl;
 #endif
 
     /* Parse ~/.ssh/config. */
@@ -792,7 +792,7 @@ bool SshMasterConnection::sshConnect()
 
 #if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
     ssh_options_get_port(my_ssh_session, &cur_port);
-    x2goDebug << "Session port after config file parse: " << cur_port;
+    x2goDebug << "Session port after config file parse: " << cur_port << endl;
 #endif
 
     rc = ssh_connect(my_ssh_session);
@@ -803,7 +803,7 @@ bool SshMasterConnection::sshConnect()
     //set values for remote host for proper server authentication
     if (useproxy && proxytype == PROXYSSH)
     {
-        x2goDebug << "Connected via proxy, resetting connection values on session to " << tmpBA.data() << ":" << port;
+        x2goDebug << "Connected via proxy, resetting connection values on session to " << tmpBA.data() << ":" << port << endl;
         ssh_options_set(my_ssh_session, SSH_OPTIONS_HOST, tmpBA.data());
 
         /*
@@ -830,7 +830,7 @@ bool SshMasterConnection::sshConnect()
             if (!tmp_session)
             {
                 QString error_msg = tr("Cannot create SSH session.");
-                x2goDebug << error_msg;
+                x2goDebug << error_msg << endl;
                 return (false);
             }
             else
@@ -840,12 +840,12 @@ bool SshMasterConnection::sshConnect()
                 /* Parse ~/.ssh/config. */
                 if (ssh_options_parse_config(tmp_session, NULL) < 0)
                 {
-                    x2goDebug << "Warning: unable to parse the SSH config file.";
+                    x2goDebug << "Warning: unable to parse the SSH config file." << endl;
                 }
 
                 unsigned int inferred_port = 0;
                 ssh_options_get_port(tmp_session, &inferred_port);
-                x2goDebug << "Fetched inferred session port: " << inferred_port;
+                x2goDebug << "Fetched inferred session port: " << inferred_port << endl;

@@ -859,7 +859,7 @@ bool SshMasterConnection::sshConnect()
 
 #if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
     ssh_options_get_port(my_ssh_session, &cur_port);
-    x2goDebug << "Session port before config file parse (part 2): " << cur_port;
+    x2goDebug << "Session port before config file parse (part 2): " << cur_port << endl;
 #endif
 
     /* Parse ~/.ssh/config. */
@@ -870,7 +870,7 @@ bool SshMasterConnection::sshConnect()
 
 #if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
     ssh_options_get_port(my_ssh_session, &cur_port);
-    x2goDebug << "Session port after config file parse (part 2): " << cur_port;
+    x2goDebug << "Session port after config file parse (part 2): " << cur_port << endl;
 #endif
 
     return true;
@@ -891,7 +891,7 @@ void SshMasterConnection::writeKnownHosts(bool write)
 
 int SshMasterConnection::serverAuth(QString &errorMsg)
 {
-    x2goDebug << "cserverAuth";
+    x2goDebug << "cserverAuth" << endl;
 
     int state = SSH_SERVER_ERROR;
     unsigned char *hash = NULL;
@@ -974,7 +974,7 @@ void SshMasterConnection::setVerficationCode(QString code)
 
 bool SshMasterConnection::userAuthKeyboardInteractive(QString prompt)
 {
-    x2goDebug << "Open Interaction dialog to complete authentication";
+    x2goDebug << "Open Interaction dialog to complete authentication" << endl;
     emit startInteraction(this, prompt);
     interactionInterrupt = false;
     interactionInputText = QString::null;
@@ -1013,14 +1013,14 @@ bool SshMasterConnection::userAuthKeyboardInteractive(QString prompt)
                 interactionInputMutex.unlock();
                 if (textToSend.length() > 0)
                 {
-                    x2goDebug << "SEND Input to SERVER";
+                    x2goDebug << "SEND Input to SERVER" << endl;
                     textToSend.replace("\n", "");
                     ssh_userauth_kbdint_setanswer(my_ssh_session, 0, textToSend.toLocal8Bit());
                     break;
                 }
                 if (interrupt)
                 {
-                    x2goDebug << "Keyboard authentication failed";
+                    x2goDebug << "Keyboard authentication failed" << endl;
                     //         QString err=ssh_get_error ( my_ssh_session );
                     authErrors << "NO_ERROR";
                     emit finishInteraction(this);
@@ -1035,13 +1035,13 @@ bool SshMasterConnection::userAuthKeyboardInteractive(QString prompt)
     }
     if (rez == SSH_AUTH_SUCCESS)
     {
-        x2goDebug << "Keyboard authentication successful";
+        x2goDebug << "Keyboard authentication successful" << endl;
         emit finishInteraction(this);
         return true;
     }
     if (rez == SSH_AUTH_DENIED)
     {
-        x2goDebug << "Keyboard authentication failed";
+        x2goDebug << "Keyboard authentication failed" << endl;
         QString err = ssh_get_error(my_ssh_session);
         if (instruction.length() > 0)
         {
@@ -1324,7 +1324,7 @@ void SshMasterConnection::setKeyPhrase(QString phrase)
 
 bool SshMasterConnection::userAuthWithKey()
 {
-    x2goDebug << "Trying to authenticate user with private key.";
+    x2goDebug << "Trying to authenticate user with private key." << endl;
     QString keyName = key;
     bool autoRemove = false;
     if (key.indexOf("PRIVATE KEY") != -1)
@@ -1340,7 +1340,7 @@ bool SshMasterConnection::userAuthWithKey()
         out << key;
         fl.close();
         autoRemove = true;
-        x2goDebug << "Temporarily saved key in " << keyName;
+        x2goDebug << "Temporarily saved key in " << keyName << endl;
     }
 
     QByteArray tmp_ba = keyName.toLocal8Bit();
@@ -1363,7 +1363,7 @@ bool SshMasterConnection::userAuthWithKey()
 
     if (SSH_EOF == rc)
     {
-        x2goDebug << "Failed to get private key from " << keyName << "; file does not exist.";
+        x2goDebug << "Failed to get private key from " << keyName << "; file does not exist." << endl;
 
         ssh_key_free(priv_key);
 
@@ -1371,7 +1371,7 @@ bool SshMasterConnection::userAuthWithKey()
     }
     else if (SSH_OK != rc)
     {
-        x2goDebug << "Failed to get private key from " << keyName << "; trying to query passphrase.";
+        x2goDebug << "Failed to get private key from " << keyName << "; trying to query passphrase." << endl;
 
         ssh_key_free(priv_key);
         priv_key = NULL;
@@ -1441,7 +1441,7 @@ bool SshMasterConnection::userAuthWithKey()
     if (!priv_key)
 #endif
     {
-        x2goDebug << "Failed to get private key from " << keyName;
+        x2goDebug << "Failed to get private key from " << keyName << endl;
         if (autoRemove)
             QFile::remove(keyName);
         return false;
@@ -1461,7 +1461,7 @@ bool SshMasterConnection::userAuthWithKey()
     if (!pub_key)
 #endif
     {
-        x2goDebug << "Failed to get public key from private key.";
+        x2goDebug << "Failed to get public key from private key." << endl;
 #if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
         ssh_key_free(priv_key);
         priv_key = NULL;
@@ -1488,7 +1488,7 @@ bool SshMasterConnection::userAuthWithKey()
     /* FIXME: handle SSH_AUTH_PARTIAL correctly! */
     if (SSH_AUTH_SUCCESS != rc)
     {
-        x2goDebug << "Unable to authenticate with public key.";
+        x2goDebug << "Unable to authenticate with public key." << endl;
 
         ssh_key_free(priv_key);
         priv_key = NULL;
@@ -1612,7 +1612,7 @@ bool SshMasterConnection::userAuthKrb()
     }
     QString outp = ssh.readAllStandardOutput();
     QString err = ssh.readAllStandardError();
-    x2goDebug << "SSH exited.";
+    x2goDebug << "SSH exited." << endl;
     x2goDebug << "stdout: " << outp << endl;
     x2goDebug << "stderr: " << err << endl;
     x2goDebug << "Exit code: " << ssh.exitCode() << "; status: " << ssh.exitStatus() << endl;
@@ -1705,7 +1705,6 @@ bool SshMasterConnection::checkLogin()
         char buffer[1024 * 512]; //512K buffer
         bool hasInterraction = true;
         bool interactionStarted = false;
-        //         x2goDebug<<"CHECK LOGIN channel created."<<endl;
         while (ssh_channel_is_open(channel) &&
                !ssh_channel_is_eof(channel))
         {
@@ -1718,10 +1717,10 @@ bool SshMasterConnection::checkLogin()
             if (nbytes > 0)
             {
                 QString inf = QByteArray(buffer, nbytes);
-                x2goDebug << "LOGIN CHECK:" << inf;
+                x2goDebug << "LOGIN CHECK:" << inf << endl;
                 if (inf.indexOf("LOGIN OK") != -1)
                 {
-                    x2goDebug << "don't have interaction";
+                    x2goDebug << "don't have interaction" << endl;
                     hasInterraction = false;
                     break;
                 }
@@ -1744,7 +1743,6 @@ bool SshMasterConnection::checkLogin()
             interactionInputMutex.unlock();
             if (textToSend.length() > 0)
             {
-                // 	        x2goDebug<<"SEND Input to SERVER";
                 ssh_channel_write(channel, textToSend.toLocal8Bit().constData(), textToSend.length());
             }
             if (interrupt)
@@ -1754,17 +1752,17 @@ bool SshMasterConnection::checkLogin()
             this->usleep(30);
         }
 
-        x2goDebug << "LOOP FINISHED";
+        x2goDebug << "LOOP FINISHED" << endl;
         bool retVal = false;
         if (!hasInterraction)
         {
-            x2goDebug << "No interaction needed, continue session";
+            x2goDebug << "No interaction needed, continue session" << endl;
             retVal = true;
         }
         else
         {
             sshProcErrString = tr("Reconnect session");
-            x2goDebug << "Reconnect session";
+            x2goDebug << "Reconnect session" << endl;
         }
         ssh_channel_close(channel);
         ssh_channel_send_eof(channel);
@@ -1816,11 +1814,11 @@ void SshMasterConnection::addChannelConnection(SshProcess *creator, QString uuid
     con.command = cmd;
     con.uuid = uuid;
 
-    x2goDebug << "Locking SSH channel connection MUTEX.";
+    x2goDebug << "Locking SSH channel connection MUTEX." << endl;
     channelConnectionsMutex.lock();
-    x2goDebug << "Passing new channel connection object to channelConnections.";
+    x2goDebug << "Passing new channel connection object to channelConnections." << endl;
     channelConnections << con;
-    x2goDebug << "Unlocking SSH channel connection MUTEX.";
+    x2goDebug << "Unlocking SSH channel connection MUTEX." << endl;
     channelConnectionsMutex.unlock();
 }
 
@@ -1962,7 +1960,7 @@ void SshMasterConnection::channelLoop()
         channelConnectionsMutex.lock();
         if (channelConnections.size() <= 0)
         {
-            //             x2goDebug<<"no channel connections, waiting\n";
+            // x2goDebug<<"no channel connections, waiting\n";
             channelConnectionsMutex.unlock();
             usleep(500);
             continue;
@@ -2001,7 +1999,7 @@ void SshMasterConnection::channelLoop()
                     x2goDebug << "Forwarding parameters: from remote (" << channelConnections.at(i).forwardHost << ":"
                               << channelConnections.at(i).forwardPort << ") to local ("
                               << channelConnections.at(i).localHost << ":" << channelConnections.at(i).localPort
-                              << ")";
+                              << ")" << endl;
 
                     /*
                      * Cannot support config file parsing here with pre-0.6.0 libssh versions.
@@ -2013,7 +2011,7 @@ void SshMasterConnection::channelLoop()
                     if (!tmp_session)
                     {
                         QString error_msg = tr("Cannot create SSH session.");
-                        x2goDebug << error_msg;
+                        x2goDebug << error_msg << endl;
                         emit ioErr(channelConnections[i].creator, error_msg, "");
                     }
                     else
@@ -2031,16 +2029,16 @@ void SshMasterConnection::channelLoop()
                         /* The host and port might be a shorthand and zero, so fetch the actual data. */
                         if (ssh_options_parse_config(tmp_session, NULL) < 0)
                         {
-                            x2goDebug << "Warning: unable to parse the SSH config file.";
+                            x2goDebug << "Warning: unable to parse the SSH config file." << endl;
                         }
 
                         unsigned int inferred_port = 0;
                         ssh_options_get_port(tmp_session, &inferred_port);
-                        x2goDebug << "Temporary session port after config file parse: " << inferred_port;
+                        x2goDebug << "Temporary session port after config file parse: " << inferred_port << endl;
 
                         char *inferred_host = NULL;
                         ssh_options_get(tmp_session, SSH_OPTIONS_HOST, &inferred_host);
-                        x2goDebug << "Temporary session host after config file parse: " << inferred_host;
+                        x2goDebug << "Temporary session host after config file parse: " << inferred_host << endl;
 
                         channelConnections[i].forwardHost = QString(inferred_host);
                         channelConnections[i].forwardPort = static_cast<int>(inferred_port);
@@ -2105,12 +2103,10 @@ void SshMasterConnection::channelLoop()
 
         if (retval == -1)
         {
-            x2goDebug << "select() error.";
+            x2goDebug << "select() error." << endl;
             continue;
         }
 
-        //         x2goDebug<<"select exited"<<endl;
-
         channelConnectionsMutex.lock();
         for (int i = channelConnections.size() - 1; i >= 0; --i)
         {
@@ -2128,7 +2124,7 @@ void SshMasterConnection::channelLoop()
             int rez = ssh_channel_poll(channel, 0);
             if (rez == SSH_EOF)
             {
-                x2goDebug << "EOF on channel " << channel << "; SshProcess object: " << channelConnections[i].creator->pid;
+                x2goDebug << "EOF on channel " << channel << "; SshProcess object: " << channelConnections[i].creator->pid << endl;
 
                 //////Finished////////
                 finalize(i);
@@ -2172,7 +2168,7 @@ void SshMasterConnection::channelLoop()
 
                 if (ssh_channel_is_eof(channel))
                 {
-                    x2goDebug << "EOF on channel " << channel << "; SshProcess object: " << channelConnections[i].creator->pid;
+                    x2goDebug << "EOF on channel " << channel << "; SshProcess object: " << channelConnections[i].creator->pid << endl;
 
                     //////Finished////////
                     finalize(i);
@@ -2229,9 +2225,9 @@ void SshMasterConnection::finalize(int item)
     if (channel)
     {
         ssh_channel_send_eof(channel);
-        x2goDebug << "EOF sent.";
+        x2goDebug << "EOF sent." << endl;
         ssh_channel_close(channel);
-        x2goDebug << "Channel closed.";
+        x2goDebug << "Channel closed." << endl;
         ssh_channel_free(channel);
     }
     if (tcpSocket > 0)
-- 
2.17.1

From 9bfc1728baa444a088d567fa484fdcffce629db1 Mon Sep 17 00:00:00 2001
From: Melroy van den Berg <[email-masked]>
Date: Tue, 19 May 2020 22:40:44 +0200
Subject: [PATCH 03/11] send eof before close

---
 src/sshmasterconnection.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
index f598e9c..d8f894d 100644
--- a/src/sshmasterconnection.cpp
+++ b/src/sshmasterconnection.cpp
@@ -1764,8 +1764,8 @@ bool SshMasterConnection::checkLogin()
             sshProcErrString = tr("Reconnect session");
             x2goDebug << "Reconnect session" << endl;
         }
-        ssh_channel_close(channel);
         ssh_channel_send_eof(channel);
+        ssh_channel_close(channel);
         ssh_channel_free(channel);
         return retVal;
     }
-- 
2.17.1

From 863c8a2c79e9b912a2fc8759bbccd104f398f57e Mon Sep 17 00:00:00 2001
From: Melroy van den Berg <[email-masked]>
Date: Tue, 19 May 2020 22:42:18 +0200
Subject: [PATCH 04/11] return false in all bad cases

---
 src/sshmasterconnection.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
index d8f894d..aa75ec1 100644
--- a/src/sshmasterconnection.cpp
+++ b/src/sshmasterconnection.cpp
@@ -1699,6 +1699,7 @@ bool SshMasterConnection::checkLogin()
         QString errorMsg = tr("%1 failed.").arg("ssh_channel_request_exec");
         x2goDebug << errorMsg.left(errorMsg.size() - 1) << ": " << err << endl;
         ssh_channel_free(channel);
+        return false;
     }
     else
     {
-- 
2.17.1

From 78f23042d6203c88edf8f3befde15f4dc6429fc7 Mon Sep 17 00:00:00 2001
From: Melroy van den Berg <[email-masked]>
Date: Tue, 19 May 2020 22:59:15 +0200
Subject: [PATCH 06/11] Remove deprecated call and use new libssh API call.
 Plus some minor formatting.

---
 src/sshmasterconnection.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
index c068c89..022f710 100644
--- a/src/sshmasterconnection.cpp
+++ b/src/sshmasterconnection.cpp
@@ -571,7 +571,6 @@ void SshMasterConnection::run()
 #endif

     if (useproxy && proxytype == PROXYHTTP)
@@ -912,7 +911,11 @@ int SshMasterConnection::serverAuth(QString &errorMsg)
 #if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 8, 0)
     rc = ssh_get_server_publickey(my_ssh_session, &srv_pubkey);
 #else  /* LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 8, 0) */
-    rc = ssh_get_publickey(my_ssh_session, &srv_pubkey);
+    rc = ssh_get_server_publickey(my_ssh_session, &srv_pubkey);
+    if (SSH_OK != rc)
+    {
+        return (SSH_SERVER_ERROR);
+    }
 #endif /* LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 8, 0) */
 
     if (SSH_OK != rc)
-- 
2.17.1

From bfbb2f3d22b687df4d7e073b42d3ce1409f49574 Mon Sep 17 00:00:00 2001
From: Melroy van den Berg <[email-masked]>
Date: Tue, 19 May 2020 22:57:19 +0200
Subject: [PATCH 05/11] Refactor and fix channel/session closes

---
 src/sshmasterconnection.cpp | 272 ++++++++++++++++++++----------------
 src/sshmasterconnection.h   |  13 +-
 2 files changed, 156 insertions(+), 129 deletions(-)

diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
index aa75ec1..c068c89 100644
--- a/src/sshmasterconnection.cpp
+++ b/src/sshmasterconnection.cpp
@@ -544,6 +544,7 @@ void SshMasterConnection::run()
 #endif
     }

     my_ssh_session = ssh_new();
@@ -694,7 +695,7 @@ void SshMasterConnection::run()
             else
             {
                 x2goDebug << "Login Check - Failed" << endl;
-                //          if(!interactionInterrupt)
+                // if(!interactionInterrupt)
                 {
                     emit finishInteraction(this);
                 }
@@ -787,7 +788,7 @@ bool SshMasterConnection::sshConnect()
     /* Parse ~/.ssh/config. */
     if (ssh_options_parse_config(my_ssh_session, NULL) < 0)
     {
-        x2goDebug << "Warning: unable to parse the SSH config file.";
+        x2goDebug << "Warning: unable to parse the SSH config file." << endl;
     }
 
 #if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
@@ -849,6 +850,7 @@ bool SshMasterConnection::sshConnect()

+                ssh_disconnect(tmp_session);
                 ssh_free(tmp_session);
             }
         }
@@ -1974,129 +1976,16 @@ void SshMasterConnection::channelLoop()
 
         for (int i = 0; i < channelConnections.size(); ++i)
         {
-            int tcpSocket = channelConnections.at(i).sock;
-            if (tcpSocket > 0)
-                FD_SET(tcpSocket, &rfds);
-            if (channelConnections.at(i).channel == 0l)
+            // Try to make a channel connection
+            // TODO: Mabye a retry?
+            bool res = createChannelConnection(i, maxsock, rfds, read_chan);
+            if (!res)
             {
-                x2goDebug << "Creating new channel." << endl;
-                ssh_channel channel = ssh_channel_new(my_ssh_session);
-
-                if (!channel)
-                {
-                    QString err = ssh_get_error(my_ssh_session);
-                    /*: Argument in this context will be a function name. */
-                    QString error_msg = tr("%1 failed.").arg("ssh_channel_new");
-                    emit ioErr(channelConnections[i].creator, error_msg, err);
-
-                    x2goDebug << error_msg.left(error_msg.size() - 1) << ": " << err << endl;
-
-                    continue;
-                }
-                x2goDebug << "New channel:" << channel << endl;
-                channelConnections[i].channel = channel;
-                if (tcpSocket > 0)
-                {
-                    x2goDebug << "Forwarding parameters: from remote (" << channelConnections.at(i).forwardHost << ":"
-                              << channelConnections.at(i).forwardPort << ") to local ("
-                              << channelConnections.at(i).localHost << ":" << channelConnections.at(i).localPort
-                              << ")" << endl;
-
-                    /*
-                     * Cannot support config file parsing here with pre-0.6.0 libssh versions.
-                     * There's just no way to get the inferred host and port values.
-                     */
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
-                    ssh_session tmp_session = ssh_new();
-
-                    if (!tmp_session)
-                    {
-                        QString error_msg = tr("Cannot create SSH session.");
-                        x2goDebug << error_msg << endl;
-                        emit ioErr(channelConnections[i].creator, error_msg, "");
-                    }
-                    else
-                    {
-                        QByteArray tmp_BA = channelConnections.at(i).forwardHost.toLocal8Bit();
-                        const int tmp_port = channelConnections.at(i).forwardPort;
-
-                        ssh_options_set(tmp_session, SSH_OPTIONS_HOST, tmp_BA.data());
-
-                        if (tmp_port)
-                        {
-                            ssh_options_set(tmp_session, SSH_OPTIONS_PORT, &tmp_port);
-                        }
-
-                        /* The host and port might be a shorthand and zero, so fetch the actual data. */
-                        if (ssh_options_parse_config(tmp_session, NULL) < 0)
-                        {
-                            x2goDebug << "Warning: unable to parse the SSH config file." << endl;
-                        }
-
-                        unsigned int inferred_port = 0;
-                        ssh_options_get_port(tmp_session, &inferred_port);
-                        x2goDebug << "Temporary session port after config file parse: " << inferred_port << endl;
-
-                        char *inferred_host = NULL;
-                        ssh_options_get(tmp_session, SSH_OPTIONS_HOST, &inferred_host);
-                        x2goDebug << "Temporary session host after config file parse: " << inferred_host << endl;
-
-                        channelConnections[i].forwardHost = QString(inferred_host);
-                        channelConnections[i].forwardPort = static_cast<int>(inferred_port);
-
-                        ssh_string_free_char(inferred_host);
-                        ssh_free(tmp_session);
-                    }
-#endif
-
-                    {
-                        QByteArray tmp_BA_forward = channelConnections.at(i).forwardHost.toLocal8Bit();
-                        QByteArray tmp_BA_local = channelConnections.at(i).localHost.toLocal8Bit();
-
-                        if (ssh_channel_open_forward(channel,
-                                                     tmp_BA_forward.data(),
-                                                     channelConnections.at(i).forwardPort,
-                                                     tmp_BA_local.data(),
-                                                     channelConnections.at(i).localPort) != SSH_OK)
-                        {
-                            QString err = ssh_get_error(my_ssh_session);
-                            QString errorMsg = tr("%1 failed.").arg("ssh_channel_open_forward");
-                            emit ioErr(channelConnections[i].creator, errorMsg, err);
-                            x2goDebug << errorMsg.left(errorMsg.size() - 1) << ": " << err << endl;
-                        }
-                        else
-                        {
-                            x2goDebug << "New channel forwarded." << endl;
-                        }
-                    }
-                }
-                else
-                {
-                    x2goDebug << "Executing remote: " << channelConnections.at(i).command << endl;
-                    if (ssh_channel_open_session(channel) != SSH_OK)
-                    {
-                        QString err = ssh_get_error(my_ssh_session);
-                        QString errorMsg = tr("%1 failed.").arg("ssh_channel_open_session");
-                        emit ioErr(channelConnections[i].creator, errorMsg, err);
-                        x2goDebug << errorMsg.left(errorMsg.size() - 1) << ": " << err << endl;
-                    }
-                    else if (ssh_channel_request_exec(channel, channelConnections[i].command.toLatin1()) != SSH_OK)
-                    {
-                        QString err = ssh_get_error(my_ssh_session);
-                        QString errorMsg = tr("%1 failed.").arg("ssh_channel_request_exec");
-                        emit ioErr(channelConnections[i].creator, errorMsg, err);
-                        x2goDebug << errorMsg.left(errorMsg.size() - 1) << ": " << err << endl;
-                    }
-                    else
-                    {
-                        x2goDebug << "New exec channel created." << endl;
-                    }
-                }
+                x2goDebug << "Connection to channel went wrong.";
+                continue;
             }
-            read_chan[i] = channelConnections.at(i).channel;
-            if (tcpSocket > maxsock)
-                maxsock = tcpSocket;
         }
+
         channelConnectionsMutex.unlock();
         retval = ssh_select(read_chan, out_chan, maxsock + 1, &rfds, &tv);
         delete[] read_chan;
@@ -2219,6 +2108,145 @@ void SshMasterConnection::channelLoop()
     }
 }
 
+/**
 void SshMasterConnection::finalize(int item)
     int tcpSocket = channelConnections.at(item).sock;
index c7883be..effae16 100644
@@ -27,13 +27,11 @@
 #include <QTcpSocket>
 #include <QNetworkProxy>
 
-#define PROPERTY(TYPE, NAME)           \
-private:                               \
-    TYPE NAME;                         \
-                                       \
-public:                                \
-    TYPE get_##NAME() { return NAME; } \
-    void set_##NAME(TYPE VAL) { NAME = VAL; }
+
+#define PROPERTY(TYPE,NAME)  private: TYPE NAME; \
+public: TYPE get_##NAME(){return NAME;} \
+void set_##NAME(TYPE VAL){NAME=VAL;}
+
 
 class ONMainWindow;
 class SshProcess;
@@ -141,6 +139,7 @@ private:
     bool userAuthKrb();
     bool userAuthKeyboardInteractive(QString prompt);
     void channelLoop();
+    bool createChannelConnection(int i, int& maxsock, fd_set& rfds, ssh_channel read_chan[]);
     void finalize(int arg1);
     void copy();
     int serverAuth(QString &errorMsg);
-- 
2.17.1

From ff56cc7dad1f99e20dc9ffad8641bd3cb03236fa Mon Sep 17 00:00:00 2001
From: Melroy van den Berg <[email-masked]>
Date: Tue, 19 May 2020 23:00:10 +0200
Subject: [PATCH 07/11] Fix 'when not' password auth. Otherwise you get double
 error messages. return ret iso return (ret)

---
 src/sshmasterconnection.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
index 022f710..7192574 100644
--- a/src/sshmasterconnection.cpp
+++ b/src/sshmasterconnection.cpp
@@ -1263,7 +1263,7 @@ bool SshMasterConnection::userAuthWithPass()
         }
     }
 
-    if ((!ret) && (method & ~SSH_AUTH_METHOD_PASSWORD))
+    if ((!ret) && !(method & SSH_AUTH_METHOD_PASSWORD))
     {
         /* In case password auth is disabled, make sure the error message is not empty. */
         QString err = ssh_get_error(my_ssh_session);
@@ -1271,7 +1271,7 @@ bool SshMasterConnection::userAuthWithPass()
         x2goDebug << "Password authentication not available: " << err << endl;
     }
 
-    return (ret);
+    return ret;
 }
 
2.17.1

From 5e757709ac03c397d6a0cb462d2eacaeb0f0d735 Mon Sep 17 00:00:00 2001
From: Melroy van den Berg <[email-masked]>
Date: Tue, 19 May 2020 23:13:27 +0200
Subject: [PATCH 10/11] Mark as unused explicitly

---
 src/sshmasterconnection.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
index 63bf507..401d778 100644
--- a/src/sshmasterconnection.cpp
+++ b/src/sshmasterconnection.cpp
@@ -423,18 +423,18 @@ int SshMasterConnection::startTunnel(const QString &forwardHost, uint forwardPor
     return proc->pid;
 }
 
-void SshMasterConnection::slotSshProxyInteractionFinish(SshMasterConnection *connection)
+void SshMasterConnection::slotSshProxyInteractionFinish(SshMasterConnection *connection /* unused */)
 {
     x2goDebug << "SSH proxy interaction finished" << endl;
     slotSshProxyUserAuthError("NO_ERROR");
 }
 
-void SshMasterConnection::slotSshProxyInteractionStart(SshMasterConnection *connection, QString prompt)
+void SshMasterConnection::slotSshProxyInteractionStart(SshMasterConnection *connection /* unused */, QString prompt)
 {
     emit startInteraction(this, prompt);
 }
 
-void SshMasterConnection::slotSshProxyInteractionUpdate(SshMasterConnection *connection, QString output)
+void SshMasterConnection::slotSshProxyInteractionUpdate(SshMasterConnection *connection /* unused */, QString output)
 {
     emit updateInteraction(this, output);
 }
-- 
2.17.1

From e3c7479aaaacbdfe0f82d794583396dde2f7abd6 Mon Sep 17 00:00:00 2001
From: Melroy van den Berg <[email-masked]>
Date: Tue, 19 May 2020 23:14:20 +0200
Subject: [PATCH 11/11] improve gitignore, why not

---
 .gitignore | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index eafee6a..36c8558 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,5 +29,5 @@ x2goclient.dmg
 
 x2goclient.pro.user
 
-# This file.
-.gitignore
+# Editors
+.vscode/
-- 
2.17.1

From fef431576853ec1359dcef879507b8e99d6e71c2 Mon Sep 17 00:00:00 2001
From: Melroy van den Berg <[email-masked]>
Date: Tue, 19 May 2020 23:01:05 +0200
Subject: [PATCH 08/11] Correct retval check. Plus some minor formatting.

---
 src/sshmasterconnection.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
index 7192574..feaff4c 100644
--- a/src/sshmasterconnection.cpp
+++ b/src/sshmasterconnection.cpp
@@ -1665,7 +1665,6 @@ bool SshMasterConnection::checkLogin()
     interactionInputText = QString::null;
 
     ssh_channel channel = ssh_channel_new(my_ssh_session);
-
     if (!channel)
     {
         QString err = ssh_get_error(my_ssh_session);
@@ -1994,7 +1993,7 @@ void SshMasterConnection::channelLoop()
         delete[] read_chan;
         delete[] out_chan;
 
-        if (retval == -1)
+        if (SSH_OK != retval)
         {
             x2goDebug << "select() error." << endl;
             continue;
-- 
2.17.1

From b873eb172bf09f54476ed1f2184361e02b35bc50 Mon Sep 17 00:00:00 2001
From: Melroy van den Berg <[email-masked]>
Date: Tue, 19 May 2020 23:09:40 +0200
Subject: [PATCH 09/11] Another missing endl

---
 src/sshmasterconnection.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
index feaff4c..63bf507 100644
--- a/src/sshmasterconnection.cpp
+++ b/src/sshmasterconnection.cpp
@@ -2140,7 +2140,7 @@ bool SshMasterConnection::createChannelConnection(int i, int &maxsock, fd_set &r
             x2goDebug << "Forwarding parameters: from remote (" << channelConnections.at(i).forwardHost << ":"
                       << channelConnections.at(i).forwardPort << ") to local ("
                       << channelConnections.at(i).localHost << ":" << channelConnections.at(i).localPort
-                      << ")";
+                      << ")" << endl;
 
             /*
                 * Cannot support config file parsing here with pre-0.6.0 libssh versions.
-- 
2.17.1

From c71fded919855314cbd9d1554777fb9b4ddac548 Mon Sep 17 00:00:00 2001
From: Melroy van den Berg <[email-masked]>
Date: Tue, 19 May 2020 22:28:58 +0200
Subject: [PATCH 01/11] First auto-format the code, for readability and
 humankind

---
 src/sshmasterconnection.cpp | 1940 ++++++++++++++++++-----------------
 src/sshmasterconnection.h   |  119 ++-
 2 files changed, 1035 insertions(+), 1024 deletions(-)

diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
index 8b59fe7..424cad2 100644
--- a/src/sshmasterconnection.cpp
+++ b/src/sshmasterconnection.cpp
@@ -23,7 +23,6 @@
 #include <stddef.h>
 #include "sshprocess.h"
 
-
 #include <QStringList>
 #include <QFile>
 #include <QDir>
@@ -43,36 +42,33 @@
 
-
 
-

-
 #ifdef Q_OS_WIN
 #include <QSettings>

 

 

 
-
 
-    breakLoop=false;
               << "; proxyport " << proxyport;
 
-        if (!tmp_session) {
             x2goDebug << error_msg;
         }
-        else {
+        else
+        {
             QByteArray tmp_BA;

 
-            if (ssh_options_parse_config (tmp_session, NULL) < 0) {
+            if (ssh_options_parse_config(tmp_session, NULL) < 0)
+            {
                 x2goDebug << "Warning: unable to parse the SSH config file.";
             }
 
             char *inferred_username = NULL;
-            ssh_options_get (tmp_session, SSH_OPTIONS_USER, &inferred_username);
+            ssh_options_get(tmp_session, SSH_OPTIONS_USER, &inferred_username);
             x2goDebug << "Temporary session user name after config file parse: " << inferred_username;

 
 
     if (kerberos)
     {
-        x2goDebug<<"Starting SSH connection with Kerberos authentication.";
+        x2goDebug << "Starting SSH connection with Kerberos authentication.";
     }
     else
     {
-        x2goDebug<<"Starting SSH connection without Kerberos authentication.";
+        x2goDebug << "Starting SSH connection without Kerberos authentication.";
     }
-    x2goDebug<<"SshMasterConnection, instance "<<this<<" created.";
+    x2goDebug << "SshMasterConnection, instance " << this << " created.";
 }
 
-
 void SshMasterConnection::slotSshProxyConnectionOk()
 {
-    x2goDebug<<"SSH proxy connected.";
+    x2goDebug << "SSH proxy connected.";
 
-

-

 
-
 
             int rc = SSH_AGAIN;

-                if(rc==SSH_OK)
+                if (rc == SSH_OK)
                 {
                     emit reverseTunnelOk(reverseTunnelRequest[i].creator);
-                    x2goDebug<<"Listening for TCP/IP connections on "<<reverseTunnelRequest[i].forwardPort;
+                    x2goDebug << "Listening for TCP/IP connections on " << reverseTunnelRequest[i].forwardPort;
                 }
-                if(rc==SSH_ERROR)
+                if (rc == SSH_ERROR)
                 {
-                    QString err=ssh_get_error(my_ssh_session);
-                    x2goDebug<<"Forward port "<<reverseTunnelRequest[i].forwardPort<<" failed:"<<err;
+                    QString err = ssh_get_error(my_ssh_session);
+                    x2goDebug << "Forward port " << reverseTunnelRequest[i].forwardPort << " failed:" << err;
                     emit reverseTunnelFailed(reverseTunnelRequest[i].creator, err);
                 }
             }
@@ -342,192 +336,185 @@ void SshMasterConnection::addReverseTunnelConnections()
 void SshMasterConnection::checkReverseTunnelConnections()
 {
     int port;
-    ssh_channel chan=ssh_channel_accept_forward(my_ssh_session, 0, &port);
-    if(chan)
+    ssh_channel chan = ssh_channel_accept_forward(my_ssh_session, 0, &port);
+    if (chan)
     {
-        x2goDebug<<"New reverse connection on port "<<port;
+        x2goDebug << "New reverse connection on port " << port;
 
+                x2goDebug << "Creating new channel for reverse tunnel " << port;

 
                 ChannelConnection con;
-                con.channel=chan;
-                con.sock=sock;
+                x2goDebug << "New channel created";
 
-
 
+void SshMasterConnection::slotSshProxyInteractionFinish(SshMasterConnection *connection)
 
-void SshMasterConnection::slotSshProxyInteractionStart(SshMasterConnection* connection, QString prompt)
+void SshMasterConnection::slotSshProxyInteractionStart(SshMasterConnection *connection, QString prompt)
 {
     emit startInteraction(this, prompt);
 }
 
-void SshMasterConnection::slotSshProxyInteractionUpdate(SshMasterConnection* connection, QString output)
+void SshMasterConnection::slotSshProxyInteractionUpdate(SshMasterConnection *connection, QString output)
 {
     emit updateInteraction(this, output);
 }
 
-

 
-
 void SshMasterConnection::slotSshProxyTunnelOk(int)
 {
-    x2goDebug<<"SSH proxy tunnel established.";
-    sshProxyReady=true;
+    x2goDebug << "SSH proxy tunnel established.";
+    sshProxyReady = true;
 }

-
-
 
+    x2goDebug << "SshMasterConnection, instance " << this << " entering thread.";
 
-        while(! sshProxyReady)
+        while (!sshProxyReady)
         {
-            if(breakLoop)
+            if (breakLoop)
             {
                 quit();
                 return;
@@ -535,44 +522,46 @@ void SshMasterConnection::run()
             this->usleep(200);
         }
     }
-    disconnectSessionFlag=false;
+    disconnectSessionFlag = false;

 
 
     long timeout = 60;

 #ifdef Q_OS_WIN
     {
 
@@ -588,129 +577,129 @@ void SshMasterConnection::run()

-    if ( !sshConnect() )
+    if (!sshConnect())
     {

 
 #ifdef Q_OS_WIN
     {

-    if ( userAuth() )
+    if (userAuth())
     {
+            x2goDebug << "Skipping Login Check as requested by configuration";
+                x2goDebug << "Login Check - OK";
+                x2goDebug << "Login Check - Failed";
 
-
 #ifndef Q_OS_WIN
-    const int y=1;
+    const int y = 1;
 #else
-    const char y=1;
+    const char y = 1;
 #endif
 
     channelLoop();
 }
 
-
 
     disconnectFlagMutex.lock();
-    disconnectSessionFlag=true;
+    disconnectSessionFlag = true;
     disconnectFlagMutex.unlock();
-    x2goDebug<<"SshMasterConnection, instance "<<this<<" waiting for thread to finish.";
+    x2goDebug << "SshMasterConnection, instance " << this << " waiting for thread to finish.";
     wait(15000);
-    x2goDebug<<"SshMasterConnection, instance "<<this<<" thread finished.";
-    for(int i=processes.count()-1; i>=0; --i)
+    x2goDebug << "SshMasterConnection, instance " << this << " thread finished.";
+    for (int i = processes.count() - 1; i >= 0; --i)
     {
         delete processes[i];
     }
-    x2goDebug<<"SshMasterConnection, instance "<<this<<" finished destructor.";
+    x2goDebug << "SshMasterConnection, instance " << this << " finished destructor.";
 }
 
-
 
     x2goDebug << "Session port before config file parse: " << cur_port;
 #endif
 
     /* Parse ~/.ssh/config. */
-    if (ssh_options_parse_config (my_ssh_session, NULL) < 0) {
+    if (ssh_options_parse_config(my_ssh_session, NULL) < 0)
+    {
         x2goDebug << "Warning: unable to parse the SSH config file.";
     }
 
     x2goDebug << "Session port after config file parse: " << cur_port;
 #endif
 
         x2goDebug << "Connected via proxy, resetting connection values on session to " << tmpBA.data() << ":" << port;
 
         /*
          * The SSH port might be 0, which indicates to use the default port
@@ -834,205 +822,207 @@ bool SshMasterConnection::sshConnect()
         int work_port = port;

-            if (!tmp_session) {
                 x2goDebug << error_msg;
 
                 /* Parse ~/.ssh/config. */
-                if (ssh_options_parse_config (tmp_session, NULL) < 0) {
+                if (ssh_options_parse_config(tmp_session, NULL) < 0)
+                {
                     x2goDebug << "Warning: unable to parse the SSH config file.";
                 }
 
                 unsigned int inferred_port = 0;
-                ssh_options_get_port (tmp_session, &inferred_port);
+                ssh_options_get_port(tmp_session, &inferred_port);
                 x2goDebug << "Fetched inferred session port: " << inferred_port;

 
 
     x2goDebug << "Session port before config file parse (part 2): " << cur_port;
 #endif
 
     /* Parse ~/.ssh/config. */
-    if (ssh_options_parse_config (my_ssh_session, NULL) < 0) {
+    if (ssh_options_parse_config(my_ssh_session, NULL) < 0)
+    {
         x2goDebug << "Warning: unable to parse the SSH config file.";
     }
 
     x2goDebug << "Session port after config file parse (part 2): " << cur_port;
 #endif
 
     return true;
 }
 
-
 
-
-int SshMasterConnection::serverAuth ( QString& errorMsg )
+int SshMasterConnection::serverAuth(QString &errorMsg)
 {
-    x2goDebug<<"cserverAuth";
+    x2goDebug << "cserverAuth";

 
+    rc = ssh_get_publickey(my_ssh_session, &srv_pubkey);
 
-    if (SSH_OK != rc) {
+    if (SSH_OK != rc)
+    {

-    if (0 != rc) {
+    if (0 != rc)
+    {
 
-    if ( 0 >= hlen )
+    if (0 >= hlen)
         return SSH_SERVER_ERROR;

-    switch ( state )
+    switch (state)
     {

     case SSH_SERVER_ERROR:

-
-
+    x2goDebug << "Open Interaction dialog to complete authentication";
 
-        if(firstLoop)
+        if (firstLoop)
         {
-            firstLoop=false;
+            firstLoop = false;
         }
         else
         {
 
+                    x2goDebug << "SEND Input to SERVER";
+                    x2goDebug << "Keyboard authentication failed";
 
                     return false;
@@ -1041,159 +1031,163 @@ bool SshMasterConnection::userAuthKeyboardInteractive(QString prompt)
             }
         }
 
+        x2goDebug << "Keyboard authentication successful";
+        x2goDebug << "Keyboard authentication failed";
 
         return false;
     }

     return false;
-
 }
 
-
-
 
-    switch( rez)
+    switch (rez)
     {
     case SSH_AUTH_INFO:

 

 

         return false;
     }
     return false;
-
 }
 
-
 bool SshMasterConnection::userAuthWithPass()
 {
     bool ret = false;
@@ -1203,61 +1197,71 @@ bool SshMasterConnection::userAuthWithPass()

 
 
-        if (!ret) {
+        if (!ret)
+        {
 
-    if (!ret) {
+    if (!ret)
+    {

 

 
 
-    if ((!ret) && (method & ~SSH_AUTH_METHOD_PASSWORD)) {
+    if ((!ret) && (method & ~SSH_AUTH_METHOD_PASSWORD))
+    {
         /* In case password auth is disabled, make sure the error message is not empty. */
-        QString err = ssh_get_error (my_ssh_session);
+        QString err = ssh_get_error(my_ssh_session);
         authErrors << err;
         x2goDebug << "Password authentication not available: " << err << endl;
     }
@@ -1265,45 +1269,45 @@ bool SshMasterConnection::userAuthWithPass()
     return (ret);
 }
 
-

@@ -1313,37 +1317,36 @@ bool SshMasterConnection::userAuthAuto()
 
-

 
     /*
@@ -1356,166 +1359,175 @@ bool SshMasterConnection::userAuthWithKey()
 
-    if (SSH_EOF == rc) {
+    if (SSH_EOF == rc)
+    {

         return (false);
     }

-    int i=0;

 
-        if (SSH_OK != rc) {
 
-        if(i++==2)
+        if (i++ == 2)
         {
             break;
         }
     }
+        x2goDebug << "Failed to get private key from " << keyName;

 
+        x2goDebug << "Failed to get public key from private key.";

 
 
     /* FIXME: handle SSH_AUTH_PARTIAL correctly! */
-    if (SSH_AUTH_SUCCESS != rc) {
+    if (SSH_AUTH_SUCCESS != rc)
+    {
         x2goDebug << "Unable to authenticate with public key.";

-        if (autoRemove) {
 
         return (false);
     }
 
-    do {

 
-    if ( autoRemove )

 
         return false;
     }
@@ -1556,14 +1568,17 @@ bool SshMasterConnection::userAuthKrb()
     local_cmd = "ssh";
 
     /* Kerberos options. */

@@ -1576,125 +1591,123 @@ bool SshMasterConnection::userAuthKrb()
      */
     local_args << shcmd;

 
         return false;
     }
 
-

 

@@ -1704,194 +1717,188 @@ bool SshMasterConnection::checkLogin()

 
-

-
 
     ChannelConnection con;
-    con.channel=NULL;
-    con.sock=-1;
-    con.creator=creator;
-    con.command=cmd;
-    con.uuid=uuid;
+    con.channel = NULL;
+    con.sock = -1;
+    con.creator = creator;
+    con.command = cmd;
+    con.uuid = uuid;

-
 
-

@@ -1900,47 +1907,47 @@ void SshMasterConnection::channelLoop()
     forever
     {
 
-        if ( disconnect )
+        if (disconnect)
         {

 

@@ -1950,260 +1957,263 @@ void SshMasterConnection::channelLoop()
         tv.tv_usec = 500000;
 
         int retval;
-        int maxsock=-1;
-
+        int maxsock = -1;

-        FD_ZERO ( &rfds );
+        FD_ZERO(&rfds);

-                if (!channel) {
                     /*: Argument in this context will be a function name. */

                     continue;
                 }
                               << ")";
 
                     /*
                      * Cannot support config file parsing here with pre-0.6.0 libssh versions.
                      * There's just no way to get the inferred host and port values.
                      */
-#if LIBSSH_VERSION_INT >= SSH_VERSION_INT (0, 6, 0)
-                    ssh_session tmp_session = ssh_new ();
+#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 6, 0)
+                    ssh_session tmp_session = ssh_new();
 
-                    if (!tmp_session) {
                         x2goDebug << error_msg;

-                        if (tmp_port) {
 
                         /* The host and port might be a shorthand and zero, so fetch the actual data. */
-                        if (ssh_options_parse_config (tmp_session, NULL) < 0) {
+                        if (ssh_options_parse_config(tmp_session, NULL) < 0)
+                        {
                             x2goDebug << "Warning: unable to parse the SSH config file.";
                         }
 
                         unsigned int inferred_port = 0;
-                        ssh_options_get_port (tmp_session, &inferred_port);
+                        ssh_options_get_port(tmp_session, &inferred_port);
                         x2goDebug << "Temporary session port after config file parse: " << inferred_port;
 
                         char *inferred_host = NULL;
-                        ssh_options_get (tmp_session, SSH_OPTIONS_HOST, &inferred_host);
+                        ssh_options_get(tmp_session, SSH_OPTIONS_HOST, &inferred_host);
                         x2goDebug << "Temporary session host after config file parse: " << inferred_host;

 
                     {
 
-        if ( retval == -1 )
+        if (retval == -1)
         {
-            x2goDebug<<"select() error.";
+            x2goDebug << "select() error.";
             continue;
         }
 
         //         x2goDebug<<"select exited"<<endl;
 
+                x2goDebug << "EOF on channel " << channel << "; SshProcess object: " << channelConnections[i].creator->pid;
 
                 //////Finished////////
-                finalize ( i );
+                finalize(i);
                 continue;
             }
-            if ( rez>0 )
+            if (rez > 0)
             {
 
-                if ( nbytes < 0 )
+                if (nbytes < 0)
                 {
                     //////ERROR!!!!!////////
 
-                if ( ssh_channel_is_eof ( channel ) )
+                if (ssh_channel_is_eof(channel))
                 {
-                    x2goDebug<<"EOF on channel "<<channel<<"; SshProcess object: "<<channelConnections[i].creator->pid;
+                    x2goDebug << "EOF on channel " << channel << "; SshProcess object: " << channelConnections[i].creator->pid;
 
                     //////Finished////////
-                    finalize ( i );
+                    finalize(i);
                     continue;
                 }
             }
-            if ( tcpSocket<=0 )
+            if (tcpSocket <= 0)
             {
                 continue;
             }
@@ -2212,34 +2222,30 @@ void SshMasterConnection::channelLoop()
     }
 }
 
+        x2goDebug << "EOF sent.";
+        x2goDebug << "Channel closed.";
index ffb853b..c7883be 100644
@@ -27,11 +27,13 @@
 #include <QTcpSocket>
 #include <QNetworkProxy>
 
-
-#define PROPERTY(TYPE,NAME)  private: TYPE NAME; \
-public: TYPE get_##NAME(){return NAME;} \
-void set_##NAME(TYPE VAL){NAME=VAL;}
-
+#define PROPERTY(TYPE, NAME)           \
+private:                               \
+    TYPE NAME;                         \
+                                       \
+public:                                \
+    TYPE get_##NAME() { return NAME; } \
+    void set_##NAME(TYPE VAL) { NAME = VAL; }
 
 class ONMainWindow;
 class SshProcess;
@@ -39,16 +41,16 @@ struct ChannelConnection
 {
     ssh_channel channel;
     int sock;
-    SshProcess* creator;
+    SshProcess *creator;
     int forwardPort;
     int localPort;
     QString forwardHost;
     QString localHost;
     QString command;
     QString uuid;
-    bool operator==(ChannelConnection& t)
+    bool operator==(ChannelConnection &t)
     {
-        return (channel==t.channel);
+        return (channel == t.channel);
     }
 };
 
@@ -57,25 +59,30 @@ struct ReverseTunnelRequest
     uint localPort;
     uint forwardPort;
     QString localHost;
-    SshProcess* creator;
+    SshProcess *creator;
     bool listen;
 };
 
 struct CopyRequest
 {
-    SshProcess* creator;
+    SshProcess *creator;
     QString src;
     QString dst;
 };
 
-class SshMasterConnection: public QThread
+class SshMasterConnection : public QThread
 {
     Q_OBJECT
     PROPERTY(bool, kerberosDelegation)
 public:
-    enum ProxyType {PROXYSSH, PROXYHTTP};
+    enum ProxyType
+    {
+        PROXYSSH,
+        PROXYHTTP
+    };
 
-    enum passphrase_types {
+    enum passphrase_types
+    {
         PASSPHRASE_PRIVKEY,
         PASSPHRASE_CHALLENGE,
         PASSPHRASE_PASSWORD,
@@ -83,28 +90,28 @@ public:
     };
 
     void run();
-    SshMasterConnection(QObject* parent, QString host, int port, bool acceptUnknownServers, QString user,
-                        QString pass, QString key, bool autologin, bool krblogin=false,
-                        bool useproxy=false, ProxyType type=PROXYSSH, QString proxyserver=QString::null, quint16 proxyport=0,
-                        QString proxylogin=QString::null, QString proxypassword=QString::null, QString proxyKey=QString::null,
-                        bool proxyAutologin=false, bool proxyKrbLogin=false);
+    SshMasterConnection(QObject *parent, QString host, int port, bool acceptUnknownServers, QString user,
+                        QString pass, QString key, bool autologin, bool krblogin = false,
+                        bool useproxy = false, ProxyType type = PROXYSSH, QString proxyserver = QString::null, quint16 proxyport = 0,
+                        QString proxylogin = QString::null, QString proxypassword = QString::null, QString proxyKey = QString::null,
+                        bool proxyAutologin = false, bool proxyKrbLogin = false);
     ~SshMasterConnection();
-    void addChannelConnection(SshProcess* creator, int sock, QString forwardHost,
-                              int forwardPort, QString localHost, int localPort, void* channel=0l);
-    void addChannelConnection(SshProcess* creator, QString uuid, QString cmd);
-    void addCopyRequest(SshProcess* creator, QString src, QString dst);
+    void addChannelConnection(SshProcess *creator, int sock, QString forwardHost,
+                              int forwardPort, QString localHost, int localPort, void *channel = 0l);
+    void addChannelConnection(SshProcess *creator, QString uuid, QString cmd);
+    void addCopyRequest(SshProcess *creator, QString src, QString dst);
     void writeKnownHosts(bool);
     void setKeyPhrase(QString);
 
-    int executeCommand(const QString& command, QObject* receiver=0, const char* slotFinished=0, bool overridePath=true);
-    int startTunnel(const QString& forwardHost, uint forwardPort, const QString& localHost,
-                    uint localPort, bool reverse=false, QObject* receiver=0, const char* slotTunnelOk=0, const char* slotFinished=0);
-    int copyFile(const QString& src, const QString dst, QObject* receiver=0, const char* slotFinished=0);
+    int executeCommand(const QString &command, QObject *receiver = 0, const char *slotFinished = 0, bool overridePath = true);
+    int startTunnel(const QString &forwardHost, uint forwardPort, const QString &localHost,
+                    uint localPort, bool reverse = false, QObject *receiver = 0, const char *slotTunnelOk = 0, const char *slotFinished = 0);
+    int copyFile(const QString &src, const QString dst, QObject *receiver = 0, const char *slotFinished = 0);
     QString getSourceFile(int pid);
 
     void setAcceptUnknownServers(bool accept)
     {
-        acceptUnknownServers=accept;
+        acceptUnknownServers = accept;
     }
     QString getHost()
     {
@@ -136,7 +143,7 @@ private:
     void channelLoop();
     void finalize(int arg1);
     void copy();
-    int serverAuth(QString& errorMsg);
+    int serverAuth(QString &errorMsg);
     void setVerficationCode(QString code);
     void checkReverseTunnelConnections();
     void addReverseTunnelConnections();
@@ -146,19 +153,18 @@ private:
 
 private slots:
 
-    void slotSshProxyServerAuthError ( int,QString, SshMasterConnection* );
-    void slotSshProxyServerAuthAborted ();
-    void slotSshProxyUserAuthError ( QString );
-    void slotSshProxyConnectionError ( QString,QString );
-
+    void slotSshProxyServerAuthError(int, QString, SshMasterConnection *);
+    void slotSshProxyServerAuthAborted();
+    void slotSshProxyUserAuthError(QString);
+    void slotSshProxyConnectionError(QString, QString);
 
     void slotSshProxyConnectionOk();
     void slotSshProxyTunnelOk(int);
-    void slotSshProxyTunnelFailed(bool result,  QString output,
+    void slotSshProxyTunnelFailed(bool result, QString output,
                                   int);
-    void slotSshProxyInteractionStart ( SshMasterConnection* connection, QString prompt );
-    void slotSshProxyInteractionUpdate ( SshMasterConnection* connection, QString output );
-    void slotSshProxyInteractionFinish ( SshMasterConnection* connection);
+    void slotSshProxyInteractionStart(SshMasterConnection *connection, QString prompt);
+    void slotSshProxyInteractionUpdate(SshMasterConnection *connection, QString output);
+    void slotSshProxyInteractionFinish(SshMasterConnection *connection);
 
 public slots:
     void interactionTextEnter(QString text);
@@ -180,7 +186,7 @@ private:
     bool writeHostKey;
     bool writeHostKeyReady;
     int nextPid;
-    QList<SshProcess*> processes;
+    QList<SshProcess *> processes;
 
     QString keyPhrase;
     bool keyPhraseReady;
@@ -205,12 +211,12 @@ private:
     bool disconnectSessionFlag;
     int localProxyPort;
     bool acceptUnknownServers;
-    ONMainWindow* mainWnd;
+    ONMainWindow *mainWnd;
     bool kerberos;
     QString sshProcErrString;
     QTcpSocket *tcpProxySocket;
     QNetworkProxy *tcpNetworkProxy;
-    SshMasterConnection* sshProxy;
+    SshMasterConnection *sshProxy;
     bool sshProxyReady;
     bool breakLoop;
     bool loginCheck;
@@ -221,30 +227,29 @@ private:
     static const QString challenge_auth_code_prompts_[];
 
 signals:
-    void stdErr(SshProcess* caller, QByteArray data);
-    void stdOut(SshProcess* caller, QByteArray data);
-    void ioErr(SshProcess* caller, QString error, QString lastSessionError);
-    void copyErr(SshProcess* caller, QString error, QString lastSessionError);
-    void copyOk(SshProcess* caller);
-    void channelClosed(SshProcess* caller, QString uuid);
-    void reverseTunnelOk(SshProcess* caller);
-    void reverseTunnelFailed(SshProcess* caller, QString error);
+    void stdErr(SshProcess *caller, QByteArray data);
+    void stdOut(SshProcess *caller, QByteArray data);
+    void ioErr(SshProcess *caller, QString error, QString lastSessionError);
+    void copyErr(SshProcess *caller, QString error, QString lastSessionError);
+    void copyOk(SshProcess *caller);
+    void channelClosed(SshProcess *caller, QString uuid);
+    void reverseTunnelOk(SshProcess *caller);
+    void reverseTunnelFailed(SshProcess *caller, QString error);
 
     void connectionError(QString message, QString lastSessionError);
-    void serverAuthError(int errCode, QString lastSessionError, SshMasterConnection*);
+    void serverAuthError(int errCode, QString lastSessionError, SshMasterConnection *);
     void serverAuthAborted();
     void userAuthError(QString error);
 
-    void connectionOk( QString host);
+    void connectionOk(QString host);
 
-    void needPassPhrase(SshMasterConnection*, SshMasterConnection::passphrase_types);
-    void needChallengeResponse(SshMasterConnection*, QString Challenge);
-    void startInteraction(SshMasterConnection*, QString prompt);
-    void finishInteraction(SshMasterConnection*);
-    void updateInteraction(SshMasterConnection*, QString output);
+    void needPassPhrase(SshMasterConnection *, SshMasterConnection::passphrase_types);
+    void needChallengeResponse(SshMasterConnection *, QString Challenge);
+    void startInteraction(SshMasterConnection *, QString prompt);
+    void finishInteraction(SshMasterConnection *);
+    void updateInteraction(SshMasterConnection *, QString output);
 };
 
-Q_DECLARE_METATYPE (SshMasterConnection::passphrase_types)
+Q_DECLARE_METATYPE(SshMasterConnection::passphrase_types)
 
 #endif // SSHMASTERCONNECTION_H
-
-- 
2.17.1

---

From: Mike Gabriel <[email-masked]>
Date: Tue, 19 May 2020 21:40:07 +0000

Hi Melroy,

On  Di 19 Mai 2020 23:24:09 CEST, Melroy van den Berg wrote:

> Since I was in a separate git branch I could run the format-patch  
> easily via:git format-patch master. Thanks for the suggestion.
>
> I think the end-result with all the separate patches makes more  
> sense now, sorry I didn't do it right away. I think once I have a  
> wiki account, I will add all these best practices your x2go wiki.  
> Instead of Attachment: <your-patch.diff>:  
> https://wiki.x2go.org/doku.php/wiki:bugs?s[]=git&s[]=patch#bug_submission_with_a_patch.
>

Awesome. I will go over those patches asap and give feedback. Thanks  
for providing the changeset in the way I requested. I will also  
provide wiki access the coming days (ideally tomorrow).

If you don't hear back from me until next Monday/Tuesday, please re-ping me.

Mike
-- 

DAS-NETZWERKTEAM

---

From: Mihai Moldovan <[email-masked]>
Date: Wed, 20 May 2020 09:41:11 +0200 (CEST)

tag #1469 pending
fixed #1469 4.1.2.3
thanks

Hi!

X2Go issue #1469 (src:x2goclient) reported by you has been
fixed in X2Go Git. You can see the changelog below, and you can
check the diff of the fix at:

    https://code.x2go.org/gitweb?p=x2goclient.git;a=commitdiff;h=56d82b912b3b92508fe21035e075dc879691f5dc

The issue will most likely be fixed in src:x2goclient (4.1.2.3).

light+love
X2Go Git Admin (on behalf of the sender of this mail)

---
commit 56d82b912b3b92508fe21035e075dc879691f5dc
Author: Melroy van den Berg <[email-masked]>
Date:   Wed May 20 09:38:47 2020 +0200

    .gitignore: ignore Visual Studio temporary files. Fixes: #1469.

diff --git a/debian/changelog b/debian/changelog
index 32a5550..21abcc1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -26,6 +26,7 @@ x2goclient (4.1.2.3-0x2go1) UNRELEASED; urgency=medium
       error messages.
     - src/sshmasterconnection: correct retval check.
     - src/sshmasterconnection: explicitly mark function parameters as unused.
+    - .gitignore: ignore Visual Studio temporary files. Fixes: #1469.
 
  -- X2Go Release Manager <[email-masked]>  Thu, 13 Feb 2020 12:31:20 +0100

---

From: Mihai Moldovan <[email-masked]>
Date: Wed, 20 May 2020 09:52:46 +0200

* On 5/19/20 11:24 PM, Melroy van den Berg wrote:
> Since I was in a separate git branch I could run the format-patch easily via:git
> format-patch master. Thanks for the suggestion.
> 
> I think the end-result with all the separate patches makes more sense now, sorry
> I didn't do it right away. I think once I have a wiki account, I will add all
> these best practices your x2go wiki. Instead of Attachment: <your-patch.diff>:

Alex's coding style is... special, I guess, but I usually don't change it unless
I have to change a line anyway and mine can also be considered odd at times.

0001-First-auto-format-the-code-for-readability-and-human.patch: won't apply,
it's just adding unnecessary noise and making blaming more difficult.

0002-endl-for-every-debug-line.patch: won't apply. Using (std::)endl is actually
a bug, because qDebug (which is used by x2goDebug internally) already appends a
newline character by default, so another endl call would just give us double
newlines and make the log output worse. I'm actually tempted to remove the other
endls instead, but there's no real benefit in doing so immediately, so I'll just
keep them until a change to the lines has to be made anyway (or it fits
semantically).

0003-send-eof-before-close.patch: good catch, thanks, applied. Strictly
speaking, though, this should not cause any issues, as ssh_channel_close () will
(according to its documentation) already send an EOF. The worst thing that
SHOULD happen is that the additional ssh_channel_send_eof () call is unnecessary
and will cause an internal error in libssh because it might want to write to an
already EOF'd and closed channel. Then again, this error should be benign, since
we'll kill the channel right away anyway.

0004-return-false-in-all-bad-cases.patch: applied, thanks.

0005-Refactor-and-fix-channel-session-closes.patch: highly amended, but mostly
ultimately applied. Did not apply unnecessary code style or endl changes, but
picked most stuff. Also, I originally made the new function static because I
didn't see any benefit in having it part of the API for other places to call it.
Turned out this was a bad idea, so I reverted to registering it within the class
and make it private, like you did. Thanks.

0006-Remove-deprecated-call-and-use-new-libssh-API-call.-.patch: won't apply.
This code path is for old libssh versions only (pre-0.8) and still works there,
so I don't see any reason to change it. Newer versions should already use the
non-deprecated function, so everything's fine.

0007-Fix-when-not-password-auth.-Otherwise-you-get-double.patch: mostly applied,
slightly amended. Not changing return (...) vs. return ..., the actual change
looks good though.

0008-Correct-retval-check.-Plus-some-minor-formatting.patch: functionally
applied, minus formatting.

0009-Another-missing-endl.patch: not applied, same reasoning as for 0001.

0010-Mark-as-unused-explicitly.patch: can't hurt, I guess, so applied, but
slightly amended.

0011-improve-gitignore-why-not.patch: mostly applied, without the .gitignore
file entry deletion which is intentional.

Mihai

---

From: Melroy van den Berg <[email-masked]>
Date: Wed, 20 May 2020 15:04:17 +0000

Hi Mike,

Thanks for your reply. Are are my thoughts.

> Using (std::)endl is actually a bug

Ah, thanks for the heads-up! I think in that case we should in fact remove all the endl instead of adding it :).

> Strictly speaking, though, this should not cause any issues

Why was I getting socket error then? I really hope everything got merged correctly now. Including my changes in the separate function.

Since all the changes together made my socket error from libssh disappear now.

> so I don't see any reason to change it.

I got deprecation warnings on this function/line while compiling. Why not merge it and remove build warnings?

The change in within the #else, maybe if you think it should be in the #if you can apply the change in that section (but I think in my case the else part got compiled).

Nevertheless, it's a deprecation that needs to be solved anyway.

> Not changing return (...) vs. return ..., the actual change
> looks good though.

Why not changing the return(). This is wrong code, it's just a boolean! Bad practice, please don't it. Don't be afraid to change it.

A generic remark: I think X2Go is missing a good pipeline with testcases and other quality checks. Which also hopefully increases your *trust in the code* and enables refactoring as well.

I'm not afraid to refactor the code and clean-up the formatting, splitting functions and even into multiple files. If this all improve readability, debuggability and test-ability long-term.

That is why I raise a request to create a decent pipeline to allow the necessary changes in further improve code maturity and the needed changes to do so.

And maybe even a better diff tool to perform refactoring changes during review.

Any ideas or suggestions? I'm running a GitLab instance myself for example; which enables DevOps and CI/CD within all my projects.

Thanks once more!

Kind regards,
Melroy van den Berg

---

From: Mihai Moldovan <[email-masked]>
Date: Mon, 25 May 2020 07:13:43 +0200

> Ah, thanks for the heads-up! I think in that case we should in fact remove all the endl instead of adding it :).

Yeah, probably. It creates additional newlines in the debug output which isn't
really intended. It might be a nice way to group messages to some degree, but I
figure I added most of the endls myself when I didn't know better, which was a
mistake in the past.

> Since all the changes together made my socket error from libssh disappear now.

Of course, I merged in most functional changes unless explicitly noted. The
issues were probably caused by the other locations, not this one specifically.
I pulled it anyway, because that's probably the more correct behavior in any case.

> Nevertheless, it's a deprecation that needs to be solved anyway.

It doesn't need to be solved because it *is* already solved when compiling
against newer libssh versions. The actual bug is that it seems to have used the
#else branch in your compile runs and I'm curious why. What OS have you been
using to build it and, specifically, what version of libssh-{4,dev} was installed?

Case in point, I certainly don't get a warning when building against libssh
0.9.3, which indicates that the the correct branch without the non-deprecated
function is used.

If your system has libssh >= 0.8.0 and it's taking the wrong branch, I'd like to
know what's wrong.

> Why not changing the return(). This is wrong code, it's just a boolean! Bad practice, please don't it. Don't be afraid to change it.

That's just not true.

Up until C++14, "return (foo)" and "return foo" were functionally absolutely
equivalent and just a matter of taste/style. I like the former way better,
because it encapsulates the return value optically.

Since C++14, you're half right that it's wrong, because both statements MIGHT
behave differently. This, however, is only the case for return values that
explicitly use decltype (auto).

We're not using any C++14 (or even C++11) features anyway and probably won't do
so for a longer time, because we also target legacy systems without such
support. In the end, it is personal preference here.

> A generic remark: I think X2Go is missing a good pipeline with testcases and
> other quality checks.

Yes, it does, and that's arguably bad. We've been discussing this every single
year, but that's a mammoth task.

> Which also hopefully increases your *trust in the code*
> and enables refactoring as well.
> I'm not afraid to refactor the code and clean-up the formatting, splitting
> functions and even into multiple files. If this all improve readability,
> debuggability and test-ability long-term.

I always avoid changing stuff for no good reason. While proper version control
systems like git take out some of the complexity that is involved by, e.g.,
formatting updates, it still comes at a price that cannot be automatically
handled by the tools.

I like to git blame a lot to see how portions of code changed, but each
non-functional change adds another layer of indirection to the process, which
can make it very frustrating.

Most software projects I came across handle it the same way and will tell you to
please split out non-functional changes or to just remove them completely.

> That is why I raise a request to create a decent pipeline to allow the necessary
> changes in further improve code maturity and the needed changes to do so.
> Any ideas or suggestions? I'm running a GitLab instance myself for example;
> which enables DevOps and CI/CD within all my projects.
> Thanks once more!

We do have a public Jenkins instance for CI at https://jenkins.x2go.org .

Testing is really a badly missing thing, but we try to test things in a manual
manner especially before a release if time permits, but naturally that's not a
substitute for, e.g., unit tests.

Completely automatic testing of GUI stuff is extremely difficult, though.

Maybe someday, but I won't and cannot promise it. I'm already stumped with so
much other stuff that regularly breaks or needs to be updated/improved and is
arguably more important (because the best testing infrastructure won't help you
if all the other things don't work).

Mihai

---

From: Mihai Moldovan <[email-masked]>
Date: Wed, 12 May 2021 19:28:17 +0200 (CEST)

tag #1469 pending
fixed #1469 4.1.2.3
thanks

Hi!

    https://code.x2go.org/gitweb?p=x2goclient.git;a=commitdiff;h=89cdde323c5686be709c398639b1c3ae463e1035

light+love

---
commit 89cdde323c5686be709c398639b1c3ae463e1035
Author: Mihai Moldovan <[email-masked]>
Date:   Sun May 2 11:00:39 2021 +0200

    Revert "debian{,-qt4,-qt5}: Add a Qt5-based debian(-qt5)/ packaging folder and make it easy to switch between Qt4 and Qt5 build by simply changing the symlink target of debian/ (which is, yes indeed, a symlink, not a directory anymore)."
    
    This reverts commit 36296338c29994e9af121dcc7488e11f1e38da3a.
    
    We want to keep one common directory with all data in there.

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..21b9fb4
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,3966 @@
+x2goclient (4.1.2.3-0x2go1) UNRELEASED; urgency=medium
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (4.1.2.3):
+    - Load alternative image resources from specified folder.
+    - Set correct aspect ratio for x2go and ON logos.
+    - Download alternative resource files from http server.
+    - Support for PNG background images.
+    - Display state of broker connection in status bar.
+    - Client can synchronize sessions with broker. Broker need to send
+      syncinterval value in the client config section.
+    - Set min width of session status label.
+    - set clipboard mode of x2gokdriveclient in cmd line option.
+    - Fix maximizing client window in thinclient mode with Qt5 (bullseye).
+    - Add mime type application/x-x2go. X2Go Client can now automatically open
+      session files with .x2go extension.
+    - X2Go Client will send it's version to the broker when sending client
+      event.
+    - Don't close X2Go Client if settings dialog is called before broker auth.
+
+  [ Ryan Schmidt ]
+  * New upstream version (4.1.2.3):
+    - x2goclient.pro: use the right C++ standard library on OS X/macOS.
+
+  [ Melroy van den Berg ]
+  * New upstream version (4.1.2.3):
+    - src/sshmasterconnection.c: send EOF before closing channel.
+    - src/sshmasterconnection.c: return false if login check remote command
+      execution failed.
+    - src/sshmasterconnection.c: refactor some of the channel loop and fix
+      channel/session closes.
+    - src/sshmasterconnection.c: fix 'when not' password auth. Avoids double
+      error messages.
+    - src/sshmasterconnection.c: correct retval check.
+    - src/sshmasterconnection.c: explicitly mark function parameters as unused.
+    - .gitignore: ignore Visual Studio temporary files. Fixes: #1469.
+
+  [ Mihai Moldovan ]
+  * New upstream version (4.1.2.3):
+    - src/sshmasterconnection.{c,h}: fix builds, new function should have been
+      registered and not static, but private.
+
+  [ Mike Gabriel ]
+  * New upstream version (4.1.2.3):
+    - Makefile: Install x-x2go.xml MIME database source file for .x2go file
+      extension.
+  * debian/x2gocient.install:
+    + Install x-x2go.xml into bin:pkg x2goclient.
+  * x2goclient.spec:
+    + Install x-x2go.xml into bin:pkg and run update-mime-database during
+      postinst.
+
+ -- X2Go Release Manager <[email-masked]>  Thu, 13 Feb 2020 12:31:20 +0100
+
+x2goclient (4.1.2.2-0x2go1) unstable; urgency=medium
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (4.1.2.2):
+    - Add SSH instruction to list of errors if keyboard-interactive auth has
+      failed.
+    - Add new brocker feature. Broker can send to client some configuration in
+      the section START_CLIENT_CONFIG - END_CLIENT_CONFIG. For the moment is
+      supported option events=bool. If true, client sending to broker events:
+      CONNECTING, CONNECTED, SUSPENDING, TERMINATING, FINISHED. It's not a real
+      session state, but rather the state of X2Go Client.
+    - Save session command in resumingSession.command.
+    - Send in broker event the duration of session on client.
+    - If client is configured to send events, the broker can ask client to send
+      ALIVE events. To do this, broker should send config option "liveevent"
+      (int).
+      It means, if liveevent=10, client will send ALIVE event to broker every
+      10 seconds when the client connected to X2Go Session.
+    - Broker can send to client command to suspend or terminate the session as
+      an answer to the client event message. For this broker should send to
+      client SUSPEND ID or TERMINATE ID.
+    - Client now sends "login" parameter to the broker when executing task
+      "selectsession". Before client just sent a username on the broker and it
+      was imposiible to find out user name on X2Go server, which is not always
+      the same as broker username. This won't break a compatibility with
+      previous broker as they just will ignore this parameter.
+    - X2Gokdrive support for X2GoClient.
+    - Fix authentification on http broker when sending event.
+    - Fix resuming sessions on multiple servers.
+    - Initializing sessionId, command and display for direct RDP to complay
+      with standard sessions.
+    - Direct RDP sesion send to broker event CONNECTED instead of CONNECTING at
+      start of RDP client.
+    - Fixing setting correct session command when resuming the session.
+    - Don't exit if sending event to http broker has failed.
+    - If using x2go broker and ssh proxy check for the option
+      "usebrokeruserforproxy" in the session file. If it's "true", use the same
+      username for the proxy as broker login.
+    - Broker can send to client the number of suspended and running sessions
+      for each session type.
+      Client will display this information to user on session button.
+    - update copyright years in about dialog.
+    - Do not show password in debug output of HTTP broker.
+    - Fix crashing if the path for automount in the session config file in
+      wrong format. Supporting both Windows and Linux path in automount format.
+      Check if path exists before mounting.
+    - Do not show Pulseaudio warning on Windows, if Pulseaudio is disabled in
+      settings or by command line.
+    - Improve request handling in HTTP broker.
+    - Add possibility to suspend and terminate sessions from session selection
+      dialog in broker mode.
+    - Do not delete session from list if terminating of session is canceled.
+
+  [ Mihai Moldovan ]
+  * New upstream version (4.1.2.2):
+    - src/printwidget.cpp: add QButtonGroup include, fixes compile errors with
+      Qt 5.11+. Fixes: #1307.
+    - macbuild.sh: switch to bundling PulseAudio 12.1 since it's now available
+      in MacPorts.
+    - x2goclient.pro: detect libssh and libssh_threads via pkgconfig on
+      UNIX-based platforms. libssh_threads is optional if the libssh version
+      is high enough.
+    - x2goclient.pro: let static Linux configuration override the new
+      pkgconfig-based libssh usage.
+    - x2goclient.pro: make system a non-variable call.
+    - x2goclient.pro: fix qmake control flow for libssh logic, we really
+      wanted to use else if for the Windows section and have the general else
+      section being the general fallback.
+    - x2goclient.pro: fix quoting issue in system() call. Qmake's quoting
+      rules are really weird.
+    - macbuild.sh: switch to bundling PulseAudio 12.2 since it's now available
+      in MacPorts.
+    - res/i18n/x2goclient_cs.ts: whitespace and other fixups.
+    - src/x2goclient.cpp: change HTTP to HTTPS links where needed.
+    - src/x2goclient.cpp: do not spawn UNIX cleanup helper if arguments that
+      let X2Go Client terminate right away have been passed. More work is
+      needed here, but that should cover the most basic bits.
+    - src/onmainwindow.{cpp,h}: remove left-over references to agentCheckTimer
+      and slotCheckAgentProcess ().
+    - src/onmainwindow.cpp: fix various broken qCritical () calls.
+    - src/{onmainwindow.{cpp,h},{sshmasterconnection,help}.cpp}: let users
+      control libssh debugging via the new parameters --libssh-debug and
+      --libssh-packetlog. Properly document the new switches and their
+      implications.
+    - src/sshmasterconnection.cpp: drop DEBUG preprocessor conditional blocks.
+      We have never actually disabled it and x2goDebug () will not write out
+      anything if debugging has not been requested, so we already have a soft
+      condition check for every x2goDebug () call.
+    - src/x2goclient.cpp: do not use std::array since that's a C++11 feature,
+      just live with plain C arrays for now.
+    - x2goclient.pro: fix libssh_threads logic again. Ubuntu Bionic/18.04
+      ships a pre-release version of 0.8.0, which is tagged as that version,
+      but really based upon 0.7.x and still has/needs a libssh_threads
+      library. Big "Wat?" to you, Canonical. Fixes: #1320.
+    - src/x2goclient.cpp: fix array length calculation.
+    - Windows: Update PuTTY from 0.70 to 0.71. Fixes quite a list of issues
+      discovered through the EU-funded bug bounty programme. Not all are
+      relevant to X2Go Client.
+    - Windows: upgrade bundled VcXsrv to 1.20.1.4.
+    - src/sshmasterconnection.cpp: use info (protocol) log level with
+      --libssh-debug and debug (packet) log level with --libssh-packetlog.
+    - src/sshmasterconnection.cpp: fix compiler warning due to mismatching
+      argument with older libssh versions.
+    - Makefile: clear out LDFLAGS, add new (cleared) LIBS variable and pass
+      down as QMAKE_LIBS. The previous behavior was leading to compile
+      failures on arm64 machines (albeit only old distro versions,
+      apparently), because QMAKE_LFLAGS is being put on the command line
+      *before* the actual object files to be included/linked, which is an
+      error for system libraries. Builds will still fail after this commit,
+      but that's okay.
+    - x2goclient.pro: add libraries that we always want to use on Linux
+      correctly to LIBS and use a bigger catch clause. That should work much
+      better, since linux-g++ and linux-g++-64 are x86-specific, while there
+      are way more potentially useful targets like linux-aarch64-gnu-g++,
+      clang, llvm, icc etc.
+    - x2goclient.pro: while a linux scope seems to work fine with Qt5, Qt4
+      doesn't recognize that, so add another linux-* catch.
+    - Windows: add support for x3270-fonts, including adding a pretty nasty
+      but necessary fonts.* file regeneration hook.
+    - {x2goclient,help,onmainwindow}.cpp: implement new
+      --bypass-cleanup-helper parameter.
+    - src/onmainwindow.cpp: fix building with Qt 4.6, currently the latest
+      version available in EPEL 6.
+    - src/onmainwindow.cpp: unbreak builds by fixing syntax error.
+    - src/onmainwindow.cpp: also unbreak old EPEL 6 builds.
+    - src/onmainwindow.cpp: add (and prefer) non-compat-symlink scp server
+      location for 64-bit-based Gentoo distros (17.1+ profiles). Fixes:
+      #1393.
+    - res/i18n/x2goclient_*.ts: replace changed source strings, no
+      retranslations required.
+    - src/httpbrokerclient.cpp: do not leak password length in debug output
+      either.
+    - src/sessionwidget.cpp: stop parsing proxy address as "host:port: if the
+      address contains a colon. Fixes: #1418. We don't do this for the
+      "normal" host address and this behavior clashes with IPv6 addresses. We
+      COULD, theoretically, keep it, but that would require writing an
+      arbitrary address parser. Too much effort for little gain.
+    - src/onmainwindow.cpp: also remove proxy "host:port" parsing at connect
+      time. Fixes: #1418.
+    - macbuild.sh: switch to bundling PulseAudio 13.0 since it's now available
+      in MacPorts.
+    - src/onmainwindow.cpp: disable "left click" action on OS X/macOS. This
+      platform always gets a left click event, even when right clicked. May
+      sound weird first, but this behavior is consistent between all
+      applications - tray icons can be clicked via either button and will
+      always trigger a context menu. Let X2Go Client behave the same way.
+    - src/sshprocess.cpp: strip ~/, ~user{,/}, ${HOME}{,/} and $HOME{,/} from
+      destination paths in scp mode. Fixes: #1428. This was already necessary
+      for pascp (PuTTY-based Windows solution for Kerberos support), but newer
+      libssh versions with the CVE-2019-14889 also interpret paths as literal
+      strings.
+    - src/SVGFrame.cpp: simplify implementation a lot. Only paint data onto
+      the widget in the paintEvent () function. Drop setting a palette based
+      upon the rendered SVG image, which has been very wrong to do from the
+      beginning and only lead to visual glitches. Correctly repaint
+      single-frame SVG files.
+    - src/sshmasterconnection.cpp: work around lupdate warning by adding
+      another block in the #else preprocessor branch.
+    - res/i18n/x2goclient_*.ts: update translation files.
+    - Windows: Update PuTTY from 0.71 to 0.73. Fixes another round of issues
+      discovered through the EU-funded bug bounty programme and other security
+      problems.
+    - src/onmainwindow.cpp: stop PulseAudio from spamming logs after a client
+      disconnects. Fixes: #1425. Patch based on one submitted by Ville
+      Salmela.
+    - src/onmainwindow.cpp: instead of searching for "sftp-binary", try to
+      look for "sftp-server" in the Qt 5.x code path. Luckily this only
+      affects cases where we bundle sftp-server (which we don't) or where
+      sftp-server is actually part of $PATH (which it usually shouldn't be).
+    - Windows: upgrade bundled VcXsrv to 1.20.6.0.
+    - Windows: upgrade PulseAudio from 7.1 to 13.0.
+    - Windows: remove libz. Was previously used by libzip, which has not been
+      shipped for quite some time.
+    - Windows: Update Win32 OpenSSL from 1.0.2n to 1.0.2u. Implicit.
+    - Windows: Upgrade libssh from 0.7.4 to 0.9.3 (while maintaining Pageant
+      support). Drop libssh_threads library not provided (or used) any longer.
+    - x2goclient.pro: update comment mentioning that libssh does not provide
+      pkgconfig files on non-UNIX/Windows platforms any longer and drop
+      libssh_thread linkage.
+    - res/i18n/x2goclient_nl.ts: add missing singular form to a multi-form
+      entry.
+    - res/i18n/x2goclient_cs.ts: fix up whitespace and mark actually finished
+      translation string as such, also removing my previous comment.
+    - res/i18n/x2goclient_nb_no.ts: fix up whitespace and typos.
+    - res/i18n/x2goclient_de.ts: better translate UNIX cleanup helper and fix
+      "X2Go Client" as "X2GoClient" globally.
+    - misc: pre-release copyright update.
+    - src/onmainwindow.cpp: update in-code copyright notice.
+    - res/i18n/x2goclient_*.ts: update copyright notice in about dialog
+      manually.
+    - src/onmainwindow.cpp: add comment for translators encouraging them to
+      add themselves to copyright notice.
+    - res/i18n/x2goclient_*.ts: update after source code changes and comment
+      addition.
+    - res/i18n/x2goclient_*.ts: mark copyright translation string as
+      unfinished for already translated languages (but Finnish) to alert
+      translators of the new comment.
+    - man/man1/x2goclient.1: pre-release date update.
+  * debian/control:
+    + Add build-depend on pkg-config.
+  * x2goclient.spec:
+    + Build-depend on pkg-config.
+    + EPEL packages need to depend upon pkgconfig for now, not pkg-config.
+    + Pull in redhat-rpm-config manually. This should probably be done by
+      something else, like... gcc or qmake or qt(4)-dev, but it isn't.
+    + Try to ignore gettext-tools-mini on *SuSE to force installation of the
+      new/renamed gettext-runtime-mini package.
+    + It's %endif, not %fi.
+    + Revert the gettext-tools-mini change, was caused by an outdated
+      obs-build version.
+
+  [ Mike Gabriel ]
+  * New upstream version (4.1.2.2):
+    - Add support for Nix OS for common_sftp_dirs's hard-coded
+      sftp-server paths.
+    - src/sessionwidget.cpp: Rename shadowing sessiontype to 'X2Go/X11 Desktop
+      Sharing'.
+    - man/man1/x2goclient.1: Add explanation for the --broker-name option.
+    - res/resources.qrc: Add Czech translation file.
+    - Update qt_<lang>.qm files from Qt5 v5.11.2.
+    - Rename radion button lables for xfreerdp options' style.
+  * debian/control:
+    + In x2goclient R, prefer freerdp2-x11 over rdesktop over freerdp-x11
+      (which is broken these days anyway).
+    + In x2goclient D, add x2gokdriveclient.
+    + In x2goclient D, add hello as an alternative to x2gokdriveclient. Works
+      around non-available x2gokdriveclient on Debian jessie.
+
+  [ Tom Ruzicka ]
+  * New upstream release (4.1.2.2):
+    - Add new translation: Czech.
+    - Second update round of Czech translation + enable it in x2goclient.pro.
+
+  [ Ulrich Sibiller ]
+  * New upstream release (4.1.2.2):
+    - src/sshmasterconnection.cpp: close channel on failure in checkLogin ().
+    - src/sshmasterconnection.{cpp,h}: skip checkLogin() if hostname starts
+      with "!". Some special ssh proxies will not allow arbitrary commands.
+      checkLogin() will break these sessions because it tries to run the echo
+      command on the proxy. By specifying a "!" as the first character of the
+      (proxy) hostname you can instruct x2goclient ot skip the checkLogin()
+      call altogether. Note that this will break proxies that require you to
+      change you password or some other type of interaction. As this is added
+      to SshMasterConnection it is also valid to specify that for the server
+      hostname although this is not very useful.
+
+  [ Jos Wolfkamp ]
+  * New upstream version (4.1.2.2):
+    - res/i18n/x2goclient_nl.ts: update Dutch translation file.
+
+  [ Sébastien Ducoulombier ]
+  * New upstream version (4.1.2.2):
+    - res/i18n/x2goclient_fr.ts: update French translation file.
+    - res/i18n/x2goclient_fr.ts: add missing sentence and UTF-8-ize entries.
+
+  [ Ruda Vallo ]
+  * New upstream version (4.1.2.2):
+    - res/i18n/x2goclient_cs.ts: update Czech translation file.
+
+  [ Klaus Ade Johnstad ]
+  * New upstream version (4.1.2.2):
+    - res/i18n/x2goclient_nb_no.ts: update Bokmål (Norway) translation file.
+    - res/i18n/x2goclient_nb_no.ts: update Bokmål (Norway) translation file.
+
+  [ Stefan Baur ]
+  * New upstream release (4.1.2.2):
+    - res/i18n/x2goclient_de.ts: update German translation file.
+
+ -- X2Go Release Manager <[email-masked]>  Wed, 12 Feb 2020 22:42:00 +0100
+
+x2goclient (4.1.2.1-0x2go1) unstable; urgency=medium
+
+  [ Mihai Moldovan ]
+  * New upstream version (4.1.2.1):
+    - src/onmainwindow.cpp: only add the StrictKeyModes sshd_config parameter
+      when running on Windows.
+
+ -- X2Go Release Manager <[email-masked]>  Mon, 25 Jun 2018 22:19:11 +0200
+
+x2goclient (4.1.2.0-0x2go1) unstable; urgency=medium
+
+  [ Mike DePaulo ]
+  * New upstream version (4.1.2.0):
+    - src/sshmasterconnection.cpp: Do not attempt to perform Interaction with
+      SSH Server (e.g. for changing expired password) when using
+      GSSAPI/Kerberos because the interaction code does not support it yet.
+      Fixes: #1258
+    - Windows: Update PuTTY from 0.68 to 0.70, which fixes PuTTY vulns
+      vuln-indirect-dll-hijack-2 & vuln-indirect-dll-hijack-3.
+      Note that x2goclient was only ever affected if the permissions on the
+      installation folder were changed to give users write access, or if
+      x2goclient was copied/extracted to a folder where users could write.
+    - Windows: Update Win32 OpenSSL from 1.0.2k to 1.0.2n
+      Fixes several CVEs
+    - Windows: Upgrade bundled VcXsrv from 1.17.0.0-3 (X2Go/Arctica Build)
+      to 1.20.0.0 (upstream build)
+        + Fixes https://github.com/ArcticaProject/nx-libs/issues/600
+        + Incompatible with XP & Vista
+        + Unmodified except for strip-nondeterminism being run on .gz files
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (4.1.2.0):
+    - don't start gpg agent for PGP card authentication. Use system agent instead.
+    - change search string for pcsc_scan.
+    - destroy unused SSH sessions for LDAP authentication.
+
+  [ Mihai Moldovan ]
+  * New upstream version (4.1.2.0):
+    - misc: update version to 4.1.2.0.
+    - res/img/svg: add new lxqt.svg icon file (really helix.svg).
+    - res/img/icons/*x*: add new rasterized lxqt.png files in different sizes.
+    - res/qresources.qrc: add new lxqt files.
+    - src/{onmainwindow.cpp,session{button,widget}.{cpp,h}}: add support for
+      LXQt. Fixes: #1263.
+    - src/sshmasterconnection.cpp: stop libssh/OpenSSL from querying for a
+      passphrase if started with a controlling terminal.
+    - x2goclient.pro: remove plugin references.
+    - misc: change http:// to https:// where appropriate, but in actual code
+      and translation files for now.
+    - Makefile: remove plugin references.
+    - Makefile: remove x2goclient_*.qm files in clean rule.
+    - x2gobrowserplugin-2.4_1/: remove.
+    - provider/: remove.
+    - INSTALL: remove plugin references.
+    - {{build,config}_win_plugin.bat,config_linux_{,static_}plugin.sh}:
+      remove.
+    - config_win.bat: remove plugin references.
+    - src/{configdialog.cpp,onmainwindow{.cpp,{,_privat}.h}}: remove plugin
+      references.
+    - src/editconnectiondialog.cpp: do not connect signals to slots that do
+      not exist on non-Linux platforms.
+    - src/onmainwindow.cpp: add -nopn parameter to VcXsrv startup options,
+      making the binary fail if it wasn't able to bind the requested port on
+      all addresses.
+    - src/onmainwindow.cpp: print out current DISPLAY value in debug log while
+      starting X.Org Server on Windows.
+    - src/onmainwindow.{cpp,h}: don't error out directly if starting the X.Org
+      Server failed on Windows. Instead, try starting it three times, each
+      time with a higher DISPLAY offset. On busy client machines, several
+      clients raced for the sockets previously and often failed to start. Also
+      check if the server binary actually is still alive before doing the TCP
+      connection checks. A dead server won't be able to listen on a socket in
+      the first place.
+    - {src/{onmainwindow.{cpp,h},help.cpp},man/man1/x2goclient.1}: add new
+      option --xserver-start-limit, replacing the formerly hardcoded limit of
+      three tries.
+    - src/onmainwindow.{cpp,h}: fix compile error on Windows - use std::size_t
+      instead of std::ssize_t, treat zero as infinity value while parsing
+      option value.
+    - src/onmainwindow.cpp: handle a disabled X.Org Server start limit
+      correctly.
+    - src/onmainwindow.cpp: fix other compile errors/typos.
+    - src/onmainwindow.cpp: another compile error/typo fix.
+    - src/onmainwindow.cpp: let client recognize new --xserver-start-limit
+      param correctly.
+    - src/onmainwindow.cpp: add -silent-dup-error parameter to VcXsrv startup
+      options, forcing it to silently fail without showing a dialog and thus
+      keeping the process running.
+    - src/onmainwindow.cpp: re-add periodic xmodmap keyboard sync for OS
+      X/macOS platforms. Was dropped some time ago by accident.
+    - src/onmainwindow.cpp: fix compile error on OS X/macOS.
+    - copy-deps-win32.bat: update to 20160121-4 Cygwin bundle, shipping with
+      chgrp.
+    - src/onmainwindow.cpp: fix user-facing error messages in Windows X.Org
+      Server startup functions.
+    - src/pulsemanager.cpp: use QByteArray's constData () instead of data (),
+      since we'll never modify the data anyway.
+    - src/onmainwindow.cpp: hook-in chgrp for ~/.x2go/etc on Windows platforms
+      to work around a Cygwin permissions bug. Fixes: #1156.
+    - src/onmainwindow.cpp: QProcess:nullDevice () is only available on Qt
+      5.2+, so use a workaround for older versions.
+    - src/onmainwindow.cpp: actually pass the correct group ID to the chgrp
+      call and make sure that the warning dialog box also appears whenever the
+      exit code indicates a failure.
+    - src/onmainwindow.{cpp,h}: remove Cygwin permissions workaround via
+      chgrp.
+    - copy-deps-win32.bat: update to 20180615-1 Cygwin bundle, shipping with
+      a further modified OpenSSH Server version at 7.7p1-1-x2go1 and without
+      chgrp.
+    - src/onmainwindow.cpp: disable private host key permissions check in
+      OpenSSH Server on Windows. Fixes: #1156.
+    - res/i18n/x2goclient_*.ts: update translation files.
+    - res/i18n/x2goclient_fi.ts: whitespace and other fixups.
+    - res/i18n/x2goclient_fi.ts: add missing numerus form translation and
+      other fixups.
+    - res/i18n/x2goclient_de.ts: another fixup I previously forgot about.
+    - res/i18n/x2goclient_et.ts: whitespace and meta data fixup.
+    - res/i18n/x2goclient_et.ts: typo fix: on+ma -> oma.
+  * x2goclient.spec:
+    - Remove plugin references.
+  * debian/rules:
+    - Remove plugin references.
+    - Remove x2goclient_*.qm files removal.
+  * debian/control:
+    - Convert plugin packages to dummy transitional packages with no
+      dependencies, remove other plugin references.
+  * debian/:
+    - x2goplugin{,-provider}.install: clear out.
+    - {x2goplugin.dirs,x2goplugin-provider.dirs,x2goplugin-provider.links,
+       x2goplugin-provider.post*}: remove.
+  * debian/copyright:
+    - Remove plugin references.
+
+  [ Martti Pitkänen ]
+  * New upstream version (4.1.2.0):
+    - res/i18n/x2goclient_fi.ts: update Finnish translation file.
+
+  [ Stefan Baur ]
+  * New upstream release (4.1.2.0):
+    - res/i18n/x2goclient_de.ts: update German translation file.
+
+  [ Sébastien Ducoulombier ]
+  * New upstream version (4.1.2.0):
+    - res/i18n/x2goclient_fr.ts: update French translation file.
+
+  [ Robert Parts ]
+  * New upstream version (4.1.2.0):
+    - res/i18n/x2goclient_et.ts: update Estonian translation file.
+
+ -- X2Go Release Manager <[email-masked]>  Fri, 22 Jun 2018 22:30:29 +0200
+
+x2goclient (4.1.1.1-0x2go1) unstable; urgency=medium
+
+  [ Mihai Moldovan ]
+  * New upstream version (4.1.1.1):
+    - src/pulsemanager.cpp: print out PA --version output as a debug message.
+    - macbuild.sh: also bundle xauth binary as nxauth binary.
+    - macbuild.sh: switch to bundling PulseAudio 11.1 since it's now available
+      in MacPorts.
+    - src/sshmasterconnection.cpp: don't ask for private key passphrase if
+      auto-login merely failed due to the server denying the public key.
+      Fixes: #1122.
+    - src/{httpbrokerclient,onmainwindow,sshmasterconnection}.{cpp,h}:
+      introduce new passphrase_type enum and replace the old verificationCode
+      boolean value with that. Allows using more messages, including a new one
+      for plain password prompts. Adapt usage accordingly. The implementation
+      is ugly, but there's no good way around that (short of using C++11
+      features). The enum would really logically belong to ONMainWindow, but
+      since we also have to use it in SshMasterConnection, that may not
+      include onmainwindow.h to avoid a circular dependency, it has to be
+      part of SshMasterConnection for now.
+    - src/sshmasterconnection.cpp: query for password if it wasn't already
+      provided. Fixes: #1122. This usually happens if auto-login is enabled,
+      which bypasses the password prompt. If auto-login fails, authentication
+      normally continues via challenge auth or plain passwords, but since
+      users had no chance to input a password, such authentication will always
+      fail. Give users a way to enter passwords, in case the auto-login
+      failed.
+    - src/onmainwindow.cpp: finally include version information in debug
+      output.
+    - res/i18n/x2goclient_*.ts: apply last change to translation files
+      directly.
+    - src/sshmasterconnection.cpp: error out with a useful error message in
+      case no password has been provided when doing password authentication.
+    - src/sshmasterconnection.cpp: don't output an empty error message if
+      password authencation has been requested but the server does not support
+      this mechanism. Fixes: #408.
+    - src/onmainwindow.cpp: wrap user name for client-side mounts in quotes.
+      Fixes: #559. Will fail with user names that contain quotes, but oh
+      well...
+    - {example/x2goclient-cli,src/onmainwindow.cpp}: remove hopefully obsolete
+      HOSTNAME exporting into environment.
+    - src/onmainwindow.cpp: remove client-side LD_LIBRARY_PATH meddling.
+      Nothing of value is in that directory and nxproxy hasn't needed that for
+      years.
+    - src/settingswidgets.cpp: don't incorrectly enable whole display settings
+      in single display setups. Let debugging mode override this behavior,
+      though.
+    - src/onmainwindow.cpp: pass X2GO_RANDR_XINERAMA=[yes,no] to
+      x2gostartagent as an environment variable based upon the xinerama
+      session setting. Has no effect when connecting to older X2Go Server
+      versions and handles startup correctly with X2Go Server 4.1.0.0.
+    - src/onmainwindow.cpp: fix another leaked X2goSettings object.
+    - src/onmainwindow.cpp: rename xinerama env variable on session startup to
+      X2GO_XINERAMA in accordance with server changes.
+    - src/onmainwindow.cpp: supply xinerama option as another parameter to
+      x2goresume-session on session resume.
+    - src/sessionbutton.cpp: make button non-sensitive in bottom right part if
+      it's editable. Fixes: #1214.
+    - {src/{help.cpp,onmainwindow.{cpp,h}},man/man1/x2goclient.1}: reformat,
+      whitespace fixes, split out close button slot in a separate function.
+    - src/onmainwindow.{cpp,h}: let close button be a member variable.
+    - src/onmainwindow.cpp: disable and enable close button during and after
+      connection startup.
+    - src/onmainwindow.cpp: initialize directRDP to false to be able to call
+      slotSuspendSessFromSt () even if no session has previously been started.
+    - src/onmainwindow.cpp: only initialize directRDP variable if platform is
+      Linux. Fixes compile failures on Windows and OS X.
+    - src/onmainwindow.cpp: always create close button, but either hide or
+      show it based upon whether --closebt was provided or not.
+    - src/onmainwindow.cpp: revert 3060183a78d8b6bd81bec9968c985c38bfd1e5c2.
+      Being able to suspend sessions via the close button is complex and
+      unnecessary, since in thinclient mode, for which this feature is
+      useful, users will not be able to see the client window while a session
+      is executing, due to it running in full screen mode.
+    - src/onmainwindow.cpp: always enable close button, let it log out from a
+      broker if already authenticated or close the client on click. Fixes:
+      #1209.
+    - man/man1/x2goclient.1: clarify what the close button now does. It either
+      lets the user re-login to the broker or closes the client.
+    - src/onmainwindow.cpp: correctly initialize brokerAuthentication member
+      of ConfigFile struct.
+    - {res/{img/png/close-button.png,resources.qrc},
+       src/{{onmainwindow,httpbrokerclient}.{cpp,h},help.cpp},
+       man/man1/x2goclient.1}: rename close button to broker logout button.
+      Reimplement the way it is shown - disable it upon startup and only
+      enable it after successful broker authentication.
+    - man/man1/x2goclient.1: add missing escape signs before dash/minus
+      characters.
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (4.1.1.1):
+    - Change echo mode for user input in InteractionDialog.
+
+  [ Walid Moghrabi ]
+  * New upstream version (4.1.1.1):
+    - {res/img/png/,res/resources.qrc}: add close-button.png file.
+    - {src/{help.cpp,onmainwindow.{cpp,h}},man/man1/x2goclient.1}: add new
+      option --closebt. Fixes: #1227. Adds a close button in the top-left
+      client corner (maybe next to the halt button) that currently just
+      terminates the client.
+
+ -- X2Go Release Manager <[email-masked]>  Thu, 15 Feb 2018 21:38:31 +0100
+
+x2goclient (4.1.1.0-0x2go1) unstable; urgency=medium
+
+  [ Mihai Moldovan ]
+  * New upstream version (4.1.1.0):
+    - src/sshmasterconnection.cpp: use ssh_channel_listen_forward () instead
+      of ssh_forward_listen () for newer libssh versions. Fixes: #870.
+    - src/sshmasterconnection.cpp: with libssh 0.6.0 and newer, get the public
+      key via ssh_get_server_publickey () (0.8.0 and higher) or
+      ssh_get_publickey () (0.7.x and lower) and its hash via
+      ssh_get_publickey_hash () instead of using the deprecated
+      ssh_get_pubkey_hash () function. Additionally, replace free () with the
+      more appropriate ssh_string_free_char () function after using
+      ssh_get_hexa (). This will break on very old systems with a hopelessly
+      outdated libssh version, but we do not care about these systems in the
+      first place.
+    - src/sshmasterconnection.cpp: replace string_free () with its successor
+      ssh_string_free (). Will break on ancient systems, but we don't care.
+    - src/sshmasterconnection.cpp: replace deprecated channel_new () function
+      with ssh_channel_new (). Might break on ancient systems, but we don't
+      care. Also, add error handling in case ssh_channel_new () failed...
+    - src/sshmasterconnection.cpp: replace deprecated channel_open_forward ()
+      function with ssh_channel_open_forward (). Might break on ancient
+      systems, but we don't care.
+    - src/sshmasterconnection.cpp: replace deprecated channel_open_session ()
+      function with ssh_channel_open_session (). Might break on ancient
+      systems, but we don't care.
+    - src/sshmasterconnection.cpp: replace deprecated channel_request_exec ()
+      function with ssh_channel_request_exec (). Might break on ancient
+      systems, but we don't care.
+    - src/sshmasterconnection.cpp: replace deprecated channel_poll () function
+      with ssh_channel_poll (). Might break on ancient systems, but we don't
+      care.
+    - src/sshmasterconnection.cpp: replace deprecated channel_read () function
+      with ssh_channel_read (). Might break on ancient systems, but we don't
+      care.
+    - src/sshmasterconnection.cpp: replace deprecated channel_is_eof ()
+      function with ssh_channel_is_eof (). Might break on ancient systems, but
+      we don't care.
+    - src/sshmasterconnection.cpp: replace deprecated channel_write ()
+      function with ssh_channel_write (). Might break on ancient systems, but
+      we don't care.
+    - src/sshmasterconnection.cpp: replace deprecated channel_send_eof ()
+      function with ssh_channel_send_eof (). Might break on ancient systems,
+      but we don't care.
+    - src/sshmasterconnection.cpp: replace deprecated channel_close ()
+      function with ssh_channel_close (). Might break on ancient systems, but
+      we don't care.
+    - src/sshmasterconnection.cpp: replace deprecated channel_free () function
+      with ssh_channel_free (). Might break on ancient systems, but we don't
+      care.
+    - src/sshmasterconnection.cpp: use QString::arg () to insert function name
+      and thus deduplicate error translation messages. Also re-add the full
+      stop sign and remove it when needed for x2goDebug.
+    - src/sshmasterconnection.cpp: fix up some debug strings.
+    - src/sshmasterconnection.cpp: port more occurrences of "QString to C
+      string" akin to 1b21d75f2c10609f3586f5b5e0b4ceb7fca83fdd.
+    - src/sshmasterconnection.cpp: enable parsing of ~/.ssh/config.
+      Fixes: #1121. Shorthands as host names and other bells and whistles like
+      inferred port or user name values are now supported.
+    - src/{onmainwindow,httpbrokerclient}.cpp: fix up error/warning message
+      displayed when the server-specified key is unknown, but we have another
+      key type stored already.
+    - src/pulsemanager.cpp: fix up a debug string. Qt drops a space where I'd
+      like to have one and inserts a space where I'd like none, so work around
+      that fancifully.
+    - src/sshmasterconnection.cpp: libssh < 0.6.0 does not have the
+      ssh_options_get () API, but instead expects users to pull out
+      information directly from the ssh_session structure. This fixes compile
+      issues on systems with older libssh versions.
+    - src/sshmasterconnection.cpp: turns out libssh < 0.6.0 doesn't support
+      fetching the host, port and username parameters at all. We're in the
+      clear for non-SSH-proxied connections and can use config file parsing,
+      but have to disable config file parsing in the proxy settings, as
+      there's no way to query the remote endpoint information. As a result we
+      will be unable to open a new socket to the remote endpoint and proxying
+      will fail badly.
+    - src/x2goutils.cpp: ensure that add_to_path () also processes the first
+      value passed. Fixes startup problems in MacPorts. Fixes: #1093.
+    - res/i18n/x2goclient_et.ts: various fixups for the Estonian translation
+      file.
+    - res/i18n/x2goclient_*.ts: go the extra mile and fix up translation files
+      manually after the "anothertype" fix in
+      8e503d89ee2d03a313c3deff11f0516fce503022.
+    - {src/{onmainwindow,httpbrokerclient}.cpp,res/i18n/x2goclient_*.ts}: fix
+      another occurrence of a string missing a space separator between words
+      and update translation files.
+    - src/onmainwindow.cpp: don't duplicate depth warning message needlessly,
+      use correct plural forms in translations and split string up in a
+      translation-friendly form. I'll leave translators to handle this beast,
+      as languages are unique in the number of plural forms and the like.
+    - {src/printdialog.cpp,res/i18n/x2goclient_*.ts}: drop spurious left-over
+      parenthesis in warning message and adapt translations.
+    - src/onmainwindow.cpp: make the "not loading translator" message
+      non-translatable, as it doesn't make a lot of sense to actually
+      translate it.
+    - {src/{configdialog,x2goutils}.cpp,res/i18n/x2goclient_*.ts}: change
+      XQuartz project homepage references, adapt translations.
+    - src/pulsemanager.{cpp,h}: make get_* () functions const.
+    - src/pulsemanager.{cpp,h}: make is_server_running () const.
+    - src/pulsemanager.{cpp,h}: add new pulse_version_valid_ boolean class
+      member variable, set it correctly and use it whenever the version is
+      accessed.
+    - src/pulsemanager.cpp: make fetch_pulseaudio_version () more resilient.
+      Instead of aborting hard when the version number could not be detected,
+      break out of the loops only. We can make stuff work, even if the version
+      is unknown. Or just continue without PA support as such.
+    - src/pulsemanager.{cpp,h}: add show_startup_warning () for both PA server
+      and (debug) startup sound playback.
+    - src/pulsemanager.cpp: check server_binary_ before using it and jump over
+      code that assumes the PA server binary to be available.
+    - src/pulsemanager.cpp: don't fail hard on OS X if the PA server binary
+      could not be found in the constructor. We can live without PA and will
+      show a warning message to the user later on when PA is supposed to be
+      started.
+    - src/pulsemanager.cpp: deduplicate warning/error messages - make use of
+      show_startup_warning (). This does imply changes to the translation
+      files, coming up next.
+    - res/i18n/x2goclient_*.ts: regenerate translation files and fix up some
+      SSH and PulseManager messages manually, where possible.
+    - src/x2ogutils.h: guard UNUSED macro definition.
+    - {macbuild.sh,src/{x2goutils.h,{pulsemanager,onmainwindow}.cpp},
+       x2goclient.pro}: make MacPorts prefix selectable at compile time. Much
+      cleaner for downstream package maintainers (like, for instance, MacPorts
+      itself.)
+    - res/i18n/x2goclient_fi.ts: remove outdated comment.
+    - src/sshprocess.cpp: bind direct tunnel socket to localhost instead of
+      any address. Fixes: #31.
+    - src/onmainwindow.cpp: check for sessionExplorer->getLastSession() to be
+      valid in all places but obvious ones. Fixes: #499.
+    - src/sshmasterconnection.cpp: use new PKI-based libssh API for public key
+      authentication for libssh 0.6.0 and higher. Fixes: #1119.
+    - src/sshmasterconnection.cpp: add YubiKey challenge auth prompt.
+    - src/sshmasterconnection.cpp: fix compile errors on pre-libssh-0.6.0
+      systems and add a TOCTU-race check to see if the file exists prior to
+      calling privatekey_from_file () on such systems. Additionally fix a type
+      issue.
+    - macbuild.sh: fix long-standing issue that made the DMG bundle contain a
+      symlink made up of only a space to /Applications.
+    - res/img/icons/dmg: add new image disk.svg, used as the basis for the new
+      OS X DMG bundle icon.
+    - res/img/icons/dmg: add new disk-drive-and-x2goclient icon for use as the
+      volume icon of the OS X DMG bundle.
+    - macbuild.sh: use the new volume icon that actually also looks like a
+      disk drive. Fixes: #930.
+    - src/onmainwindow.cpp: typo fix only.
+    - src/onmainwindow.cpp: do not automatically set login user name to
+      current system user if empty. Unbreaks default user name fetching via
+      libssh. Might break some use cases (especially RDP, XDMCP).
+    - src/x2goclient.cpp: revert change bypassing the UNIX cleanup helper.
+    - src/onmainwindow.cpp: revert old behavior and select user name field
+      after a session has been suspended/terminated if user name was not
+      provided. Do not insert an user name, though, but leave it to
+      autodetection by default.
+    - src/sshmasterconnection.cpp: fix SSH-proxied connections with port
+      numbers of zero.
+      In order to authenticate the remote server, SSH-proxied connections must
+      be reset to their remote host and port values after connecting via the
+      SSH tunnel. If the original port value was zero, setting it was skipped,
+      leading to connections like $REMOTE_HOST:$PROXY_PORT, which is certainly
+      wrong. Fetch the inferred port value and set this instead, fixing this
+      issue.
+    - Makefile: add new QMAKE_OPTS variable so that packagers can pass
+      additional options to qmake directly.
+    - src/sshmasterconnection.cpp: typo fix in log message only.
+    - src/sshmasterconnection.cpp: don't leak ssh_session data, free it once
+      we're done with it.
+    - Makefile: qmake seems to act weird if QMAKE_C(XX)FLAGS starts with a
+      space followed by additional non-whitespace characters. Refactor the
+      variables a bit to work around this issue.
+    - Makefile: turns out the only somewhat portable way to do something like
+      this is via shell hackery.
+    - Makefile: reset to the original state and make sure that we don't pass
+      CXXFLAGS on to the actual build process to not override the values
+      generated by qmake.
+    - Makefile: the only way to prevent variables on the command line to be
+      passed down seems to be to remove them from MAKEOVERRIDES.
+      .MAKEOVERRIDES is the FreeBSD-make-equivalent variable. MAKEFLAGS has no
+      effect on this behavior, so removing it again.
+    - Makefile: add comment explaining why we need to do this in the first
+      place and why it's so complicated.
+    - src/sshmasterconnection: ignore "garbage", but require at least one line
+      to start with a known challenge auth prompt. Fixes: #966.
+    - x2goclient.pro: add libssh_threads library. We need this since X2Go
+      Client is multi-threaded.
+    - copy-deps-win32.bat: also copy libssh_threads.dll to go with the
+      previous change.
+    - src/{onmainwindow,sshmasterconnection}.{cpp,h}: correctly initialize and
+      finalize libssh. We ought to do both only once - in our main thread.
+      Previously, we initialized libssh in a new thread, which might be
+      problematic.
+    - src/sessionexplorer.cpp: open the correct tab when editing a session
+      from the exports menu.
+    - src/onmainwindow.cpp: try to workaround window placement if settings
+      contain a (newly) invalid position (e.g., a position that refers to a
+      disconnected display.)
+    - src/onmainwindow.cpp: try to find a display that can hold the window's
+      position fetched from the sizes settings. Use the default if none could
+      be found.
+    - src/onmainwindow.cpp: fix up main window position check; use
+      QRect.intersects ().
+    - src/pulsemanager.{cpp,h}: rename shutdownState to shutdown_state_,
+      reorder in initializer list.
+    - res/i18n/: regenerate translations.
+    - res/i18n/x2goclient_es.ts: fixup Spanish translation file.
+    - res/i18n/x2goclient_et.ts: fixup some typos in the Estonian translation
+      file.
+    - res/i18n/x2goclient_sv.ts: add singular form to translation entry as
+      discussed on list.
+    - res/i18n/x2goclient_es.ts: add singular form to translation entry as
+      discussed off list.
+    - res/i18n/x2goclient_nl.ts: various fixups for Dutch translation file.
+    - res/i18n/x2goclient_nb_no.ts: various fixups for Bokmål (Norway)
+      translation file.
+    - res/i18n/x2goclient_nl.ts: fix whitespace issues in Dutch translation
+      file and re-add numerus form translation.
+    - res/i18n/x2goclient_nb_no.ts: various fixups for Bokmål (Norway)
+      translation file, including numerus form.
+    - src/sshmasterconnection.cpp: for proxied connections, fetch the user
+      name matching the given host, not proxy host.
+    - res/i18n/x2goclient_fi.ts: various fixups for Finnish translation file.
+    - res/i18n/x2goclient_fi.ts: another tiny whitespace fixup for Finnish
+      translation file.
+    - src/onmainwindow.cpp: fix "XMDCP" typo.
+    - res/i18n/x2goclient_de.ts: various fixups for German translation file.
+    - src/onmainwindow.cpp: fix "loose" vs. "lose" spelling mistake.
+    - res/i18n/x2goclient_et.ts: remove obsolete and wrongly capitalized
+      "x2go" part from an Estonian translation message.
+    - res/i18n/x2goclient_sv.ts: minor whitespace fixup.
+    - res/i18n/x2goclient_*.ts: apply "XMDCP" -> "XDMCP" fix manually to
+      translation files.
+    - res/i18n/x2goclient_nb_no.ts: remove obsolete comments (leading to
+      problems when regenerating translation files.)
+    - res/i18n/x2goclient_nl.ts: remove obsolete comments (leading to problems
+      when regenerating translation files.)
+    - res/i18n/x2goclient_*.ts: regenerate translations.
+    - res/i18n/x2goclient_fi.ts: various fixups for Finnish translation file.
+    - src/sshmasterconnection.cpp: spelling fix. (Quiting -> Quitting)
+    - x2gobrowserplugin-2.4_1/src/qtbrowserplugin.cpp: spelling fix.
+      (convertable -> convertible)
+  * x2goclient.spec:
+    - Respect %{optflags} and pass QMAKE_STRIP=: to fix missing debug info
+      issues.
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (4.1.1.0):
+    - Interaction with SSH server (for example for changing
+      expired password). Fixes: #592.
+    - Fixing setting widget style issue in InteractionDialog on
+      Windows client.
+    - SSH Interaction for SSH Broker and SSH Server.
+    - SSH Iteraction for method keyboard-interactive.
+    - Move PulseManager MsgBox functions to main window:
+      GUI functions should be used only from main thread.
+    - Check "norecord" option on the first start of PulseAudio.
+    - Disable/Enable PulseAudio in config dialog.
+      New command line options:
+      --disable-pulse to disable start of PulseAudio
+      --disable-pulse-record to disable audio input.
+    - Check if PulseAudio running at session start and resuming
+      when sound is enabled. Show warning if PulseAudio not running
+      and disable the sound support for the session to avoid
+      session freezes.
+    - Add session config file option "sshproxysamekey". With this option
+      client will use for proxy authentication same key as for X2Go server.
+      This is important in first case for broker users, where key can be
+      generated "on the fly". Maybe it makes sence to add this option in UI
+      and command line later.
+    - Correct negative display coordinates for FS sessions.
+
+  [ Robert Parts ]
+  * New upstream version (4.1.1.0):
+    - res/i18n/x2goclient_et.ts: update Estonian translation file.
+    - res/i18n/x2goclient_et.ts: update Estonian translation file.
+
+  [ Martti Pitkänen ]
+  * New upstream version (4.1.1.0):
+    - res/i18n/x2goclient_fi.ts: update Finnish translation file.
+    - res/i18n/x2goclient_fi.ts: update Finnish translation file.
+    - res/i18n/x2goclient_fi.ts: update Finnish translation file.
+
+  [ Mike DePaulo ]
+  * New upstream version (4.1.1.0):
+    - Windows: Upgrade PulseAudio from 6.0 to 7.1
+      Fixes: #1152 Issues with audio when playing HTML5 videos
+    - Windows: Remove uninstaller from start menu.
+      It is still available in "Programs and Features".
+    - Windows: Upgrade Win32 OpenSSL from 1.0.1t to 1.0.2k
+      Fixes numerous CVEs
+    - Windows: Upgrade libssh from 0.7.0 to 0.7.4 (while maintaining
+      Pageant support).
+      The possibly relevant changes are:
+        + CVE-2016-0739 was fixed
+        + improved id_ed25519 support
+        + numerous bug fixes
+    - Windows: Update PuTTY from 0.67 to 0.68
+      The possibly relevant changes are:
+        + CVE-2016-6167 was fixed (did not affect X2Go Client by
+          default because the installation dir is not writeable by
+          users)
+        + CVE-2017-6542 was fixed
+    - Don't override PATH for the actual session or application
+      command.
+      Fixes: #1100
+
+  [ Walid Moghrabi ]
+  * New upstream version (4.1.1.0):
+    - {src/{help.cpp,onmainwindow.{cpp,h}},man/man1/x2goclient.1}: let
+      --background take a directory and randomly pick an SVG file in there.
+      Fixes: #1165.
+    - {src/{help.cpp,onmainwindow.{cpp,h}},man/man1/x2goclient.1}:
+      pass-through broker credentials when connecting to a direct RDP session.
+      Fixes: #1185.
+      Adds a new  --broker-use-creds-for-session parameter.
+    - src/onmainwindow.cpp: support --close-disconnect for direct RDP
+      sessions. Fixes: #1186.
+
+  [ Daniel Lindgren ]
+  * New upstream version (4.1.1.0):
+    - res/i18n/x2goclient_sv.ts: update Swedish translation file.
+
+  [ Ricardo Díaz Martín ]
+  * New upstream release (4.1.1.0):
+    - res/i18n/x2goclient_es.ts: update Spanish translation file.
+
+  [ Jos Wolfkamp ]
+  * New upstream version (4.1.1.0):
+    - res/i18n/x2goclient_nl.ts: update Dutch translation file.
+    - res/i18n/x2goclient_nl.ts: update Dutch translation file.
+
+  [ Klaus Ade Johnstad ]
+  * New upstream version (4.1.1.0):
+    - res/i18n/x2goclient_nb_no.ts: update Bokmål (Norway) translation file.
+    - res/i18n/x2goclient_nb_no.ts: update Bokmål (Norway) translation file.
+
+  [ Stefan Baur ]
+  * New upstream release (4.1.1.0):
+    - res/i18n/x2goclient_de.ts: update German translation file.
+
+  [ Sébastien Ducoulombier ]
+  * New upstream version (4.1.1.0):
+    - res/i18n/x2goclient_fr.ts: update French translation file.
+
+ -- X2Go Release Manager <[email-masked]>  Sun, 29 Oct 2017 08:43:45 +0100
+
+x2goclient (4.1.0.1-0x2go1) unstable; urgency=medium
+
+  [ Mihai Moldovan ]
+  * New upstream version (4.1.0.1):
+    - src/onmainwindow.cpp: unbreak Windows and OS X builds - directRDP is
+      only available on Linux, so guard new section.
+    - src/sessionbutton.cpp: only append "XDM@" string to server text if a
+      direct XDMCP session was requested. Issue automatically found by GCC.
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (4.1.0.1):
+    - Add "direct XDMCP" functionality.
+    - Disable sound button on direct RDP and XDMCP sessions.
+      Set for direct XDMCP session autologin=true.
+      Set for direct XDMCP session username=XDM.
+
+  [ Seth Galitzer ]
+  * New upstream version (4.1.0.1):
+    - src/help.cpp: add documentation for the --background option.
+      Part of #1162.
+    - {src/{help.cpp,onmainwindow.{cpp,h}},man/man1/x2goclient.1}: add new
+      --branding option that replaces the seal logo. Fixes: #1162.
+
+ -- X2Go Release Manager <[email-masked]>  Thu, 14 Sep 2017 03:06:33 +0200
+
+x2goclient (4.1.0.0-0x2go1) unstable; urgency=medium
+
+  [ Mihai Moldovan ]
+  * New upstream version (4.1.0.0):
+    - src/sessionbutton.cpp: replace drop down menu button on session buttons
+      with a more prominent, bigger settings gear icon. Requested for
+      visibility.
+    - src/onmainwindow.cpp: add debug statements to createRSAKey () regarding
+      the host pub key locations on OS X.
+    - src/onmainwindow.cpp: fix error message string in
+      printSshDError_noHostPubKey ().
+    - src/sshmasterconnection.cpp: add SecurID prompt to challenge auth code
+      prompts.
+    - src/sharewidget.cpp: fix compile on UNIX-like platforms by defaulting to
+      ISO-8859-1 not just on Linux but also other platforms. Fixes: #1124.
+    - src/x2goutils.cpp: don't try to wrap absolute paths as legacy resource
+      URIs in wrap_legacy_resource_URIs (). Fixes: #910.
+    - {res/img/svg/,res/resources.qrc}: add new file hamburger.svg, a
+      custom-created hamburger icon.
+    - src/sessionbutton.cpp: replace drop down menu button on session buttons
+      again with the custom-created hamburger icon. Also fix positioning
+      issues in mini mode.
+    - src/onmainwindow.{cpp,h}: add new function images_resource_path (),
+      similar to iconsPath () but without explicitly referring to icons.
+    - src/sessionbutton.cpp: we cannot use ".." in resource paths to move up
+      one level, so use images_resource_path () instead and hope that we
+      finally get a yummy hamburger.
+    - src/onmainwindow.{cpp,h}: let iconsPath () take a const-reference
+      instead of an object and make it a const member function.
+    - src/onmainwindow.{cpp,h}: let images_resource_path () take a new,
+      optional "base" parameter, that might be empty and is put in-between the
+      fixed resource path string and the filename parameter.
+    - src/onmainwindow.cpp: use images_resource_path () in iconsPath ().
+    - src/sessionbutton.cpp: instead of using the hamburger.svg file directly,
+      render it to a raster image and use this Pixmap as the icon file -
+      otherwise the icon will not show up. Also change the icon size back to
+      16x16 px, that's big enough.
+    - src/onmainwindow.cpp: remove left-over debug test message.
+    - {unixhelper.{cpp,h},x2goclient.pro{,.maemo}}: add unixhelper stub.
+    - unixhelper.{cpp,h}: implement cleanup program for process group.
+    - x2goclient.cpp: wrap X2Go Client main function and use that.
+    - x2goclient.cpp: add fork_helper() function to start up the UNIX cleanup
+      helper.
+    - x2goclient.cpp: use setsid() on UNIX to become session and process group
+      leader. If that fails, fork, terminate the parent and execute setsid()
+      in the child process. Use fork_helper() to start the UNIX cleanup helper
+      in a child process and continue with the main application in the parent.
+    - x2goclient.cpp: add myself to copyright header.
+    - x2goclient.cpp: add legacy <sys/types.h> header needed for old operating
+      systems.
+    - x2goclient.cpp: fix std::edit -> std::exit typo.
+    - unixhelper.{h,cpp}: also include <QtCore/qglobal.h> to have Q_OS_UNIX
+      defined on UNIX-based platforms. Move guards around.
+    - unixhelper.h: forgot to declare type of unix_cleanup() function.
+    - {unixhelper.{cpp,h},x2goclient.cpp}: unixhelper should really be a
+      (module) namespace, not a class.
+    - unixhelper.{cpp,h}: add documentation/comments.
+    - x2goclient.cpp: return return value of unixhelper::unix_cleanup().
+    - unixhelper.cpp: kill process group on error.
+    - unixhelper.{cpp,h}: implement signal unblocking in
+      unixhelper::unix_cleanup(). Update documentation.
+    - unixhelper.cpp: port from std::signal() to sigaction(). Handle errors.
+    - x2goclient.cpp: clean up. We don't care if setsid() fails or succeeds
+      and we certainly do not need to fork to force it to succeed. Whether we
+      are a process group leader already or become one doesn't matter, if the
+      end result is that we are process group leader.
+    - x2goclient.cpp: don't start the UNIX cleanup helper process right after
+      forking, but introduce a new command line option --unixhelper and
+      re-execute the main binary with this new option to indicate that the
+      UNIX cleanup helper tool is requested. It is necessary to call exec()
+      after fork on virtually all operating system, especially on OS X.
+    - x2goclient.cpp: fix compile problems introduced with the last commit.
+    - x2goclient.cpp: fix string comparison.
+    - x2goclient.cpp: create new argv array on the heap instead of on the
+      stack. Stack data will be invalid once the function goes out of scope
+      (which is what execv is doing.)
+    - unixhelper.{cpp,h}: raise sleeping time to two seconds and grace period
+      to 10 seconds.
+    - {unixhelper.{cpp,h},x2goclient.cpp}: switch main cleanup handling to
+      parent PID polling.
+    - unixhelper.{cpp,h}: ignore SIGINT, SIGTERM, SIGPIPE, SIGQUIT, SIGUSR1
+      and SIGUSR2.
+    - x2goclient.cpp: fix failing exec() call for the UNIX helper utility:
+      correctly terminate arguments vector.
+    - {appdialog,configwidget,onmainwindow,unixhelper}.cpp: fix some compile
+      warnings with GCC. Fix a few whitespace issues.
+    - appdialog.cpp: initialize parent in default case. Another GCC compile
+      warning fix.
+    - onmainwindow.cpp: correctly use ~/.x2go/.ssh as ssh directory when
+      starting sshd in user mode. Put the authorized_keys file in there. Check
+      and set correct permissions for both the directory and authorized_keys
+      file. Generalize some Windows-specific sections by using QDir and QFile.
+    - compat.{cpp,h}: new files. Implements strndup on OS X 10.6 and below.
+      Add to x2goclient.cpp, x2goclient.pro and x2goclient.pro.maemo.
+    - compat.{cpp,h}: remove inline keyword, because function is not defined
+      in header file.
+    - compat.h: include QtCore/qglobal.h for Q_OS_... macros.
+    - pulsemanager.{cpp,h}: new class for PulseAudio management.
+    - x2goclient.pro{,.maemo}: reference new pulsemanager.{cpp,h} files.
+    - macbuild.sh: add new MACPORTS_PREFIX detection/variable.
+    - macbuild.sh: add new dependency_error() helper function.
+    - macbuild.sh: add new lazy_canonical_path() helper function.
+    - macbuild.sh: add new get_nesting_level() helper function.
+    - macbuild.sh: add new repeat_str() helper function.
+    - macbuild.sh: refactor nxproxy detection to use MACPORTS_PREFIX.
+    - macbuild.sh: add EXE_DIR and FRAMEWORKS_DIR internal variables. Create
+      directories based on that. Use them when bundling.
+    - macbuild.sh: define PulseAudio libraries and binaries to be later
+      copied. Discover them using MACPORTS_PREFIX. Error out if any component
+      was not found.
+    - macbuild.sh: copy PulseAudio libraries and binaries.
+    - macbuild.sh: add phase output for bundling nxproxy.
+    - macbuild.sh: add work-in-progress PulseAudio bundling. Needs to be ripped
+      apart and be redone, because dylibbundler is not smart enough to handle
+      our case.
+    - macbuild.sh: add Linux library file name scheme regex as a precaution.
+    - macbuild.sh: directories are "executable", so the first check must
+      explicitly include a check for the argument being not a directory.
+    - macbuild.sh: add some more debugging output.
+    - macbuild.sh: remove libpulse and libpulsecore from libraries to be
+      bundled, as something else will bundle them anyway.
+    - macbuild.sh: use while-read-loop and find to actually recurse through
+      directories.
+    - macbuild.sh: check current file name against regex, not a (now) full
+      path.
+    - macbuild.sh: add the correct file path to the library bundling array.
+    - macbuild.sh: when actually bundling libraries, use @executable_path
+      instead of @loader_path. Will need testing.
+    - macbuild.sh: fix echo call to also show the intermediate lib dir, not
+      just the library file name. Helps debugging.
+    - macbuild.sh: also install libraries into staging area with intermediate
+      library path. Putting everything into a single place is a stupid idea.
+    - deduplicate.sh: add new, more or less Proof of Concept, and Work in
+      Progress file deduplication script.
+    - deduplicate.sh: add duplicates-to-real mapping.
+    - deduplicate.sh: add missed local variable declaration.
+    - deduplicate.sh: new function for parsing otool's output and printing
+      library dependencies if no error occurred.
+    - deduplicate.sh: non-functional: change WARNING to ERROR in error
+      messages.
+    - deduplicate.sh: add first skeleton for library dependency rewriting of
+      deleted duplicates.
+    - deduplicate.sh: correctly unset an array element.
+    - deduplicate.sh: change range-based for loops to "${!arr[@]}" to handle
+      "sparse" arrays correctly.
+    - deduplicate.sh: quote "${arr[@]}" correctly to not suddenly force word
+      splitting.
+    - deduplicate.sh: fix parse_otool_output: we want to return failure only
+      iff any of the strings are present in otool's output and actually handle
+      the failure string *ARRAY* correctly as that.
+    - deduplicate.sh: change exit to return in parse_otool_output.
+    - deduplicate.sh: record crafted "library path" values in duplicates
+      replacement to_files array.
+    - deduplicate.sh: debug parse_otool_output fiercely for the time being.
+    - deduplicate.sh: prevent word splitting when parsing otool's output. We
+      want the raw bits.
+    - deduplicate.sh: switch to range-based for loop in fixup section for
+      duplicate array walking as we need to access the same element index in
+      the replacement array.
+    - deduplicate.sh: add more useful information in fixup section's error
+      message.
+    - deduplicate.sh: unstub fixup section.
+    - deduplicate.sh: parse_otool_output: jump over first matching entry,
+      which is - hopefully - the id line.
+    - deduplicate.sh: actually include file name in install_name_tool pseudo
+      output.
+    - deduplicate.sh: save dependency format base string as a readonly
+      variable and use that instead of repeating a fixed string.
+    - deduplicate.sh: copy lazy_canonical_path from macbuild.sh for now.
+      deduplicate.sh will eventually be merged into macbuild.sh anyway.
+    - deduplicate.sh: more temporary debugging output in fixup section.
+    - deduplicate.sh: surprisingly, it turned out that only checking the
+      duplicate's basename against the current dependency's basename is not
+      good enough. Actually construct "the real dependency-format duplicate
+      string" and check it against "the real dependency". Even this is still
+      not good enough as it needs a bit cleanup - coming up next.
+    - deduplicate.sh: cleanup as announced in the last commit - using
+      lazy_canonical_path.
+    - deduplicate.sh: remove a bit of noisy debug output, but turn on
+      parse_otool_output debugging.
+    - deduplicate.sh: fix wrong return value capture. We want to check the
+      return value of the executed function/command, not that of "typeset".
+    - deduplicate.sh: add WARNING to status message.
+    - deduplicate.sh: remove some noisy debug output.
+    - macbuild.sh: replace tabs with two spaces. No functional changes.
+    - deduplicate.sh: replace tabs with two spaces. No functional changes.
+    - macbuild.sh: merge deduplicate.sh content in. Also enable the
+      functionality "for real", not just as a dry-run.
+    - macbuild.sh: spelling fix.
+    - macbuild.sh: more more debug messages and a whitespace change.
+    - macbuild.sh: fix removal of base prefix in deduplication if base prefix
+      ends in a slash.
+    - macbuild.sh: copy "special" files, so that they can be removed later on.
+    - macbuild.sh: rewrite ID line detection algorithm. Modules don't seem to
+      be needing one, so skipping the first dependency line incidentally skips
+      a "real" dependency for modules.
+    - pulsemanager.{cpp,h}: use name and underscore for member variables, not
+      underscore and name.
+    - pulsemanager.cpp: minor non-behavior changing fixes.
+    - pulsemanager.{cpp,h}: reformat only.
+    - pulsemanager.cpp: use initializer list for constructor.
+    - pulsemanager.{cpp,h}: add pulse_version_{major,minor}_ member variables.
+    - pulsemanager.cpp: reformat only.
+    - pulsemanager.{cpp,h}: switch port definitions to std::uint16_t.
+    - pulsemanager.h: add std:: namespace selector for uint32_t version
+      variables.
+    - pulsemanager.{cpp,h}: add ESD support.
+    - pulsemanager.{cpp,h}: rename relaunch () to restart ().
+    - pulsemanager.cpp: reformat only.
+    - pulsemanager.{cpp,h}: fixup preprocessor usage.
+    - pulsemanager.{cpp,h}: add server_args_, server_binary_ and
+      server_working_dir_ class variables.
+    - pulsemanager.cpp: make start () wrap the "real" OS-specific start
+      functions.
+    - pulsemanager.{cpp,h}: new function create_client_dir ().
+    - pulsemanager.cpp: add Windows support to shutdown ().
+    - pulsemanager.cpp: add cleanup support to on_pulse_finished ().
+    - pulsemanager.cpp: add Windows stuff to initial env in constructor.
+    - pulsemanager.{cpp,h}: add new function start_generic () to split off
+      common functionality.
+    - pulsemanager.cpp: let start_osx () use start_generic ().
+    - pulsemanager.{cpp,h}: implement start_win () as part of Windows
+      functionality.
+    - pulsemanager.cpp: also load module-esound-protocol-tcp module.
+    - pulsemanager.cpp: make generate_server_config () Windows-compatible.
+    - pulsemanager.cpp: make generate_client_config () Windows-compatible.
+    - pulsemanager.cpp: only play startup sound if DEBUG macro is defined.
+    - pulsemanager.cpp: make startup sound playing via
+      slot_play_startup_sound () Windows-compatible.
+    - pulsemanager.cpp: typo fix in variable name server_working_dir_.
+    - pulsemanager.{cpp,h}: find_port () actually returns a value, fix
+      declaration accordingly.
+    - pulsemanager.cpp: fix compile errors in find_port () by renaming the ret
+      or port variable to search_port.
+    - pulsemanager.cpp: fix another compile error due to typo'd versions of
+      generate_server_config () and generate_client_config ().
+    - pulsemanager.cpp: another typo fix: findPort -> find_port.
+    - pulsemanager.cpp: reorder member variables in initialization list.
+      Compile warning fix.
+    - pulsemanager.cpp: add "dummy" start_linux () function.
+    - pulsemanager.cpp: generate platform-dependent values for member
+      variables server_working_dir_ and server_binary_ in constructor. We need
+      them right away.
+    - pulsemanager.{cpp,h}: new member function fetch_pulseaudio_version ()
+      with first skeleton. Call it in the constructor.
+    - pulsemanager.cpp: re-initialize buffer string on each run while getting
+      CWD on Linux.
+    - pulsemanager.cpp: fix some error messages by removing redundant
+      newlines.
+    - pulsemanager.{cpp,h}: some older PA versions used the major, minor and
+      micro numbering scheme together with a descriptive string. Add new
+      member variables for this and initialize them correctly.
+    - pulsemanager.h: reformat a bit by adding newlines and moving lines in a
+      (hopefully) logical fashion.
+    - pulsemanager.cpp: add algorithm for actually extracting PA version
+      number.
+    - pulsemanager.{cpp,h}: only allow changing PA or ESD ports when server is
+      not currently running.
+    - pulsemanager.{cpp,h}: add record and playback private members, as well
+      as getters and setters.
+    - pulsemanager.cpp: reorder member variables in initializer list.
+    - pulsemanager.cpp: fix compile error in startup sound function.
+    - pulsemanager.h: more moving around.
+    - pulsemanager.cpp: use record and playback member variables.
+    - pulsemanager.cpp: cleanup, don't use copy assignment operator when we
+      just need to construct a new object.
+    - macbuild.sh: PulseAudio has been updated to version 8.0. Reflect this.
+    - macbuild.sh: libpulsecore.dylib also resides in the "private" pulseaudio
+      subdirectory now, adding it to "special files workaround".
+    - pulsemanager.cpp: remove config.pa while doing post-exit cleanups.
+    - src/pulsemanager.{cpp,h}: add get_pulse_dir () for fetching the
+      (OS-dependent) PulseAudio config and cookie directory.
+    - src/pulsemanager.cpp: replace hardcoded modules paths with dynamic ones
+      depending on the detected PA version.
+    - src/pulsemanager.cpp: add "FIXME" debug logging (and cleanup.)
+    - src/pulsemanager.cpp: backport fix for 526.
+    - src/pulsemanager.cpp: backport fix for 422.
+    - src/configdialog.{cpp,h}: add "no record" support for OS X (through
+      PulseManager.)
+    - src/configdialog.cpp: whitespace only.
+    - src/onmainwindow.{cpp,h}: hook PulseManager in - for both OS X and
+      Windows.
+    - src/mediawidget.cpp: reflect new capabilities through PulseManager.
+    - src/pulsemanager.h: move x2gologdebug.h inclusion into implementation
+      file.
+    - src/pulsemanager.cpp: output PA stdout/stderr via x2goDebug, not plainly
+      to stdout.
+    - src/configdialog.cpp: fix compile error by removing obsolete (and now
+      faulty) line for removed restart message.
+    - src/onmainwindow.cpp: fix compile errors due to misspelled function
+      names.
+    - src/pulsemanager.cpp: let start () act as a wrapper and do nothing if
+      the PA server is already running.
+    - src/onmainwindow.cpp: fix compile error due to misuse of #ifdef.
+    - src/onmainwindow.cpp: convert QDir object to QString for further
+      processing.
+    - src/onmainwindow.cpp: make use of new PulseManager::start () behavior
+      and always use it, no matter whether server is up already or not.
+    - src/pulsemanager.cpp: fix compile error due to typo.
+    - src/pulsemanager.cpp: hide Windows-only code behind #ifdefs. Otherwise
+      we'll get compile failures on non-Windows platforms.
+    - src/pulsemanager.{cpp,h}: add debugging setter and private variable.
+    - src/pulsemanager.{cpp,h}: port to new debugging feature.
+    - src/onmainwindow.cpp: port to new debugging feature of PulseManager.
+    - src/pulsemanager.h: fix compile error due to mismatching function
+      declaration for set_debug ().
+    - res/sound: add startup.wav sound to be played back when starting the PA
+      daemon in debug mode.
+    - src/pulsemanager.cpp: don't time out while trying to start PA or paplay.
+      "Handle" errors by printing out debug messages.
+    - macbuild.sh: add support for copying resource files. Currently only used
+      for startup.wav.
+    - res: rename "sound" to "audio".
+    - macbuild.sh: fix copying of resource files.
+    - macbuild.sh: also add PA binaries to deduplication fixup list.
+    - macbuild.sh: don't error out while executing parse_otool_output ().
+    - macbuild.sh: save return value of parse_otool_output (). Otherwise we'll
+      fetch the return value of "set", which is not really what we need.
+    - src/pulsemanager.cpp: fix typo in fetch_pulseaudio_version (). Read
+      standard output from temporary process, not our "main" server process
+      (which at this point is not even started yet.)
+    - src/pulsemanager.cpp: don't overwrite the temporary string variable for
+      the current line with what was supposed to hold new data in
+      fetch_pulseaudio_version ().
+    - src/pulsemanager.{cpp,h}: rename on_pulse_finished () to
+      slot_on_pulse_finished (). Oops...
+    - src/pulsemanager.cpp: actually only play startup sound if debugging is
+      enabled.
+    - src/pulsemanager.cpp: don't insert stray newline into config.pa.
+    - src/pulsemanager.cpp: insert PULSE_SERVER and PULSE_COOKIE variables
+      into environment as used by PulseManager. Otherwise we won't be able to
+      start binaries like paplay.
+    - src/pulsemanager.cpp: don't remove PA config and log file in
+      ~/.x2go/pulse on PA shutdown if debugging has been requested.
+    - src/x2goutils.{cpp,h}: add new function find_binary (). Searches for a
+      specific binary in a colon-separated list of paths. Really just a compat
+      function, as Qt 5 includes QStandardPaths::findExecutable ().
+    - src/pulsemanager.cpp: auto-detect PA binary in $PATH and MacPorts
+      default prefix as well on OS X.
+    - src/pulsemanager.cpp: add comments to Qt 4 code part.
+    - src/pulsemanager.cpp: add reminder for Linux-implementation in
+      slot_play_startup_sound ().
+    - src/x2goutils.cpp: fix compile error.
+    - src/pulsemanager.h: add new system_pulse_ variable to indicate that
+      a system PA binary shall be used.
+    - src/pulsemanager.cpp: correctly initialize and set system_pulse_ when
+      required.
+    - src/x2goutils.{cpp,h}: add application modality parameter to
+      show_RichText_Generic_MsgBox () and its wrappers.
+    - src/pulsemanager.cpp: add error message boxes throughout PulseManager.
+      Don't just abort () the program.
+    - src/x2goutils.h: fix compile error due to typo.
+    - src/pulsemanager.cpp: fix compile error on Windows.
+    - src/pulsemanager.cpp: fix startup when using the system-PA version.
+    - src/pulsemanager.cpp: fix startup sound playback when using the
+      system-PA version.
+    - src/pulsemanager.cpp: add warning message boxes where appropriate.
+    - src/pulsemanager.cpp: remove extraneous newlines from debug output.
+    - src/x2goutils.cpp: fix faulty logic in find_binary (): only reset the
+      given path to CWD iff it's actually empty. Not the other way around.
+    - src/x2goutils.cpp: add some debug logging to find_binary ().
+    - nsis/x2goclient.nsi: add startup.wav to installer package.
+    - src/: new file windows_stdint.h for Windows-compatibility when using
+      std::(u)int*_t types. These are only available with GCC in C++11 mode on
+      Windows for some reason.
+    - src/pulsemanager.h: use windows_stdint.h header on Windows, cstdint
+      otherwise.
+    - src/onmainwindow.cpp: short out code parts unconditionally checking for
+      the userSshd variable. We don't need it on Windows (and don't define it
+      on purpose) because using an user-mode SSH daemon is implied there (for
+      now.)
+    - src/onmainwindow.cpp: drop obsolete pulseVersionTest variable
+      initialization in Windows-only code.
+    - src/onmainwindow.cpp: drop obsolete pulseVersionIsLegacy variable
+      initialization in Windows-only code.
+    - src/onmainwindow.cpp: add another pair of braces to in_addr-type
+      variable initialization on Windows to silence compiler warning.
+    - src/onmainwindow.cpp: fix compile error on Windows after moving some
+      code around.
+    - src/onmainwindow.cpp: use correct C++ universal initializer for
+      initializing in_addr-type variable, the C-style universal zero
+      initializer won't cut it here.
+    - src/pulsemanager.h: include accidentally omitted wapi.h header file.
+    - src/pulsemanager.cpp: make PA version parsing function more generic and
+      don't expect that a number is always terminated with a period or dash.
+      Especially on Windows, with a PA version number of "6.0", this lead to
+      errors. OS X was fine with its "8.0.0-something" version number, but the
+      optional part at the end or even the micro version number could be
+      missing any time.
+    - src/pulsemanager.cpp: make sure that wherever we interface with non-Qt
+      functions, paths are in native form (i.e., containing empty separators,
+      instead of the "generic" slash UNIX-style separator.) Should fix a PA
+      startup issue on Windows.
+    - src/pulsemanager.cpp: fix PA version fetching on OS X again.
+    - src/unixhelper.{cpp,h}: make argument of kill_pgroup () const.
+    - src/unixhelper.h: style and general fixes within comments.
+    - src/unixhelper.{cpp,h}: split off core functionality of kill_pgroup ()
+      into a new function called real_kill_pgroup ().
+    - src/unixhelper.{cpp,h}: rewrite kill_pgroup () to act as a wrapper
+      around real_kill_pgroup (). Adjust comment. We need to do this so the
+      cleanup process doesn't kill itself before all other processes in the
+      process group are killed.
+    - src/pulsemanager.cpp: remove unused variables.
+    - src/unixhelper.cpp: code cleanup.
+    - src/{unixhelper.cpp,x2goclient.cpp}: fix errno usage - save before use.
+    - src/onmainwindow.cpp: document createRSAKey () because what it does is
+      completely non-obvious.
+    - src/onmainwindow.cpp: add support for explicitly setting the private key
+      bit size based on type and use values (currently) regarded as secure to
+      generateHostKey ().
+    - src/onmainwindow.{cpp,h}: rename generateHostKey () to generateKey ()
+      and add a boolean parameter with a default of false to request a public
+      key. Change old invocations of generateHostKey () accordingly.
+    - src/onmainwindow.cpp: refactor generateKey () a little bit to compact
+      it.
+    - src/onmainwindow.{cpp,h}: rewrite generateKey () function to actually
+      also generate user keys. Now returns the private key file path (public
+      key file path is trivially determined by appending ".pub" to that return
+      value.) Change all locations referencing generateKey () to use the
+      return value (if necessary) and remove dead code that was used to
+      generate a user key manually previously.
+    - src/onmainwindow.cpp: add more error handling to generateKey () and fix
+      up a broken error-handling section.
+    - src/onmainwindow.cpp: fix up a few debug strings.
+    - src/{onmainwindow.{cpp,h},configdialog.cpp}: remove userSshd variable
+      and code related to non-user-mode-sshd setups. Simplifies code a bit and
+      we want to always start a user-mode OpenSSH server anyway. Also get rid
+      of the clientport variable that is now unnecessary.
+    - src/onmainwindow.cpp: when starting sshd on Unix-based plattforms, raise
+      maximum startup time to 5 seconds and break out early, if the process
+      went into running state earlier.
+    - src/onmainwindow.cpp: uppercase key type in debug output and comment
+      string in generateKey ().
+    - src/onmainwindow.cpp: terminate sshd more correctly. First via terminate
+      (), then wait up to 5 seconds, then via kill ().
+    - src/onmainwindow.{cpp,h}: add new function check_key_type (). Takes a
+      key type and checks for validity/if it's known.
+    - src/onmainwindow.{cpp,h}: add new function key_type_to_string ().
+      Returns a stringified version of the selected key type, after checking
+      for validity.
+    - src/onmainwindow.{cpp,h}: add new function default_size_for_key_type ().
+      Returns the default key size in bits for the selected key type, after
+      checking for validity.
+    - src/onmainwindow.cpp: use the new functions in generateKey ().
+    - src/onmainwindow.h: move generateKey () declaration around.
+    - src/onmainwindow.{cpp,h}: reformat generateKey () only.
+    - src/onmainwindow.{cpp,h}: move createRSAKey () around.
+    - src/onmainwindow.{cpp,h}: reformat createRSAKey () only.
+    - src/onmainwindow.cpp: let startSshd () act as a wrapper and be called
+      multiple times. Check if the OpenSSH Server is already running and
+      return true, otherwise try to start it.
+    - src/onmainwindow.cpp: add some comments only to createRSAKey ().
+    - src/onmainwindow.{cpp,h}: rename createRSAKey () to the more-appropriate
+      name createKeyBundle (). Also add a key-type parameter and use it to
+      select the required key type (and maybe generate it if necessary.) Also
+      use the new functions to get a stringified version of the key type etc.
+    - macbuild.sh: switch to bundling PA 9.0.
+    - src/onmainwindow.cpp: move QProcess startup check in startSshd () to
+      non-Windows code section and add a listening socket check loop. Windows
+      uses other means of starting the daemon.
+    - src/onmainwindow.cpp: add comment to last all-in listening check in
+      startSshd ().
+    - src/onmainwindow.cpp: add listening-check loop to the Windows-specific
+      code of startSshd ().
+    - src/onmainwindow.{cpp,h}: make startSshd () private. There's no need to
+      keep it public, as only class-internal functions are using it.
+    - src/onmainwindow.{cpp,h}: add ssh_key_type_ member variable and getter
+      and setter to WinServerStarter class.
+    - src/onmainwindow.{cpp,h}: add SSH key type parameter to startSshd ().
+    - src/onmainwindow.cpp: pass new ssh_key_type_ member to startSshd () call
+      in WinServerStarter::run ().
+    - src/onmainwindow.cpp: pass key_type parameter to startSshd () in
+      createKeyBundle ().
+    - src/onmainwindow.cpp: add and use key_types parameter to
+      startWinServers ().
+    - src/onmainwindow.cpp: actually use key_type parameter in startSshd ()
+      and make selection more generic.
+    - src/onmainwindow.h: move WinServerStarter class definition around to
+      hopefully get the definition of ONMainWindow::key_types.
+    - src/onmainwindow.h: remove WWrapper definition, seems to be unused.
+    - src/onmainwindow.{cpp,h}: don't try to initialize non-static
+      ssh_key_type_ member variable directly, but in the constructor. Also,
+      use the initializer list to initialize the other member variables
+      directly.
+    - src/onmainwindow.cpp: re-order initializer list of WinServerStarter
+      constructor.
+    - src/onmainwindow.h: actually, we do need startSshd () to be public. Move
+      it back.
+    - src/onmainwindow.cpp: only pass non-Cygwin paths to QFile::exists () in
+      generateKey (). Refactor a bit to drop the now-unnecessary ret variable.
+    - src/onmainwindow.cpp: use QFileInfo to get the key file's basename in
+      exportDirs () instead of the old, potentially faulty string replace
+      dance.
+    - src/x2goutils.{cpp,h}: make find_binary () and add_to_path () available
+      on all UNIX-based operating systems. We will need it for sftp-server
+      discovery.
+    - src/pulsemanager.cpp: refactor PA binary searching code. Less
+      duplication now.
+    - src/onmainwindow.cpp: fix sshd_config generation on UNIX by searching
+      for the real sftp-server binary path.
+    - src/pulsemanager.cpp: fix PA binary searching logic. We don't want to
+      unconditionally set system_pulse_ to true if we found a binary... it
+      might as well be the bundled one...
+    - src/onmainwindow.cpp: move generateEtcFiles () call to startSshd (). We
+      must make sure that the sshd_config file exists and is up-to-date, so
+      let's always do it right before starting the sshd binary.
+    - src/onmainwindow.cpp: stop duplicating the list of known sftp-server
+      binary locations.
+    - src/{onmainwindow,pulsemanager}.cpp: actually *use* what we got back
+      from add_to_path ()... Fixes a few bugs here and there.
+    - src/onmainwindow.cpp: remove trailing slash from Mageia/SUSE/Arch
+      sftp-server binary search path.
+    - src/x2goutils.cpp: add debugging output to add_to_path ().
+    - src/x2goutils.cpp: fix add_to_path (). We want to remove trailing
+      slashes from elements-to-add, not just fetch a trailing slash if
+      encountered. Also, better don't compare a value from the original path
+      value to itself, but rather to the things we want to add in order to
+      remove duplicates, not remove most of the list of elements to add...
+    - src/unixhelper.cpp: use cstdio instead of stdio.h. It's the C++ header
+      and imports functions into the std namespace.
+    - src/: create new file unix_stdint.h which imports the (u)int*_t types
+      into the std namespace.
+    - src/pulsemanager.h: use unix_stdint.h on non-Windows-platforms to get
+      std::(u)int*_t types without having to use C++11.
+    - src/pulsemanager.cpp: fix Linux-based code by fixing a really stupid
+      typo ("erange" instead of "errno") and including the cerrno header.
+    - src/pulsemanager.cpp: use std::ssize_t for the path length, because it
+      could be -1 and std::size_t is not applicable.
+    - src/pulsemanager.cpp: cast the return value of realloc () to char*, as
+      GCC doesn't seem to like reassigning the pointer otherwise.
+    - src/unix_stdint.h: use same hack to import ssize_t into std namespace.
+    - src/onmainwindow.{cpp,h}: remove left-over parec references and code.
+    - src/onmainwindow.cpp: convert piece of code to non-Windows and
+      non-Darwin, so that not only Linux but other operating systems are
+      covered as well.
+    - src/mediawidget.cpp: unify some redundant code.
+    - src/mediawidget.cpp: simplify expression.
+    - src/mediawidget.cpp: add deprecation warning for ARTS.
+    - src/mediawidget.cpp: add deprecation warning for ESounD.
+    - macbuild.sh: make compatible with new llvm-based otool binary, which now
+      uses proper return values. Be backwards-compatible with otool-classic.
+    - res/i18n/: refresh translation files.
+    - deduplicate.sh: remove file, now obsolete and merged into macbuild.sh.
+    - res/i18n/: refresh translation files again after copyright date changes.
+    - res/i18n/x2goclient_fr.ts: fixup French translation file.
+    - res/i18n/x2goclient_sv.ts: fixup Swedish translation file a little bit
+      and add comments/requests for re-translations for the next time.
+    - macbuild.sh: switch to bundling PulseAudio 10.0 since it's now available
+      in MacPorts.
+    - src/x2goclient.cpp: no need to put new_argv_c_str std::vector onto the
+      heap. Keep it on the stack.
+    - src/x2goclient.cpp: use $PATH-exploration when re-executing x2goclient
+      in UNIX cleanup helper mode. Fixes: #1139.
+    - src/onmainwindow.cpp: correctly initialize pulseManager and
+      pulseManagerThread member variables. Fixes crashes on OS X and Windows
+      if X2Go Client terminates before these objects have been created at run
+      time (for instance when running x2goclient --help.)
+    - src/onmainwindow.cpp: correctly guard the new lines from the previous
+      commit. Fixes compile issues on Linux and other systems.
+    - res/i18n/x2goclient_es.ts: fixup Spanish translation file where
+      necessary and add comments/requests for re-translations for the next
+      time.
+    - res/i18n/x2goclient_es.ts: remove obsolete comments and very minor
+      whitespace fixup.
+    - res/i18n/x2goclient_de.ts: fixup German translation file, including
+      typo, whitespace, grammar fixes and other stuff.
+    - res/i18n/x2goclient_sv.ts: remove obsolete comments and very minor
+      whitespace fix.
+    - macbuild.sh: sanitize find input, as BSD find and GNU find behave
+      differently.
+    - macbuild.sh: get rid of problems and use gfind directly. We need special
+      GNU features.
+    - src/appdialog.cpp: logic so that X2Go-Top applications are shown again.
+      Used faulty logic when silencing compiler warnings.
+    - res/i18n/x2goclient_fi.ts: fix up Finnish translation file, including
+      typo, whitespace fixes and marking untranslated entries as such again,
+      after removing the English "translation" text.
+
+  [ Bernard Cafarelli ]
+  * New upstream version (4.1.0.0):
+    - {res/,x2goclient.pro}: rename .rcc files to .qrc. Fixes: #1096. "rcc" is
+      the extension for compiled resource files, whereas "qrc" is the mapping
+      file. Qt5 stumbles upon that - i.e., it doesn't try to compile files
+      with the "rcc" extension, while Qt4 did.
+    - res/: fix up previous change, the renaming of changelog.qrc was not
+      correctly committed.
+
+  [ Jason Alavaliant ]
+  * New upstream version (4.1.0.0):
+    - src/{onmainwindow.{cpp,h},help.cpp}: modify autostart option to support
+      multiple autostart apps at the same time. Fixes: #1024.
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (4.1.0.0):
+    - src/onmainwindow.cpp: fix SSHFS on Windows client. Fixes: #1105.
+
+  [ Sébastien Ducoulombier ]
+  * New upstream version (4.1.0.0):
+    - res/i18n/x2goclient_fr.ts: update French translation file.
+
+  [ Daniel Lindgren ]
+  * New upstream version (4.1.0.0):
+    - res/i18n/x2goclient_sv.ts: update Swedish translation file.
+    - res/i18n/x2goclient_sv.ts: fixup Swedish translation file.
+
+  [ Ricardo Díaz Martín ]
+  * New upstream release (4.1.0.0):
+    - res/i18n/x2goclient_es.ts: update Spanish translation file.
+    - res/i18n/x2goclient_es.ts: update Spanish translation file.
+
+  [ Stefan Baur ]
+  * New upstream release (4.1.0.0):
+    - res/i18n/x2goclient_de.ts: update German translation file.
+
+  [ Martti Pitkänen ]
+  * New upstream version (4.1.0.0):
+    - res/i18n/x2goclient_fi.ts: update Finnish translation file.
+
+ -- X2Go Release Manager <[email-masked]>  Wed, 22 Feb 2017 05:02:35 +0100
+
+x2goclient (4.0.5.2-0x2go1) unstable; urgency=medium
+
+  [ Klaus Ade Johnstad ]
+  * New upstream version (4.0.5.2):
+    - res/i18n/x2goclient_nb_no.ts: update Bokmål (Norway) translation file.
+
+  [ Mihai Moldovan ]
+  * New upstream release (4.0.5.2):
+    - res/i18n/x2goclient_nb_no.ts: fixup translation by respecting the
+      original messages' format, typo fixes and other changes.
+    - res/i18n/x2goclient_fi.ts: fixup translation by respecting the original
+      messages' format and other changes.
+    - src/{ongetpass,onmainwindow}.cpp: fixup QPlastiqueStyle usage on Qt5.
+      This particular style has been removed/replaced by Fusion, which
+      incorporates features of both Plastique and Clearlooks styles.
+    - x2goclient.spec: whitespace only.
+    - src/onmainwindow.cpp: add (default) MacPorts prefix, /usr/local/bin and
+      /opt/X11/bin to x2goclient's environment and child environments before
+      starting xmodmap. Fixes: #1019. Requires a re-release of X2Go Client for
+      OS X.
+    - src/x2goutils.{cpp,h}: add new function add_to_path () to add multiple
+      entries to a PATH-like string if they do not exist in there yet.
+    - src/onmainwindow.cpp: replace old code to modify the PATH value with the
+      new add_to_path () function.
+    - src/{onmainwindow,sshmasterconnection}.cpp: refactoring and whitespace only
+      changes following up the #1027 patch.
+    - src/onmainwindow.h: add new enum for selecting SSH host key types.
+    - src/onmainwindow.h: rename ONMainWindow::generateHostDsaKey () to
+      ONMainWindow::generateHostKey () and make key type selectible. Fixes:
+      #1003. Host key type selection currently only works within the code. Replace
+      calls to former ONMainWindow::generateHostDsaKey () with the generalized
+      function and request an RSA-type key.
+    - src/help.cpp: actually make help descriptions translatable. Looks ugly
+      and is cumbersome to use, but there seems to be no other way to do
+      that...
+    - src/help.h: typo fix in comment only.
+    - src/onmainwindow.cpp: add some comments related to maybe using
+      add_to_path ().
+    - src/onmainwindow.cpp: work around changed SSH host key locations in OS X
+      10.11+. Fixes: #1079. Also check /etc/ssh/ for keys.
+    - src/onmainwindow.cpp: fix last commit by using QFileInfo instead of
+      QDir. This lets us use the exists () member function correctly.
+    - {nsis/x2goclient.nsi,res/i18n/x2goclient_{da,es,et,fi,nl,zh_tw}.ts}:
+      replace left-overs of "X2go" with the correct "X2Go" spelling.
+      This mostly touches obsolete strings and file names, that need to be
+      cleaned, but it's still worthwhile to not have it show up when searching
+      for the old string. Given that NTFS is normally case-insensitive,
+      removing the files will still work.
+  * debian/control:
+    - Maintainer change in package: X2Go Developers <[email-masked]>.
+    - Uploaders: add myself. Also, force a rebuild due to the changed
+      versioning.
+
+  [ Mike DePaulo ]
+  * New upstream release (4.0.5.2):
+    - Windows: add sshd debug1 logging when using the --debug flag.
+    - Windows: Revert back to Cygwin components that have not been
+      "rebased"
+    - Windows: Update PuTTY from 0.66 to 0.67, which fixes
+      CVE-2016-2563.
+    - Windows: Update bundled Win32 OpenSSL from 1.0.1q to 1.0.1t,
+      which fixes the multiple CVEs announced on 2016-01-28,
+      2016-03-01 & 2016-05-03.
+
+  [ Martti Pitkänen ]
+  * New upstream version (4.0.5.2):
+    - res/i18n/x2goclient_fi.ts: update Finnish translation file.
+    - res/i18n/x2goclient_fi.ts: update Finnish translation file.
+
+  [ Sébastien Ducoulombier ]
+  * New upstream version (4.0.5.2):
+    - misc {src/,x2goclient.pro}: port to Qt5.
+
+  [ Tor Perkins ]
+  * New upstream release (4.0.5.2):
+    - src/{onmainwindow,sshmasterconnection}.{cpp,h}: add support for ANSI
+      X9.9 OTP tokens. Fixes: #1027. For this to work correctly, the challenge
+      string needs to be displayed to the user.
+    - src/sshmasterconnection.cpp: add support for Mobile OTP tokens and
+      references for the other token types. Fixes: #1036.
+
+  [ Oleksandr Shneyder ]
+  * New upstream release (4.0.5.2):
+    - reset session data in broker config.
+    - add "--no-autoresume" parameter.
+
+  [ Peter Barth ]
+  * New upstream release (4.0.5.2):
+    - res/i18n/x2goclient_de.ts: fix typo in close message.
+
+ -- X2Go Release Manager <[email-masked]>  Mon, 19 Sep 2016 06:13:14 +0200
+
+x2goclient (4.0.5.1-0x2go1) unstable; urgency=low
+
+  [ Mihai Moldovan ]
+  * New upstream release (4.0.5.1):
+    - onmainwindow.cpp: include sshd PID file path option in quotes to support
+      whitespaces within the var directory path on Windows. Add comment to
+      revisit this later on non-Windows-platforms, too. Fixes: #916.
+    - onmainwindow.cpp: do NOT reformat. Reverts most of the previous commit
+      because it breaks code logic.
+    - res/txt/packs: add adaptive method.
+    - {macbuild.sh,x2goclient.pro}: pass MacPorts library and include path's
+      to qmake. Due to the qt4-mac's changes, we do not automatically get
+      these values automatically "appended" in a usable way anymore.
+    - x2gosettings.cpp: let centralSettings () return false on Windows.
+    - onmainwindow.cpp: be more precise in slotScDaemonError () regarding
+      unknown and undefined errors.
+    - onmainwindow.{cpp,h}: don't use a hardcoded path to xmodmap on OS X and
+      handle errors more gracefully. Fixes: #487.
+    - x2goclient.pro: fix typo --stdlib=... -> -stdlib=... Fixes: #973.
+    - onmainwindow.cpp: add some more error handling for parsing the return
+      value of x2golistsessions. As it turns out, it can happen that "invalid"
+      strings are inserted in there, for instance by the perl interpreter
+      itself. We need to skip over these, or the client crashes when splitting
+      up the invalid lines.
+    - macbuild.sh: add stdlib forcing. Should not be used unless you really
+      know what you're doing. If you ponder using this, you probably don't.
+    - res/resources.rcc: add Turkish translation file. Fixes: #987.
+    - onmainwindow.cpp: use lowercase version of locale. Fixes: #953.
+      Fixes loading up the nb_NO translation file, which is actually baked as
+      nb_no into the binary.
+    - sshmasterconnection.cpp: let challenge-auth-based login attempts
+      fallback to normal password authentication if the initial
+      challenge-auth-based attempt was unsuccessful.
+    - sshmasterconnection.{cpp,h}: support variable number of
+      challenge-auth-code-based prompts.
+    - sshmasterconnection.cpp: don't check prompts for full string equality -
+      a matching prefix is good enough. Amongst others, this fixes errors in
+      conditions where the prompt does not contain a trailing whitespace, but
+      X2Go Client expects one.
+    - sshmasterconnection.cpp: add OATH TOTP prompt prefix. Fixes: #860.
+    - res/i18n: refresh translation files again.
+    - res/i18n/x2goclient_nb_no.ts: replace "X-Serv..." with "X.Org Server"
+      where applicable.
+    - res/i18n/x2goclient_nb_no.ts: correctly use "XQuartz" where necessary.
+    - res/i18n/x2goclient_nb_no.ts: whitespace only.
+    - res/i18n/x2goclient_nb_no.ts: fix up some "x2go" -> "X2Go" errors.
+    - res/i18n/x2goclient_nb_no.ts: mark translation strings needing some care
+      ("x2go..." -> "X2Go...") as unfinished for later fixup.
+    - res/i18n/x2goclient_nb_no.ts: fix (meta data) typo introduced with last
+      commit.
+    - res/i18n/x2goclient_nl.ts: fixup translation by respecting the original
+      messages' format and other changes.
+    - res/i18n/x2goclient_de.ts: fixup translation by respecting the original
+      messages' format, fixing typos and general improvements.
+    - res/i18n/x2goclient_es.ts: fixup translation by respecting the original
+      messages' format and other changes.
+    - res/i18n/x2goclient_sv.ts: fixup translation by respecting the original
+      messages' format and other changes.
+  * debian/control:
+    - Change apache2-dev | libc6-dev build dependency back to apache2-dev
+      only. Otherwise, apache2-dev is not installed at all, even though
+      theoretically available. The initial reasoning for this dependency type,
+      apache2-dev not being available on all Ubuntu/Debian platforms, is not
+      true anymore.
+    - Change apache2-dev build dependency yet again to apache2-dev |
+      apache2-threaded-dev. Turns out all Debian distros but wheezy (currently
+      oldstable) have an apache2-dev package. Even oldoldstable (squeeze)
+      does...
+
+  [ Oleksandr Shneyder ]
+  * New upstream release (4.0.5.1):
+    - xsettingswidget: compile only on Windows.
+    - Add support for new style command line options of xfreerdp on direct RDP
+      connections. (Fixes: #772).
+    - Replace "::" with "_" for the desktop link name on Windows.
+    - Fix direct RDP in broker mode.
+    - Fix crashing client when editing session from SessionManageDialog.
+      Fixes: #921.
+    - Configure audio input in pulseaudio on Windows.
+    - Reconnect ssh broker in case of IO Error.
+    - Reformat source onmainwindow.cpp.
+    - Disable settings editing if a directory with central settings is exists.
+    - Format long names on session buttons.
+    - Central settings for Linux, Mac and Windows.
+    - Fix VCXSRV parameter to disable PRIMARY clipboard in X2Go Client for Windows. Fixes: #927.
+    - Fix reading settings for direct RDP connections in broker mode.
+    - Auto accept RSA Keys for SSH Broker with --add-to-known-hosts option.
+
+  [ Mike Gabriel ]
+  * New upstream release (4.0.5.1):
+    - xinerama.conf: Don't choke if screen coordintate lines in xinerama.conf
+      start with a dash ("-"). (Fixes: #948).
+
+  [ Mike DePaulo ]
+  * New upstream release (4.0.5.1):
+    - Windows: Update bundled Win32 OpenSSL from 1.0.1p to 1.0.1q,
+      which fixes the multiple CVEs announced on 2015-12-03.
+    - Windows: Upgrade Cygwin components to latest versions as of
+      2016-01-21, except for the Cygwin DLL which is still at 1.7.33
+      in order to avoid breaking folder sharing and printer sharing
+      due to 1.7.34's ACL/permissions changes.
+      (authorized_keys file would often have mode 660 instead of 600)
+      The latest components include most notably:
+        + openssh 6.8p1-1-x2go1 -> 7.1p2-1-x2go1 (security update)
+        + openssl 1.0.2d-1 -> 1.0.2e-1 (security update)
+    - Windows: Update nxproxy from 3.5.0.31 to 3.5.0.32
+    - Windows: Update Unicode NSIS from 2.46.5 to 2.50.0 Pre-release,
+      which fixes the DLL hijacking security vuln (NSIS bug 1125.)
+    - Windows: Update PuTTY from 0.64 to 0.66, which fixes
+      CVE-2015-5309.
+    - Windows: Remove libzip. libssh no longer uses it.
+
+  [ Orion Poplawski ]
+  * New upstream release (4.0.5.1):
+    - ssh{process,masterconnection}.cpp: run bash as a login shell when
+      invoking any command remotely. Fixes: #928. Because this opens the door
+      for ~/.bash_logout and friend scripts to be executed, which may contain
+      calls to ncurses' reset or clear, also set the TERM variable to dump to
+      not have unexpected output on stderr at logout time.
+    - sshmasterconnection.cpp: check correct variable for validity: public key
+      instead of private key (again.) Fixes: #945.
+
+  [ Klaus Ade Johnstad ]
+  * New upstream version (4.0.5.1):
+    - res/i18n/x2goclient_nb_no.ts: update Bokmål (Norway) translation file.
+
+  [ Heinrich Schuchardt ]
+  * New upstream version (4.0.5.1):
+    - sshmasterconnection.cpp: don't fetch invalid proxy socket. Fixes: #1000.
+      From http://doc.qt.io/qt-4.8/qabstractsocket.html#socketDescriptor:
+      The socket descriptor is not available when QAbstractSocket is in
+      UnconnectedState.
+      So we have to connect to the proxy server first before retrieving the
+      native socket.
+
+  [ Daniel Lindgren ]
+  * New upstream version (4.0.5.1):
+    - res/i18n/x2goclient_sv.ts: update Swedish translation file.
+
+  [ Sébastien Ducoulombier ]
+  * New upstream version (4.0.5.1):
+    - res/i18n/x2goclient_fr.ts: update French translation file.
+
+  [ Jos Wolfkamp ]
+  * New upstream version (4.0.5.1):
+    - res/i18n/x2goclient_nl.ts: update Dutch translation file.
+
+  [ Stefan Baur ]
+  * New upstream release (4.0.5.1):
+    - res/i18n/x2goclient_de.ts: update German translation file.
+
+  [ Ricardo Díaz Martín ]
+  * New upstream release (4.0.5.1):
+    - res/i18n/x2goclient_es.ts: update Spanish translation file.
+
+ -- X2Go Release Manager <[email-masked]>  Thu, 24 Mar 2016 21:35:30 +0100
+
+x2goclient (4.0.5.0-0x2go1) unstable; urgency=low
+
+  [ Mihai Moldovan ]
+  * New upstream release (4.0.5.0):
+    - INSTALL: add more verbose instructions on how to build X2Go Client and
+      friends.
+    - onmainwindow.{cpp,h}: rename slotScDaemonOut() and slotScDaemonError()
+      to slotScDaemonStdOut() and slotScDaemonStdErr(). I will need
+      slotScDaemonError() later and the previous names were a bit of a
+      misnomer.
+    - x2goutils.{cpp,h}: add new show_RichText_Generic_MsgBox() main function
+      designed to replace the show_RichText_WarningMsgBox() function.
+    - x2goutils.{cpp,h}: make show_RichText_WarningMsgBox() use
+      show_RichText_Generic_MsgBox ().
+    - x2goutils.{cpp,h}: new show_RichText_ErrorMsgBox() function as a wrapper
+      for show_RichText_Generic_MsgBox() with a critical icon.
+    - onmainwindow.{cpp,h}: properly handle scdaemon errors with a message box
+      and close the client.
+    - onmainwindow.cpp: manipulate PATH and append /usr/lib/gnupg2/ to it when
+      starting scdaemon. Fixes: #882.
+    - x2goutils.h: add QMessageBox include, fixed compile error.
+    - onmainwindow.cpp: fix typos leading to compile errors.
+    - onmainwindow.cpp: add blocks to switch cases to fix a compile error.
+      Also correctly append to informative_text on one occasion, instead of
+      overwriting it.
+    - x2goutils.cpp: correct typo to fix compile errors.
+    - onmainwindow.cpp: drop a redundant variable and fix empty env check.
+    - onmainwindow.cpp: add more newlines to scdaemon error output. Use
+      trayQuit() method to really quit the client.
+    - onmainwindow.cpp: add debugging output for new scdaemon PATH value.
+    - onmainwindow.cpp: split up PATH value as printed in the error message
+      box by a newline every 100 characters. Makes it look less ugly and fixes
+      truncation issues.
+    - sshprocess.cpp: export PATH variable when running commands. Otherwise,
+      only the first one will respect the new PATH value.
+    - sshprocess.cpp: wrap SSH command prelude and conclusion in double
+      quotes.
+    - sshprocess.cpp: wrap all remote commands with "bash" instead of the
+      unspecific "sh".
+    - onmainwindow.cpp: try to escape shell quotes correctly when using
+      Kerberos/GSSApi when running the xmodmap keyboard sync command on OS X.
+    - onmainwindow.cpp: also escape other shell quotes when using
+      Kerberos/GSSApi.
+    - onmainwindow.cpp: silence compiler warning by casting an int value to
+      std::size_t.
+    - onmainwindow.cpp: silence another compiler warning by not converting
+      from string to int and back to string needlessly. Just use the string.
+      No need for an OS X-specific variable anymore.
+    - onmainwindow.cpp: fix compile error - use QString.toAscii () to get a
+      valid C string representation for tr ().
+    - onmainwindow.cpp: don't terminate if scdaemon exited with non-zero exit
+      code.
+    - sshprocess.cpp: don't use QProcess::start (QString). Qt is trying to be
+      too smart and causes big trouble. Instead, use QProcess::start (QString,
+      QStringList) and pass the arguments as a list. On Windows, Qt will
+      automatically double quote the arguments and duplicate escaped double
+      quotes or escape non-escaped double quotes. On UNIX-like platforms, each
+      element of the list is passed as a unique argv element, so there's no
+      need for quoting them (that's only a shell-internal thing to group
+      arguments.)
+    - sshprocess.cpp: add a bit more debugging - also print out the unmodified
+      raw output of SSH commands.
+    - onmainwindow.cpp: remove now-bogus double quote escaping.
+    - sshmasterconnection.cpp: port QProcess::start () change.
+    - sshprocess.cpp: whitespace/prettify only and a compile fix.
+    - x2goclient.pro: reinstate old lrelease "search" behavior if
+      qtPrepareTool() is not available. This should only happen on EPEL 6,
+      which ships a broken Qt4 version...
+    - onmainwindow.cpp: only set multidisplay mode for non-rootless sessions.
+    - {ui/xsettingsui.ui,xsettingswidget.cpp}: add new "whole display" option
+      for external X server configuration. Part of #883.
+    - onmainwindow.cpp: rename "optionsmd" setting to "optionswholedisplay",
+      which is more clear.
+    - xsettingswidget.cpp: fix compile error: settings -> setting.
+    - sessionmanagedialog.cpp: enable some debugging and make selected
+      sessions configureable or deletable. Fixes: #909.
+
+  [ Mike Gabriel ]
+  * debian/control:
+    + Add alternative D for nxproxy: qvd-nxproxy. Allows parallel installation
+      of X2Go Client and the TheQVD client (perl-qvd-client).
+
+  [ Mike DePaulo ]
+    - Windows: Update bundled Win32 OpenSSL from 1.0.1m to 1.0.1p,
+      which fixes the multiple CVEs announced on 2015-06-11 and
+      CVE-2015-1793 (announced on 2015-07-09).
+    - Windows: Upgrade the MSVC 2008 DLLs (9.0.21022.8) to the
+      MSVC 2013 DLLs (12.0.21005.1), which Win32 OpenSSL now requires.
+    - Windows: Only bundle msvcr120.dll; The other 2 MSVC DLLs aren't
+      needed by Win32 OpenSSL.
+    - Windows: Update bundled Cygwin OpenSSL from 1.0.2a-1 to 1.0.2d-1, which
+      which fixes the multiple CVEs announced on 2015-06-11 and
+      CVE-2015-1793 (announced on 2015-07-09).
+    - Windows: Update bundled VcXsrv from 1.17.0.0-1 (X2Go/Arctica Build)
+      to 1.17.0.0-3 (X2Go/Arctica Build)
+      The differences relevant to X2Go are:
+        + VcXsrv's bundled version of openssl was updated from 1.0.2a
+          to 1.0.2d (fixes the multiple CVEs announced on 2015-06-11 and
+          CVE-2015-1793 (announced on 2015-07-09).
+        + Drop winmultiwindow.patch (Part of #883)
+        + hw/xwin/glx: Don't create fbConfigs for un-accelerated
+          pixelFormats
+          This has the effect of disabling StaticColor under
+          MultiWindow mode with -wgl (default) and -swrastwgl, and
+          thus making X2Go sessions started from the Windows client
+          able to be resumed on the client on a different OS or the
+          client runing on Windows with different display settings.
+          (Fixes: #696)
+    - Linux: Fix desktop session icons (.desktop files) failing due to
+      missing space between "x2goclient" and its 1st argument
+      (e.g. "--session") (Fixes: #911)
+
+  [ Henning Heinold ]
+  * New upstream release (4.0.5.0):
+    - x2goclient.pro: simplify lrelease path preparing for different OS and
+      cross compiling. Fixes: #901.
+
+  [ Oleksandr Shneyder ]
+  * New upstream release (4.0.5.0):
+    - onmainwindow.{cpp,h}: fix multimonitor mode on Windows. Run VcXsrv on
+      selected screen without decorations.
+
+ -- X2Go Release Manager <[email-masked]>  Tue, 28 Jul 2015 04:48:20 +0200
+
+x2goclient (4.0.4.0-0x2go1) unstable; urgency=low
+
+  [ Mike DePaulo ]
+  * New upstream release (4.0.4.0):
+    - Windows: Do not delete saved PuTTY sessions when Kerberos 5
+      (GSSAPI) authentication is enabled (Fixes: #625/#789)
+    - Windows: Fix "Connection failed" "pscp" error with folder
+      sharing when Kerberos 5 (GSSAPI) auth is used, and the
+      server-side home dir is at a path other than /home/$USER
+      (Fixes: #868)
+    - Windows: Fix audio (PulseAudio) when Kerberos 5
+      (GSSAPI) authentication is used (Fixes: #869)
+    - Windows: Include debug build in the regular installer.
+      It is an optional component during the install. It is not
+      installed by default.
+    - Windows: Include Pageant and PuTTYgen in the installer.
+      They are optional components during the install. They are
+      installed by default.
+    - Windows: Add descriptions for the "components" in the installer
+      (English language only at this time)
+    - Windows: You can now view the version and some other info by:
+      right-click on the installer -> Properties -> Details
+      (English language only at this time)
+    - Windows: Upgrade bundled PulseAudio from 5.0-rev18 to 6.0-11.1
+      (No known impacts to X2Go, except for the fact that many needed
+       patches are now included in upstream PulseAudio.)
+    - Windows: Upgrade bundled VcXsrv from 1.15.2.2-xp+vc2013+x2go1 to
+      1.17.0.0-1 (X2Go/Arctica Build)
+      Note that X2Go Client for Windows 4.0.3.2-20150508 has an
+      update to 1.15.2.6 (X2Go/Arctica), which fixes all the CVEs.
+      The differences relevant to X2Go are:
+        + Numerous X.org components were upgraded to new major/minor
+          versions.
+        + CVE-2015-0255 was fixed in VcXsrv itself
+        + CVE-2015-3418 was fixed in VcXsrv itself
+        + Font files no longer differ in each build due to timestamp
+          differences
+        + VcXsrv's bundled version of openssl was upgraded from 1.0.1k
+          to 1.0.2a (fixes the multiple CVEs announced on 2015-03-19)
+        + VcXsrv's bundled version of libXfont was upgraded from 1.4.8
+          to 1.5.1 (Fixes CVE-2015-1802 through CVE-2015-1804)
+        + VcXsrv's bundled version of freetype was updated from 2.5.3
+          to 2.5.5 (fixes CVE-2014-9656 through CVE-2014-9675)
+    - Windows: Update bundled Win32 OpenSSL from 1.0.1L to 1.0.1m,
+      which fixes the multiple CVEs announced on 2015-03-19.
+      Note that X2Go Client for Windows 4.0.3.2-20150329 has this update
+      also.
+    - Windows: Update bundled PuTTY from 0.63 to 0.64.
+      In addition to other changes, CVE-2015-2157 has been fixed.
+    - Windows: Upgrade libssh from 0.6.4 to 0.7.0 (while maintaining
+      Pageant support).
+      The differences relevant to X2Go are:
+        + CVE-2015-3146 was fixed
+        + Added support for ed25519 keys
+        + Added SHA2 algorithms for HMAC
+      Note that X2Go Client for Windows 4.0.3.2-20150508 has the update
+      to 0.6.5, which fixes the CVE also.
+    - Windows: Update bundled nxproxy (nx-libs-lite) from 3.5.0.27 to
+      3.5.0.31. (bugfix & feature update)
+    - Windows: Update/Upgrade bundled Cygwin components to latest
+      versions as of 2015-04-25 (except for the Cygwin DLL, which was
+      upgraded but not to the latest version).
+      Note that all the security fixes were included in updates to
+      X2Go Client for Windows 4.0.3.2
+        + openssl 1.0.1k-1 -> 1.0.2a-1 (upgrade. includes security fixes
+          for the multiple CVEs announced on 2015-03-19.)
+        + libjpeg-turbo 1.8.1-1 -> 1.8.1-3 (security update for
+          CVE-2014-9092)
+        + libpng 1.5.21-2 -> libpng16 1.6.17-1 (upgrade, may improve X2Go
+          performance when PNG compression is selected. Also includes the
+          fix for CVE-2013-6954)
+        + gcc 4.8.3-3 -> 4.9.2-3 (upgrade, may improve X2Go performance a
+          little bit)
+        + openssh 6.6p1-3-x2go1 -> 6.8p1-1-x2go1 (upgrade, probably not
+          relevant to X2Go)
+        + cygwin (DLL) 1.7.32-1 -> 1.7.33-1 (upgrade, probably not
+          relevant to X2Go)
+        + dash 0.5.8-2 -> 0.5.8-3 (feature update, not relevant to X2Go)
+        + ncurses 5.9-20140524-1 -> 5.9-20150404-1 (update, probably
+          not relevant to X2Go)
+        + zlib 1.2.8-1 -> 1.2.8-3 (update, undocumented by Cygwin project)
+    - Windows: Copy the exact version of each cygwin DLL from the cygwin
+      binary tarballs rather than copying the "rebased" version from
+      an X2Go developer's cygwin installation.
+      What effect this will have on users is TBD. However, it does mean
+      that we are distributing the exact DLLs that the Cygwin project
+      provides, which is desirable for security.
+
+  [ Mihai Moldovan ]
+  * New upstream version (4.0.4.0):
+    - Move *.cpp and *.h files to src/ and *.ts files to src/i18n/.
+    - Reference src/ in Doxyfile.
+    - Reference src/ and src/i18n/ in x2goclient.pro.
+    - Move *.ui files to src/ui/ and reference in x2goclient.pro.
+    - Translate and simplify header in x2goclient.pro.
+    - Add x2goclientconfig.pri only containing a comment to override specific
+      entries in x2goclient.pro in x2goclientconfig.pri.
+    - Move resource files to src/res/ and reference in x2goclient.pro.
+    - Reference changes in shipped Makefile.
+    - Rename SRC_DIR to TOP_DIR in shipped Makefile.
+    - Rename qtbrowserplugin-<ver>-opensource to x2gobrowserplugin-<ver> and
+      reference in x2goclient.pro.
+    - Move x2goplugin.rc to x2gobrowserplugin-*/src/res/ and reference in
+      x2goclient.pro.
+    - Remove executability from x2goclient.pro.
+    - Fix typos and update URL's in INSTALL file.
+    - Fix typos and grammar in HOWTO.GPGCARD.
+    - Add "X2Go Project" copyright to LICENSE file.
+    - Replace backticks with $() and change spaces to tabs in
+      Makefile.man2html.
+    - Reformat README.OpenSSL-Exception.
+    - Grammar fix in README.i18n.
+    - Update .gitignore with more temporary files.
+    - Make x2goclient.pro consistent: replace tabs with spaces, put quotes
+      around messages, remove or add whitespace where applicable.
+    - Move *.rc and *.rcc files back to top directory for now. Resources must
+      be in the resource file's base directory or a sub-directory.
+    - Move icons/ to img/icons/ and update references in
+        + resources.rcc
+        + COPYRIGHT.x2go-logos
+        + Makefile
+        + debian/x2goclient.install
+        + macbuild.sh
+        + nsis/x2goclient.nsi
+        + src/onmainwindow.cpp
+        + src/appdialog.cpp
+        + src/folderbutton.cpp
+        + src/folderexplorer.cpp
+        + src/sessionbutton.cpp
+        + src/sessionexplorer.cpp
+        + src/sessionmanagedialog.cpp
+        + src/sessionwidget.cpp
+        + src/ui/helpdialog.ui
+        + src/xsettingswidget.cpp
+    - Move png/ to img/png/ and update references in resources.rcc and
+      src/onmainwindow.cpp.
+    - Move svg/ to img/svg/ and update references in resources.rcc,
+      src/folderbutton.cpp, src/onmainwindow.cpp and src/sessionbutton.cpp.
+    - Move *.ts files back to the top directory (they are resources.)
+    - Move *.ts and *.qm files to i18n/ and update references in
+      resources.rcc, x2goclient.pro and debian/rules.
+    - Fix formatting errors in nsis/gpl.txt.
+    - Fix whitespace errors in nsis/x2goclient.nsi.
+    - Don't change the icons path in nsis/x2goclient.nsi.
+    - Make nsis files non-executable.
+    - Move x2go-logos/ to img/x2go-logos and update references in
+      COPYRIGHT.x2go-logos.
+    - Fix whitespace errors in x2gobrowserplugin-2.4_1/src/res/x2goplugin.rc.
+    - Move i18n/ to res/i18n/ and update references in debian/rules and
+      x2goclient.pro.
+    - Remove executability bit from src/sshmasterconnection.cpp and
+      src/sshprocess.cpp.
+    - Move img/ to res/img/ and update references in
+        + COPYRIGHT.x2go-logos
+        + Makefile
+        + debian/x2goclient.install
+        + macbuild.sh
+        + x2goclient.pro
+        + x2goclient.rc
+    - Move
+        + git.rcc
+        + changelog.rcc
+        + x2goclient.rc
+        + resources.rcc
+      to res/ and update references in x2goclient.pro and src/ui/helpdialog.ui.
+    - Reference new src directory as include dir in x2goclient.pro.
+    - Move txt/ to res/text/ and update references in
+        + x2goclient.pro
+        + Makefile
+        + debian/rules
+        + x2goclient.spec
+    - Whitespace fix in Info.plist.
+    - Use more quoting and curly braces for referencing variables in
+      macbuild.sh.
+    - Define TOP_DIR variable in macbuild.sh -- set to $PWD.
+    - Define the new variables $SDK and $MACOSX_DEPLOYMENT_TARGET in
+      macbuild.sh which can also be (pre-)set through the environment. Default
+      to the 10.7 SDK and deployment target. Use the variables when calling
+      qmake.
+    - Specify -spec macx-g++ when using qmake in macbuild.sh.
+    - Directly reference project file for qmake in macbuild.sh.
+    - Use out-of-source build and do not overwrite the default shipped
+      Makefile in macbuild.sh.
+    - Also also specify the top dir when defining the path to the generated
+      appbundle and dmg file in macbuild.sh.
+    - Move Info.plist to res/ and update reference in x2goclient.pro.
+    - Fix references of resources in macbuild.sh to access files from TOP_DIR.
+    - Work around a bug in qmake generating incorrect make rules for embedding
+      the OS X app bundle Info.plist file.
+    - Work around another bug in qmake and copy icon "manually".
+    - Define wrap_legacy_resources() function and use it to wrap legacy
+      resource locations stored in old session config files.
+    - Add some debugging output to sessionbuttons/userbutton to see what file
+      path is being used as a pixmap (user photo/session icon.)
+    - Add myself to copyright section in the x2goutils headers.
+    - Change four spaces per indentation level to two spaces in x2goutils.cpp.
+    - Add fixup_resources() to x2goutils to fix "broken" resource URI's.
+    - Rename fixup_resources() and wrap_legacy_resources() to
+      fixup_resource_URIs() and wrap_legacy_resource_URIs(). Update
+      references.
+    - Move res/Info.plist and macdmg.DS_Store to res/osxbundle/ and update
+      references in x2goclient.pro and macbuild.sh.
+    - Add debug mode selector via DEBUG env variable to macbuild.sh.
+    - Enable more debugging if needed: change -g flag to -g3 -ggdb3 -gdwarf-4.
+    - Select stdlib on OS X based on the passed or default SDK value.
+    - Fix TOP_DIR handling in macbuild.sh.
+    - Switch to BASH interpreter for macbuild.sh.
+    - Also accept "FALSE" and "false" as binary values in macbuild.sh.
+    - Make bundling optional (but enabled by default) via the new BUNDLE
+      environment variable in macbuild.sh.
+    - Enable -O2 in debug mode. Otherwise, debug mode would test different
+      execution paths than release mode.
+    - Add new UNUSED() macro to x2goutils.h and silence compiler warnings.
+    - Fix some QMessageBox usages. There are many more places that need
+      fixing...
+    - Remove config_mac.sh. macbuild.sh handles this now.
+    - Use the correct client build dir in macbuild.sh: client_build.
+    - Only use --stdlib compiler flag on 10.7+. Unsupported on 10.6 and below.
+    - Use sh default assignment instead of default value in macbuild.sh.
+      Removes the need to redundantly specify the variable name.
+    - App bundle and dmg file will be automatically removed when removing the
+      client build directory. Remove redundancy from macbuild.sh.
+    - Remove 'function' keyword in macbuild.sh, as it's causing undefined
+      behavior according to SUS.
+    - Define and implement new function 'make_boolean()' in macbuild.sh. Takes
+      a pseudo-boolean value and outputs either 0 or 1. Use this function.
+    - Move functions to the start of the macbuild.sh script.
+    - New env var/parameter UNIVERSAL in macbuild.sh. Switches the build
+      architecture to either exclusively x86_64 (UNIVERSAL=0) or both x86_64
+      and x86 (UNIVERSAL=1).
+    - Add usage message to macbuild.sh obtainable via -h or --help.
+    - x2goclient.pro.maemo: cleanup.
+      + Reorder sections so that they match x2goclient.pro.
+      + Adapt to new directory structure.
+      + Various whitespace fixes.
+    - Move OS X-specific stuff from general section to macx section in
+      x2goclient.pro.
+    - Move ICON definition up before it's actually used in the macx section in
+      x2goclient.pro.
+    - Windows: move building into client_build subdirectory. Also needs the
+      changes in buildscripts.git.
+    - Windows: convert and delete the other config or build scripts. Delete
+      obsolete ones.
+    - Windows: correctly reference windows icon.
+    - x2goclient.spec: fix builds on Fedora and related due to failing removal
+      of browserplugin directory. That's non-critical.
+    - onmainwindow.cpp: actually call slotTunnelOk(int), do not generate a run
+      time error by calling the non-existent function slotTunnelOk().
+      Fixes: #804.
+    - onmainwindow.cpp: clarify message regarding missing SSH daemon host
+      keys. Fixes: #793.
+    - non_modal_messagebox.{cpp,h}: Add new Non_Modal_MessageBox class for
+      non-modal message boxes.
+    - onmainwindow.cpp: use Non_Modal_MessageBox::critical function to display
+      errors relating to missing sshd host keys. Fixes: #794.
+    - onmainwindow.cpp: also make the message about a non-running sshd
+      non-modal.
+    - {x2goclient.pro,res/osxbundle/{Info.plist,postbuild.sh}}:
+      + Add new postbuild script to set the correct version in the processed
+        Info.plist output file.
+      + Use this script in x2goclient.pro as QMAKE_POST_LINK command.
+      + Move Icon copying into that script.
+      + Define version in x2goclient.pro.
+    - onmainwindow.cpp: consolidate Windows and non-Windows sshd startup error
+      message.
+    - onmainwindow.cpp: typo fix (authoized_keys.)
+    - onmainwindow.cpp: stop exporting directories (Printing, File Sharing) on
+      sshd error.
+    - onmainwindow.cpp: fix session icon not being displayed as tray icon
+      (missed legacy resource URI wrapper call.)
+    - configdialog.cpp: update XQuartz outdated version info message and
+      links. Add MacPorts reference.
+    - configdialog.cpp: reformat code, add MacPorts and XQuartz references,
+      URL's and installation instructions, don't show outdated version warning
+      when no XQuartz server is installed. Fixes: #792.
+    - x2goutils.{h,cpp}: use QString references.
+    - x2goutils.{h,cpp}: add new helper function show_RichText_WarningMsgBox.
+    - configdialog.cpp: use new helper function show_RichText_WarningMsgBox to
+      show proper errors. Format as HTML. Use hyperlinks. Rephrase XQuartz
+      warning messages.
+    - configdialog.cpp: return empty strings as paths to the XQuartz
+      application if no valid one could be found in order to show the proper
+      error message.
+    - configdialog.cpp: rephrase another error message, use the new helper and
+      reformat code.
+    - onmainwindow.{cpp,h}: make slotTunnelOk parameter optional and use the
+      non-parameter call for the QSingleShotTimer::timeout() signal.
+    - x2goutils.{h,cpp}: split up show_RichText_WarningMsgBox() into the
+      aforementioned function and a new convert_to_rich_text() helper function.
+    - non_modal_messagebox.{h,cpp}: add new Non_Modal_MessageBox::critical()
+      overloaded functions to be able to use informative text and a (forceful,
+      if requested) conversion to rich text.
+    - onmainwindow.cpp: prettify non-running sshd error message.
+    - onmainwindow.cpp: prettify non-available host key error message.
+    - onmainwindow.cpp: also use usermode sshd on OS X, if no global daemon is
+      running.
+    - onmainwindow.cpp: on OS X, specify sshd's PID file location in its
+      server config.
+    - onmainwindow.cpp: wait 3 seconds before checking sshd startup state to
+      allow it to come up.
+    - onmainwindow.cpp: adapt SSH host key warning message to new usermode
+      sshd possibilities.
+    - configdialog.cpp: make XQuartz detection algorithm QStringList-based and
+      add MacPorts location.
+    - onmainwindow.cpp: do not define Ctrl+Q two times. Made it unusable on
+      Linux and Windows. (Fixes: #830).
+    - onmainwindow:cpp: correctly pass escaped single quote when writing
+      remote xinerama config file. Post-fixup for #797.
+    - {onmainwindow.cpp,README.i18n}: fix localization -- resource strings
+      were not correctly updated. Fixes: #828.
+    - onmainwindow.cpp: quote commands for generating pulse-client.conf
+      correctly, add more quotes and use absolute file path for pulse cookie.
+    - version.h: add include guard.
+    - help.{cpp,h}: add skeleton for new help system.
+    - help.{cpp,h}: add sanitizing helpers.
+    - help.cpp: populate pretty_print: fetch max length of params.
+    - help.cpp: get terminal window sizes on UNIX-based and Windows operating
+      systems.
+    - help.cpp: complete pretty printer function.
+    - help.cpp: "copy" old command line parameters.
+    - help.cpp: document broker options. Fixes: #851.
+    - help.cpp: actually output the help message.
+    - help.{cpp,h}: also pass the help message on (for display in graphical
+      mode.)
+    - x2goclient.pro{,.maemo}: add new help.{cpp,h} files.
+    - onmainwindow.cpp: replace old help system with new one.
+    - {{onmainwindow,help}.cpp},help.h}: fix misc. build errors.
+    - help.h: fix run time error by actually giving QTextStream a "device" to
+      write to.
+    - help.cpp: clear current string if completely written onto one line.
+    - help.cpp: enable debugging for pretty_print(). --debug must be supplied
+      before --help for this to work.
+    - help.cpp: fix splitting algorithm to step over a space character, but
+      include hyphens correctly into the current line.
+    - help.cpp: don't let qCritical() add even more spaces or quotes around
+      the help message.
+    - help.cpp: add support for newlines within descriptions.
+    - help.cpp: use new newline feature for some options.
+    - help.cpp: trying to split at hyphens was a bad idea. Remove that part.
+    - help.cpp: fix a compile warning (by including winsock2.h) and error
+      (caused by a typo) on Windows.
+    - help.cpp: hardcode indentation value to 2 (for the first spaces) +
+      maximum length of parameters + 4 (for the trailing 4 spaces).
+      Calculations via terminal_cols and remaining do not work, if
+      terminal_cols is unknown.
+    - x2goutils.{cpp,h}: implement new git_changelog_extract_commit_sha
+      helper, extracting the most recent commit shasum from a git changelog
+      string.
+    - help.cpp: use new git_changelog_extract_commit_sha() helper while
+      building the help prelude.
+    - helpdialog.cpp: change to monospaced font.
+    - helpdialog.cpp: use QT_VERSION macro to select either a monospaced or
+      typewriter font (Qt < 4.7.0 only supports TypeWriter.)
+    - x2goutils.{cpp,h}: add new font_is_monospaced() helper.
+    - helpdialog.cpp: try harder to set a monospaced font.
+    - helpdialog.cpp: lower font size to have more space for text.
+    - ui/helpdialog.ui: almost double the window size.
+    - help.cpp: typo fix for --git-info.
+    - help.{cpp,h}: provide string splitting logic as separate
+      split_long_line() function. Use this in pretty_print().
+    - help.cpp: simplify pretty_print() and make it also split lines for
+      non-terminal output or when the terminal width is unknown.
+    - help.{cpp,h}: add a boolean terminal_output parameter to the
+      pretty_print() function family. Controls terminal width auto-detection
+      and automatic printing to stderr.
+    - onmainwindow.cpp: don't let a potential terminal affect the help string
+      shown in the GUI.
+    - help.h: lower default splitting length to 100 characters.
+    - onmainwindow.cpp: fix up pulse config file generation and
+      PULSE_CLIENTCONFIG setting once more.
+    - {macbuild,res/osxbundle/postbuild}.sh: add support for git information
+      if not building from a tag. Also includes build date.
+    - {{configdialog,onmainwindow}.cpp,x2goutils.{cpp,h}}: new helper
+      functions show_XQuartz_not_found_error(), show_XQuartz_start_error() and
+      show_XQuartz_generic_error(). The first two are calling the latter one.
+      Replace previous messages in configdialog.cpp and onmainwindow.cpp with
+      the helpers, because they are supposed to pop up a dialog showing almost
+      the same message.
+    - x2goutils.cpp: fix compile error. tr () is a member of QObject and must
+      be explicitly marked as such in a free function.
+    - {configdialog.{cpp,h},onmainwindow.cpp}: miscellaneous typo fixes - no
+      functional changes.
+    - onmainwindow.cpp: whitespace changes to installTranslator() only.
+    - onmainwindow.cpp: correctly let Qt fetch the UI display language for Qt
+      4.8.0 and higher. The old "compat" behavior is retained for older
+      versions of Qt, which do not have the semantics of a UI display
+      language. Fixes: #845.
+    - config_win.bat: enable release by default, fetch command line parameter
+      and compare against debug. Enable debug and console features in that
+      case.
+    - onmainwindow.{cpp,h}: follow-up to last translation fix. Actually handle
+      English locales correctly and don't duplicate code too much.
+    - onmainwindow.{cpp,h}: make new get_translator() function static. Correct
+      typo in implementation.
+    - onmainwindow.h: include used types/headers.
+    - onmainwindow.cpp: correctly call QLocale::uiLanguages ().
+    - onmainwindow.cpp: copy strings before manipulating them.
+    - onmainwindow.h: make get_translator() const. Does not change any state.
+    - onmainwindow.cpp: fix compile error triggered by a missing
+      parenthesis/typo.
+    - onmainwindow.cpp: workaround https://bugreports.qt.io/browse/QTBUG-25973.
+    - onmainwindow.h: revert const-qualifier for get_translator(). It's static
+      and can't have any cv-qualifier.
+    - copy-deps-win32.bat: actually let xcopy error correctly.
+    - general: improve debug output and error messages.
+      Affects:
+        + LDAPSession.cpp
+        + configdialog.cpp
+        + contest.cpp
+        + cupsprintersettingsdialog.cpp
+        + exportdialog.cpp
+        + folderexplorer.cpp
+        + httpbrokerclient.cpp
+        + onmainwindow.cpp
+        + onmainwindow.h
+        + printdialog.cpp
+        + printprocess.cpp
+        + printwidget.cpp
+        + sessionbutton.cpp
+        + sessionexplorer.cpp
+        + sessionmanagedialog.cpp
+        + sessionwidget.cpp
+        + settingswidget.cpp
+        + sharewidget.cpp
+        + sshmasterconnection.cpp
+        + sshprocess.cpp
+        + wapi.cpp
+    - sshmasterconnection.cpp: fix typo in last commit leading to a compile
+      failure, correct content, remove superfluous newlines.
+    - sessionexplorer.cpp: use a better shared logic for generating an
+      arguments list for calling x2goclient.exe from a desktop shortcut.
+      Respect the tray icon option also on Windows. Fixes: #871.
+
+  [ Fernando Pedemonte ]
+  * New upstream release (4.0.4.0):
+    - onmainwindow.cpp: fix bad quoting when writing remote xinerama config file.
+      Fixes: #797.
+
+  [ René Genz ]
+  * New upstream release (4.0.4.0):
+    - {LICENSE,debian/copyright}: fix typo in URL of obviously-nice.de.
+      Fixes: #811.
+
+  [ Mike Gabriel ]
+  * New upstream release (4.0.4.0):
+    - onmainwindow.cpp: fix desktop sharing via session broker. Fixes: #584.
+
+  [ Jason Alavaliant ]
+  * New upstream release (4.0.4.0):
+    - onmainwindow.cpp: handle %i and %c format flags in desktop files
+      correctly: remove the %i flag and replace %c with the application name.
+      Fixes: #827.
+
+  [ Nicolas Husson ]
+  * New upstream release (4.0.4.0):
+    - src/{onmainwindow,sshmasterconnection}.cpp: enable use of SSH proxy
+      configuration with x2goplugin. Fixes: #798.
+      + v2: refactor patch, fix whitespace issues. (Mihai Moldovan)
+
+  [ Stefan Baur ]
+  * New upstream release (4.0.4.0):
+    - general: fix spelling and English language syntax issues. Fixes: #389.
+      + v2: apply more fixes in the original changes context. (Mihai Moldovan)
+
+ -- X2Go Release Manager <[email-masked]>  Tue, 26 May 2015 21:09:14 +0200
+
+x2goclient (4.0.3.2-0x2go1) unstable; urgency=medium
+
+  [ Oleksandr Shneyder ]
+  * New upstream release (4.0.3.2):
+    - Fix placement of session folders in session card column. (Fixes: #681).
+    - Send empty message in x2gohelper to stop AppStarting cursor. (Fixes: #616).
+    - Fix multiple creations of modmap timer (OS_DARWIN).
+
+  [ Mike Gabriel ]
+  * New upstream release (4.0.3.2):
+    - Add several info/error/debug log message while hunting down #702.
+    - Use app.setQuitOnLastWindowClosed(false) for the X2Go Client QtApplication
+      to assure that X2Go Client does not arbitrarily exit during a running
+      session. This fixes X2Go Client crashes that occur when printing via
+      the CUPS-X2Go printing mechanism with activate print dialog popup on
+      incoming print jobs and minimized main window. (Fixes: #702).
+    - Be more exact when reporting rev forwarding tunnel request failures to
+      the GUI user. Include the purpose of the tunnel (NX, audio, foldersharing)
+      in the error message.
+    - Enable debugging in sshprocess.cpp and sshmasterconnection.cpp if
+      --debug is given.
+    - sshmasterconnection.cpp: Fix several grammar issues in error messages.
+    - When sharing a client-side folder, do not write the SSH pub key to
+      client-side authorized_keys file if the folder-to-be-shared does not
+      exist on the client. (Partially solves #405).
+    - Fix string concatenation/layout of error message when tunnel I/O errors
+      occur.
+    - Improve debugging/logging the SSH connections made by X2Go Client.
+    - Fix quotes when calling remote commands via SSH (esp. allow same quoting/
+      escaping style for libssh and openSSH+Krb based connections). (Fixes: #720).
+    - FIXME: Disable PubkeyAuthentication _and_ PasswordAuthentication if
+      GSSAPI authentication is activated. This is counter intuitive, though,
+      and requires several other fixes in the authentication code.
+  * x2goclient.spec:
+    - Always set BuildRoot: parameter.
+
+  [ Sergey Savko ]
+  * New upstream release (4.0.3.2):
+    - Prevent passwordless re-logins into X2Go Session Broker if
+      --broker-autologoff is used on the cmdline. (Fixes: #782).
+    - Add new cmdline option --broker-noauth-use-session-username.
+      When --broker-noauth is used, the broker does not know on behalf
+      of which user to operate. This new option enables username syncing.
+      When logging into X2Go Server, that username will be sent to the
+      broker and be used for querying X2Go Broker Agents etc. (Fixes: #781).
+
+  [ Heinrich Schuchardt ]
+  * New upstream release (4.0.3.2):
+    - Base the layout dialogue "Session ID" (which shows up when starting a
+      connection) on typographic points (instead of pixels). (Fixes: #713).
+
+  [ Jason Alavaliant ]
+  * New upstream verson (4.0.3.2):
+    - Use QUrl::toPercentEncoding() method to properly encode passwords sent
+      to X2Go Session Broker. (Fixes: #705).
+
+  [ Mike DePaulo ]
+  * New upstream release (4.0.3.2):
+    - Windows: Win32 OpenSSL updates from 1.0.1j to 1.0.1L, which
+      fixes the CVEs announced on 2015-01-08.
+    - Windows: Cygwin OpenSSL updated from 1.0.1j-1 to 1.0.1k-1, which
+      fixes the CVEs announced on 2015-01-08.
+    - Windows: Bundle new version of VcXsrv: 1.15.2.2-xp+vc2013+x2go1.
+      The differences from 1.15.2.1-xp+vc2013+x2go1 are that its bundled
+      OpenSSL has been updated to 1.0.1k, and that xorg-server
+      CVE-2014-8091..8103 have been fixed.
+    - Windows: Update libssh from 0.6.3 to 0.6.4 (while maintaining
+      Pageant support). This fixes CVE-2014-8132, which shouldn't
+      affect x2goclient because x2goclient uses the SSH client
+      functionality, not the SSH server functionality.
+      0.6.4 also added 4 features related to ECDSA keys.
+    - Windows: Fix compatibility with PulseAudio 6.0
+    - Windows: Remove workaround for audio input with old versions of
+      PulseAudio (calling parec once per second)
+      (Fixes: #742)
+      Thanks George Trakatelis (uom.edu.gr) for submitting this change.
+    - Windows: Enable X2Go Client for Windows to build under VS2010 nmake
+      (but not the VS2010 IDE due to a Qt4 Visual Studio Add-in limitation)
+      Note that the official builds are still build under MinGW.
+      (Fixes: #642)
+      Thanks George Trakatelis (uom.edu.gr) for submitting this feature.
+    - Windows: Make builds easier, and updating bundled dependencies
+      easier, by adding copy-deps-win32.bat. It copies the exact
+      version of each dependency (DLL, executable, data, folder, etc)
+      from x2goclient-contrib.git.
+
+  [ Kaan Ozdincer ]
+  * New upstream version (4.0.3.2):
+    - Add Turkish translation file.
+
+ -- X2Go Release Manager <[email-masked]>  Thu, 19 Feb 2015 12:49:22 +0100
+
+x2goclient (4.0.3.1-0x2go1) unstable; urgency=medium
+
+  [ Mike Gabriel ]
+  * New upstream release (4.0.3.1):
+    - Fully rework x2goclient man page. Add many options that haven't been
+      documented so far.
+    - Make sound options configurable via X2Go Session Broker. (Fixes: #652).
+    - Fix (cross-user) desktop sharing since introduction of clipboard mode
+      feature.
+    - Update several translation files after splitting of session profile's
+      "Settings" tab into "Input/Output" and "Media". Translations for these
+      two new tabs derived from the i18n files of PyHoca-GUI.
+
+  [ Mark Pedersen-Cook ]
+  * New upstream release (4.0.3.1):
+    - Update Danish translation file.
+
+  [ Oleksandr Shneyder ]
+  * New upstream release (4.0.3.1):
+    - Split Sessions config widget into Input/output and Media widgets.
+      (Fixes: #643).
+
+ -- Mike Gabriel <[email-masked]>  Thu, 27 Nov 2014 11:00:17 +0100
+
+x2goclient (4.0.3.0-0x2go1) unstable; urgency=low
+
+  [ Mike Gabriel ]
+  * New upstream release (4.0.3.0):
+    - Disallow server-side users to override X2Go Server commands via
+      ~/bin (or similar). (Fixes: #336).
+    - Avoid unitialised variables on early calls of ONMainWindow::closeEvent()
+      or ONMainWindow::closeClient(). (Fixes: #253).
+    - Update translation files. Add empty Portuguese translation. Update
+      qt_<lang>.qm files from Debian unstable as of today.
+    - Update German translation file (after session folder feature got added).
+    - Makefile.man2html: Test if man2html exists. If not, don't fail.
+    - Honor exports (client-side shared folders) from broker session profiles.
+      Thanks to Ming Song for providing a patch for this (Fixes: 612).
+  * debian/control:
+    + Add B-D: apache2-dev. On squeeze / lucid builds, this is a superfluous
+      B-D, but for later Debian/Ubuntu versions, this smoothes the installation
+      of the x2goplugin-provide bin:package.
+    + Update B-D: apache2-dev | libc6-dev. The apache2-dev package does not
+      exist on all Debian/Ubuntu versions.
+  * x2goclient.spec:
+    + Adapt to building for openSUSE/SLES.
+    + openSUSE: Make Qt4 Linguist tools available for Makefile.
+    + Upgrade versioned BR for libssh-devel (0.6.3 or patched 0.5.5).
+    + The libqt4-linguist split off happened in openSUSE 13.1.
+    + Add x2goclient-rpmlintrc file.
+    + In openSUSE, it is openldap2-devel, in Fedora/RHEL it is openldap-devel.
+    + In openSUSE, openssh is openssh (not openssh-clients / openssh-server).
+
+  [ Oleksandr Shneyder ]
+  * New upstream release (4.0.3.0):
+    - Fix running x2goclient without arguments on Windows. (Fixes: #522).
+    - Save proxy output in $HOME/S-$SESSION-ID/session.log if debugging is
+      enabled.
+    - Fork x2goclient on windows and terminate child processes if X2Go Client
+      crashed. (Fixes: #159).
+    - Add "clipboard" parameter to session profile and to command line options.
+      (Fixes: #258).
+    - Replace qCritical() with printError() by argument parsing.
+    - Update translation files.
+    - Update russian translation.
+    - Update string "&Clipboard Mode" and translate in russian translation file.
+    - Grammar fix in russian translation.
+    - Add x2gohelper to start X2Go Client on Windows and clean child processes
+      if X2Go Client crashes. (Fixes: #525).
+    - On Windows rename x2goclient.exe to x2goclient-mainprocess.exe and
+      x2gohelper.exe to x2goclient.exe.
+    - Start x2gohelper from X2Go Client. Revert name changing of X2Go Client and
+      x2gohelper.
+    - Add Makefile for x2gohelper.
+    - Add support for sessions folders.
+    - Add folder explorer: a GUI to manage of session subfolders.
+    - Support for sessions subfolders in sessionmanagedialog.
+    - Session name autocompletion only for sessions in current folder.
+    - Support for session subfolders and command-line options "--session"
+      and "--sessionid".
+    - Disable session explorer "back" button if user sessions are disabled.
+    - Include <QDir> in sessionexplorer.cpp.
+    - Remove deprecated workaround in wapi.cpp.
+    - Save folder icons Base64 coded. Save icons under General\icon_<PATH>.
+      (Fixes: #580).
+    - Fix placing sessions folders in broker mode.
+    - Fix onmainwindow.cpp after 76ae96781f1d2d5754ee4751539d5de47f1d0297.
+    - Add support for session selection in broker mode.
+
+  [ Mike DePaulo ]
+  * New upstream release (4.0.3.0):
+    - Make X2Go Client aware of the Cinnamon (CINNAMON) desktop environment.
+      (Fixes: #571)
+    - Make X2Go Client aware of the Trinity (TRINITY) desktop environment.
+      (Fixes: #609)
+    - Make X2Go Client aware of the Openbox (OPENBOX) window manager.
+      (Fixes: #607)
+    - Make X2Go Client aware of the IceWM (ICEWM) window manager.
+      (Fixes: #608)
+    - Windows: Fix not being able to add the server to the known_hosts file when
+      the username has non-English characters. (Fixes: #566)
+      (NOTE: This fix only works when the non-English characters are in the same
+      language as the Windows "system locale" AKA "Language for non-Unicode
+      programs." Bug #611 was written for fixing the issue for languages other
+      than the system locale.)
+      Thanks George Trakatelis (uom.edu.gr) for submitting part of this fix.
+    - Windows: Install VcXsrv "misc" fonts by default, and make all 4 font
+      groups optional: misc, 75dpi, 100dpi and others (Fixes: #108)
+      Note: The fact that all the fonts are included makes the installer about
+      30MB larger.
+    - Windows: Bundle new version of VcXsrv: 1.15.2.1-xp+vc2013+x2go1
+      This new version is based on upstream VcXsrv 1.15.2.0, but still
+      compatible with Windows XP. It also has its bundled OpenSSL updated to
+      1.0.1j. It is compiled with Microsoft Visual C++ 2013 and contains 1
+      X2Go-specific change, winmultiwindow.patch. This patch fixes an issue
+      when resizing the NX-proxy window on specific multiple monitor setups.
+      (Thanks Oleksandr Shneyder for the patch) (Fixes: #568) (Fixes: #594)
+    - Windows: Port from MinGW 4.4 + Qt 4.8.5 to MinGW 4.8.2 + Qt 4.8.6,
+      including fix for QTBUG-38706 (Fixes: #474, #603)
+    - Windows: Fix missing VcXsrv/zlib1.dll . The impact of this bug was that
+      VcXsrv would not start if the cwd was changed from the x2goclient
+      directory. (The start menu and desktop shortcuts do have the x2goclient
+      directory as the cwd. So they were not affected.) (Fixes: #587)
+    - Windows: Make the desktop shortcut optional during install,
+      but still the default.
+    - Windows: Upgrade libssh from 0.5.5 to 0.6.3. This fixes connecting to
+      hpn-enabled SSH servers. The Pageant support patch from the KDE Windows
+      project was ported to 0.6.3 by myself and Mike Frederick.
+      (Gmail: psududemike) (Fixes: #590)
+    - Windows: Win32 OpenSSL updated from 1.0.1h to 1.0.1j, which fixes the
+      CVEs announced on 2014-08-06 & 2014-10-15.
+    - Windows: Replace Cygwin Bash (sh.exe) with Cygwin Dash (ash.exe renamed
+      to sh.exe). This also means fewer Cygwin .DLLs are bundled.
+      (Fixes: #636)
+    - Windows: cygwin packages (excluding OpenSSH, which is at the patched
+      version of 6.6.1p1-3-x2go1) updated from latest versions as of 2014-06-09
+      to latest versions as of 2014-10-18. This includes openssl 1.0.1j-1, which
+      fixes the CVEs announced on 2014-08-06 & 2014-10.15.
+      (Cygwin openssl was also individually updated in 4.0.2.1+hotfix1+build2,
+      but only to 1.0.1i-1.)
+    - Windows: Build nxproxy.exe with Cygwin's libpng 1.5.x rather than 1.2.x.
+      (This may improve performance when PNG compression is selected.)
+    - Windows: Build cygwin openssh without krb5 or tcp_wrappers support because
+      X2Go Client for Windows does not use either feature.
+      (On Windows, Kerberos 5 (GSSAPI) support is provided by PuTTY.)
+    - Windows: Fix text not being rendered properly at end of NSIS installer
+      (Fixes: #597)
+
+  [ Stefan Baur ]
+  * New upstream version (4.0.3.0):
+    - Update German translation file.
+
+  [ Ricardo Díaz Martín ]
+  * New upstream version (4.0.3.0):
+    - Update Spanish translation file.
+
+  [ Martti Pitkanen ]
+  * New upstream version (4.0.3.0):
+    - Update Finnish translation file.
+
+  [ Jos Wolfram ]
+  * New upstream version (4.0.3.0):
+    - Update Dutch translation file.
+
+  [ Robert Parts ]
+  * New upstream version (4.0.3.0):
+    - Add Estonian translation file.
+
+  [ Klaus Ade Johnstad ]
+  * New upstream version (4.0.3.0):
+    - Update Bokmal (Norway) translation file.
+
+  [ Daniel Lindgren ]
+  * New upstream version (4.0.3.0):
+    - Update Swedish translation file.
+
+  * Translation status:
+    OK - Updating 'x2goclient/x2goclient_de.qm'...
+      Generated 566 translation(s) (566 finished and 0 unfinished)
+    INCOMPLETE - Updating 'x2goclient/x2goclient_da.qm'...
+      Generated 536 translation(s) (526 finished and 10 unfinished)
+      Ignored 30 untranslated source text(s)
+    OK - Updating 'x2goclient/x2goclient_es.qm'...
+      Generated 566 translation(s) (566 finished and 0 unfinished)
+    OK - Updating 'x2goclient/x2goclient_et.qm'...
+      Generated 566 translation(s) (566 finished and 0 unfinished)
+    OK - Updating 'x2goclient/x2goclient_fi.qm'...
+      Generated 566 translation(s) (566 finished and 0 unfinished)
+    INCOMPLETE - Updating 'x2goclient/x2goclient_fr.qm'...
+      Generated 254 translation(s) (201 finished and 53 unfinished)
+      Ignored 312 untranslated source text(s)
+    OK - Updating 'x2goclient/x2goclient_nb_no.qm'...
+       Generated 566 translation(s) (566 finished and 0 unfinished)
+    OK - Updating 'x2goclient/x2goclient_nl.qm'...
+      Generated 566 translation(s) (566 finished and 0 unfinished)
+    UNTRANSLATED - Updating 'x2goclient/x2goclient_pt.qm'...
+      Generated 0 translation(s) (0 finished and 0 unfinished)
+      Ignored 566 untranslated source text(s)
+    INCOMPLETE - Updating 'x2goclient/x2goclient_ru.qm'...
+      Generated 552 translation(s) (543 finished and 9 unfinished)
+      Ignored 14 untranslated source text(s)
+    OK - Updating 'x2goclient/x2goclient_sv.qm'...
+      Generated 566 translation(s) (566 finished and 0 unfinished)
+    INCOMPLETE - Updating 'x2goclient/x2goclient_zh_tw.qm'...
+      Generated 397 translation(s) (372 finished and 25 unfinished)
+      Ignored 169 untranslated source text(s)
+
+ -- Mike Gabriel <[email-masked]>  Tue, 21 Oct 2014 12:38:56 +0200
+
+x2goclient (4.0.2.1-0x2go1) unstable; urgency=low
+
+  [ Mike Gabriel ]
+  * New upstream release (4.0.2.1):
+    - Fix FTBFS on arm64 (and others) architecture. (Fixes: #498).
+    - Only show session name in notification bubbles with debugging
+      enabled. (Fixes: #364).
+    - New command line option (--keep-trayicon). With that options set,
+      we force X2Go client to only use the default "accelerated X" as
+      system tray icon (and prohibit usage of the session's icon as
+      tray icon). (Fixes: #365).
+    - Provide more meaningful messages on SSH errors (host pub key not
+      found, export pub key not found, authorized_keys file not found).
+      For SSHd startup failures provide different messages on Windows
+      and non-Windows machines. (Fixes: #235).
+      FIXME: add detection code to report SSH daemon startup failures.
+    - Add new cmdline option --hide-foldersharing. If used, all GUI
+      elements related to exporting client-side folders to X2Go sessions
+      get hidden. (Fixes: #514).
+    - Update COPYING file (to update FSF address).
+  * debian/control:
+    + Add dbg:package x2goplugin-dbg.
+
+  [ Clemens Lang ]
+  * New upstream version (4.0.2.1):
+    - Re-add Info.plist file (which got removed by accident in commit 91cf6c6).
+      (Fixes: #502).
+
+  [ Oleksandr Shneyder ]
+  * New upstream release (4.0.2.1):
+    - Hide GSSAPI options on direct RDP connections. (Fixes: #478).
+    - Search X-Server in /Applications/Utilities/XQuartz.app on Mac.
+    - Wrong cmd line option throw error dialog if running not from terminal.
+    - Add command line option "close-disconnect", which make client close after
+      session is disconnected.
+    - Don't start pulse on Windows, until we really have to start a session
+      that requires pulse support.
+    - Check if sound is activated before starting pulse.
+    - Fix starting sshd on Win XP. (Fixes: #421).
+    - Fix "fullscreen" mode on Windows 7 with multiple monitors.
+
+  [ Mike DePaulo ]
+  * New upstream release (4.0.2.1):
+    - Windows: Reduce the size of NSIS installer by several MB
+      by switching to lzma solid compression
+    - Windows: Prevent high PulseAudio CPU usage on Windows XP by lowering
+      PulseAudio's CPU priority from "high" to "normal" on XP specifically.
+      Also do so on Windows Server 2003 (R2) (Fixes #526)
+    - Windows: Enable PulseAudio log when --debug is passed.
+    - Windows: Fix compatibility with current PulseAudio master branch
+    - Windows: cygwin packages (inluding patched OpenSSH 6.6.1p1-3) updated from
+      latest versions as of 2014-04-08 to latest versions as of 2014-06-09. This
+      includes openssl 1.0.1h-1, which fixes the 6 CVEs announced on 2014-06-05.
+      (Cygwin openssl was also individually updated to 1.0.1h-1 in
+      4.0.2.0+build4.) This also includes migrating from libjpeg to
+      libjpeg-turbo, which reduces CPU usage of nxproxy.)
+    - Windows: Download and compile nx-libs-lite from the release tarball,
+      rather than from git, so that the patches are actually applied
+    - Windows: nx-libs-lite updated from 3.5.0.22 to 3.5.0.27
+      (linked against aforementioned cygwin package versions)
+    - Windows: Win32 OpenSSL updated from 1.0.1g to 1.0.1h, which fixes the 6
+      CVEs announced on 2014-06-05.
+      (Win32 OpenSSL was also updated to 1.0.1h in 4.0.2.0+build3.)
+    - Windows: VcXsrv (XP Compatible) updated from 1.14.3.1 to 1.14.3.2.
+      Fixes CVE-2014-0209, CVE-2014-0210, and CVE-2014-0211
+      (VcXsrv was also updated to 1.14.3.2 in 4.0.2.0+build2.)
+    - Windows: Switch from regular NSIS 2.46 to Unicode NSIS 2.46.5
+      (Fixes: #528)
+
+ -- Mike Gabriel <[email-masked]>  Fri, 11 Jul 2014 12:23:59 +0200
+
+x2goclient (4.0.2.0-0x2go1) unstable; urgency=low
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (4.0.2.0):
+    - Revrite SSH Classes to support libssh fix.
+    - Add Class HelpDialog to show options in scroll area.
+    - Fix authentication on SSH Broker with key + passphrase.
+    - Set modmap timer timeout to 10 sec on Mac.
+    - Fix running xmodmap if X2Go Client not started from terminal.
+    - Setting keyboard modifiers with xmodmap.
+    - Fix multimonitor support on Linux.
+    - Display more version info. Parameters --version, --git, --changelog.
+    - Don't show GUI dialog for --version, --help, etc, if started
+      from terminal on linux and mac.
+    - If no user in session config, display system username in pass form.
+    - Check if txt/changelog and txt/git exist on config phase.
+      Rename option "--git" to "--git-info".
+    - Change x2goclient.nsi for nightly builds.
+
+  [ Josh Lukens ]
+  * New upstream version (4.0.2.0):
+    - Switch to QNetworkAccessManager. Appropriately set content type
+      header to "application/x-www-form-urlencoded" for HTTP post
+      requests. (Fixes: #440, #138).
+    - Fix copy+paste errors in QNetworkAccessManager code.
+    - Provide support for dynamic authentication IDs. This is
+      a requirement for using the broker client against brokers
+      that use some sort of OTP authentication mechanism.
+      (Fixes: #446).
+
+  [ Mike Gabriel ]
+  * New upstream version (4.0.2.0):
+    - Drop create_text.sh again, implement changelog copying
+      in distro build files. Implement Git history creation for
+      nightly builds in build scripts.
+    - Rename txt/git to txt/git-info (make it compliant with cmdline
+      options).
+    - Allow starting shadow sessions from the command line with
+      option --hidden being enabled. (Fixes: #349).
+  * debian/control:
+    + Build-depend on libssh-dev (>= 0.5.4-2).
+    + Bump Standards: to 3.9.5. No changes needed.
+  * debian/rules:
+    + Copy debian/changelog into txt/ subfolder during dh_auto_configure.
+    + Create txt/git-info files for ChangeLog.git if it exists.
+  * x2goclient.spec:
+    + Copy ChangeLog (or debian/changelog) into txt/ subfolder during
+      %setup.
+    + Copy ChangeLog.gitlog (if present) into txt/ subfolder during %setup.
+    + B-R (epel-7): man2html-core (same as for Fedora builds).
+
+  [ Mike DePaulo ]
+  * New upstream version (4.0.2.0):
+    - Decrease HelpDialog's tab width from 320 to 30
+      (the width of 10 spaces.) (Fixes: #453)
+    - Windows: Fix compatibility with PulseAudio 3.0 & later through
+      new cookie handling. (Fixes: #422)
+    - Windows: Upgrade included PulseAudio from 1.1 to 5.0.
+      The 5.0 build is patched for X2Go bug #363. and available here:
+        https://build.opensuse.org/project/show/home:mikedep333:branches:home:\
+        mkbosmans:mingw32:pulseaudio
+    - Windows: Reapply KDE on Windows's patch for Pageant support to
+      libssh 0.5.5. (Fixes: #448)
+
+ -- Mike Gabriel <[email-masked]>  Thu, 10 Apr 2014 13:47:56 +0200
+
+x2goclient (4.0.1.6-0x2go1) unstable; urgency=low
+
+  * x2goclient.spec:
+    + B-R (epel-7): man2html-core (same as for Fedora builds).
+      (Cherry-picked from already released version 4.0.2.0).
+
+ -- Mike Gabriel <[email-masked]>  Fri, 11 Jul 2014 12:25:47 +0200
+
+x2goclient (4.0.1.5-0x2go1) unstable; urgency=low
+
+  * Build fix release (4.0.1.5):
+    - Add x2goclient_nl.ts to x2goclient.pro, so that the
+      .qm file gets generated during build. (Fixes: #473).
+
+ -- Mike Gabriel <[email-masked]>  Thu, 10 Apr 2014 17:47:27 +0200
+
+x2goclient (4.0.1.4-0x2go1) unstable; urgency=low
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (4.0.1.4):
+    - Increase ssh_select timeout to 0.5 sec.
+    - Set mod map from client to server on Mac, hide keyboard settings on Mac.
+    - Fix mod map on Mac with kerberos.
+    - Fix focus on pass form.
+
+  [ Orion Poplawski ]
+  * New upstream version (4.0.1.4):
+    - Fix password connection with libssh 0.6.0. (Fixes: 420).
+    - Don't use ancient Debianism's for ssh options (ProtocolKeepAlives).
+      (Fixes: #434).
+
+  [ Martti Pitkanen ]
+  * New upstream version (4.0.1.4):
+    - Update Finnish translation file.
+
+  [ Robert Parts ]
+  * New upstream version (4.0.1.4):
+    - Add new translation of X2Go Client to Estonian.
+
+  [ Nicolai Hansen ]
+  * New upstream version (4.0.1.4):
+    - Update Danish translation file.
+
+  [ Jos ]
+  * New upstream version (4.0.1.4):
+    - Add new translation of X2Go Client to Dutch.
+
+ -- Mike Gabriel <[email-masked]>  Thu, 10 Apr 2014 13:46:33 +0200
+
+x2goclient (4.0.1.3-0x2go1) unstable; urgency=low
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (4.0.1.3):
+    - changed keyboard settings. Supported modes: auto, none and config with
+      model/layout(variant)
+    - Enables forwarding (delegation) of GSSAPI credentials to the server.
+    - Make GSSAPI delegation configurable.
+    - Update Russian translation file.
+    - Rewrite SSH Classes to support libssh fix.
+    - Set mod map from client to server on Mac, hide keyboard settings on Mac.
+    - Fix mod map on Mac with kerberos.
+    - Fix focus on pass form.
+
+  [ Orion Poplawski ]
+  * New upstream version (4.0.1.3):
+    - Protect x2goplugin.html. Make it only available from the local host.
+
+  [ Mike Gabriel ]
+  * New upstream version (4.0.1.3):
+    - Fix scan for pulseaudio cookie file. Issue got introduced in X2Go Client
+      4.0.1.2 and let pulseaudio sound setup fail completely in the Linux
+      X2Go Client of that version. (Fixes: #384).
+    - Minor update of the German translation file.
+
+  [ Klaus Ade Johnstad ]
+  * New upstream version (4.0.1.3):
+    - Update Bokmal translation file.
+
+  [ Ricardo Díaz Martín ]
+  * New upstream version (4.0.1.3):
+    - Update Spanish translation file.
+
+  [ Daniel Lindgren ]
+  * New upstream version (4.0.1.3):
+    - Update Swedish translation file.
+
+  [ Stefan Baur ]
+  * New upstream version (4.0.1.3):
+    - Update German translation file.
+
+  [ Martti Pitkanen ]
+  * New upstream version (4.0.1.3):
+    - New translation of X2Go Client to Finnish.
+
+ -- Mike Gabriel <[email-masked]>  Wed, 22 Jan 2014 08:56:30 +0100
+
+x2goclient (4.0.1.2-0x2go2) unstable; urgency=low
+
+  [ Mike Gabriel ]
+  * New upstream version (4.0.1.2):
+    - Provide Keywords: key in .desktop file.
+    - Add NSIS packaging files for win32 builds to source tree.
+      (Files provided by Oleksandr Shneyder, thanks!!!).
+    - Rename win32 desktop and startmenu icon from "X2goClient" to "X2Go
+      Client".
+    - Store broker HTTPS certificate exceptions in
+      $HOME/.x2go/ssl/exceptions (before: $HOME/ssl/exceptions).
+      (Fixes: #328).
+    - Perform sanity checks on data that comes in from X2Go Servers.
+      Prohibit the execution of arbitrary code via the ~/.bashrc file.
+      (Fixes: #333).
+    - Add option --broker-cacertfile. Allow usage of non-system-wide
+      installed (self-signed) SSL certificate chains for https (SSL)
+      session broker connections. (Fixes: #311).
+    - Update man page for new --tray-icon cmdline option.
+    - Update man page for --broker-url. Explain the syntax of <URL>.
+    - Properly handle (=expand) the "~" character in key filenames. (Brought to
+      attention by Eldamir on IRC. Thanks!).
+    - Expand tilde operator for all other file paths handed over to X2Go Client
+      via sessions file or cmdline parameter.
+    - Syntax fix of x2goclient.desktop file.
+    - Test for various file locations of the pulseaudio cookie file.
+    - Allow patching of qmake-qt4 executable path in Makefile.
+    - Make qmake-qt4 and lrelease path in Makefile easily replacable (as
+      RHEL-5 does not have those tools in $PATH).
+    - Make sure that build_client and build_plugin are not build with parallel
+      make.
+    - Make x2goplugin-provider installable via Makefile.
+  * Pull-in packaging changes from Debian.
+  * debian/source/format:
+    + Switch to format 1.0.
+  * x2goclient.spec:
+    + Ship x2goclient.spec (RPM package definitions) in upstream project.
+      (Thanks to the Fedora package maintainers).
+    + Clear (Fedora package) changelog.
+    + Make package build on Fedora/EPEL versions that do not have the
+      qtbrowserplugin package.
+    + For EPEL-5 builds: replace full path to qmake-qt4 and lrelease.
+    + Split up package into bin:packages: x2goclient, x2goplugin,
+      x2goplugin-provider.
+    + Make sure lrelease-qt4 is executed (not just lrelease).
+
+  [ Ricardo Díaz Martín ]
+  * New upstream versino (4.0.1.2):
+    - Strip whitespaces off of user name, host name and other
+      strings when loading / saving session profiles.(Fixes: #315).
+    - New option --tray-icon. Force showing the tray icon, even for
+      hidden sessions. Also allow creation of .desktop files with
+      --tray-icon optionally being enabled. (Fixes: #316).
+    - Update Spanish translation.
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (4.0.1.2):
+    - Support for keys "shadowuser" "shadowdisplay" and "shadowmode" in
+      config file. This allows choosing the default display for shadow
+      sessions.
+    - Support for GSSApi(Kerberos 5) authentication. Using ssh/scp commands
+      on Linux and Mac and plink/pscp on Windows.
+    - Support for ChallengeResponseAuthentication (Google Authenticator)
+    - Setting main window focus on mac (Fixes: #139).
+    - Additional check if authentication with GSSApi successfull
+    - c121b7e2d3d83abdc2d7a29637bc3294e38b2ec3 broke checking if remote
+      command produce only stderr and not stdout. It made x2goclient crash
+      if x2gostartagent send LIMIT error. Current commit fixes this issue.
+    - SshMasterConnection should use current user name if no user name is
+      specified in session settings
+    - GSSApi(Kerberos 5) authentication for sshproxy and sshbroker
+    - fixed GSSApi(Kerberos 5) authentication for sshproxy and sshbroker
+      on windows
+
+  [ Heinrich Schuchardt ]
+  * New upstream version (4.0.1.2):
+    - Handle SSH host key changes more elegantly and allow user interaction
+      if such a host key change occurs. (Fixes: #241).
+
+  [ Michael DePaulo ]
+  * New upstream version (4.0.1.2):
+    - win32: Add uninstall information to Add/Remove Programs. (Fixes: #230).
+
+ -- Mike Gabriel <[email-masked]>  Tue, 17 Dec 2013 15:21:38 +0100
+
+x2goclient (4.0.1.1-0~x2go1) unstable; urgency=low
+
+  [ Nicolai Hansen ]
+  * New upstream version (4.0.1.1):
+    - Update Danish translation file.
+
+  [ Terje Andersen ]
+  * New upstream version (4.0.1.1):
+    - Update Norwegian Bokmaal translation file.
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (4.0.1.1):
+    - Use "127.0.0.1" instead of localhost to avoid wrong IPv6 hostname
+      resolution. (Fixes: #151).
+    - Wait for x2gocmdexitmessage to return before closing in hidden mode.
+    - Support for published applications in X2Go Plugin
+    - Support for "shadow" mode in X2Go Plugin
+
+  [ Mike Gabriel ]
+  * New upstream version (4.0.1.1):
+    - If a priv SSH key has been specified, skip the autologin procedure.
+      Let's consider a given SSH private key that fails to log the user
+      in as an overall login failure. (Fixes: #141).
+    - Avoid multiple selectUserSession requests when in broker
+      mode.
+    - Properly set the remote server address received via selectUserSession
+      method when in broker mode. (Fixes: #226).
+    - Fix segmentation fault that started occurring since the custom trayIcon
+      patch was applied. Segfault only occurred if the tray icon was not used.
+    - Show session name in notification bubbles.
+    - Update German translation.
+    - Add cmdline option --broker-autologoff: Enforce re-authentication against
+      X2Go Session Broker after a session has been suspended or terminated.
+      (Fixes: #179).
+    - Enable full access desktop sharing across user accounts. (Fixes: #222).
+    - Make X2Go Client aware of the MATE desktop environment.
+    - Make X2Go Client work in SSH broker mode without the need of a auth-id
+      file.
+
+  [ Heinrich Schuchardt ]
+  * New upstream version (4.0.1.1):
+    - Call ssh_clean_pubkey_hash() for deallocating public key hashes instead of
+      just calling free(). Required under MS Windows as documented in libssh2
+      API. (Fixes: #243). (For further details see:
+      http://api.libssh.org/master/group__libssh__session.html).
+  * Provide bin:package with debug symbols for X2Go Client. (Fixes: #255).
+
+  [ Ezra Bühler ]
+  * New upstream version (4.0.1.1):
+    - Fix auto-resume when session type is »Single Application«. (Fixes: #183).
+
+  [ Ricardo Díaz Martín ]
+  * New upstream version (4.0.1.1):
+    - Fix detection of maximum screen area available for a session. (Fixes:
+      #165).
+    - Use the session icon as tray icon, pop up notification bubble that informs
+      about current session actions. (Fixes: #177).
+    - Allow for setting maximum available desktop size as window size via the
+      session profile card. Unfortunately, this feature is for now only
+      available on Linux. (Fixes: #214).
+
+  [ Otto Kjell ]
+  * New upstream version (4.0.1.1):
+    - Enable debug mode through cmd line parameter. (Fixes: #142).
+    - Standardize output to stdout+stderr and make it parseable.
+
+  [ Orion Poplawski ]
+  * New upstream version (4.0.1.1):
+    - Instead of using a hard-code DPI of 96, use local DPI settings for new
+      sessions if not explicitly set in session profile (Fixes: #164).
+
+  [ Daniel Lindgren ]
+  * New upstream version (4.0.1.1):
+    - Update Swedish translation file.
+
+  [ Ricardo Díaz Martín ]
+  * New upstream version (4.0.1.1):
+    - Update Spanish translation file.
+
+ -- Mike Gabriel <[email-masked]>  Wed, 11 Sep 2013 12:06:02 +0200
+
+x2goclient (4.0.1.0-0~x2go1) unstable; urgency=low
+
+  [ Frédéric Motte ]
+  * New upstream version (4.0.1.0):
+    - Add French translation file.
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (4.0.1.0):
+    - Launching parec to init pulseaudio input only on Windows.
+    - Hide profilecard area on broker authentication.
+    - Fix ONMainWindow layout in broker mode.
+    - Set passphrase for key to reverse SSH connection.
+      Fix closing client after getting passphrase (Fixes: #137)
+    - Support for recent cygwin API on Windows.
+    - Add checkbox for -noclipboardprimary argument for internal vcxsrv.
+
+  [ Mike Gabriel ]
+  * New upstream version (4.0.1.0):
+    - Fix position shifts of broker login widget on repetetive authentication
+      failures. (Fixes: #71).
+
+ -- Mike Gabriel <[email-masked]>  Fri, 22 Mar 2013 23:15:45 +0100
+
+x2goclient (4.0.0.4-0~x2go1) unstable; urgency=low
+
+  [ Clemens Lang ]
+  * New upstream version (4.0.0.4):
+    - Add scripts and additional files for building X2Go Client
+      disk images for Mac OS X. (Fixes: #131).
+
+  [ Mike Gabriel ]
+  * New upstream version (4.0.0.4):
+    - Update man page: Add broker relevant cmdline options.
+
+ -- Mike Gabriel <[email-masked]>  Mon, 04 Mar 2013 05:46:16 +0100
+
+x2goclient (4.0.0.3-0~x2go1) unstable; urgency=low
+
+   * Fix version in version.h, VERSION and x2goplugin.rc.
+
+ -- Mike Gabriel <[email-masked]>  Wed, 13 Feb 2013 14:37:24 +0100
+
+x2goclient (4.0.0.2-0~x2go1) unstable; urgency=low
+
+  [ Mike Gabriel ]
+  * New upstream version (4.0.0.2):
+    - More icon updates needed. Discovered during Debian package update.
+
+  [ Orion Poplawski ]
+  * New upstream version (4.0.0.2):
+    - Fix .desktop file, fix FSF address. (Fixes: #88).
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (4.0.0.2):
+    - Fix support for RSA Keys in X2Go Broker code.
+    - Set autologin as false by default. Quote session ID in SSH broker code
+    - Support for session key "usebrokerpassforproxy" - use broker pass for
+      authentication on proxy.
+    - Fix X2Go Logo.
+    - Terminate nxproxy from X2Go Client if connection to server is lost.
+      (Fixes: #100)
+    - Fix building x2goplugin.
+
+ -- Mike Gabriel <[email-masked]>  Tue, 12 Feb 2013 19:29:53 +0100
+
+x2goclient (4.0.0.1-0~x2go1) unstable; urgency=low
+
+  * Bugfix release (4.0.0.1):
+    - Replace symlink at svg/x2gologo.svg with copied file. Fixes
+      tarball release esp. for MS Windows builds.
+
+ -- Mike Gabriel <[email-masked]>  Wed, 02 Jan 2013 12:19:01 +0100
+
+x2goclient (4.0.0.0-0~x2go1) unstable; urgency=low
+
+  [ Christoffer Krakou ]
+  * New upstream version (4.0.0.0):
+    - Update Danish translation.
+    - Update Danish translation (SSH proxy feature).
+
+  [ Daniel Lindgren ]
+  * New upstream version (4.0.0.0):
+    - Update Swedish translation.
+
+  [ Ezra Bühler ]
+  * New upstream version (4.0.0.0):
+    - Make it possible to resume a session using the keyboard only.
+      Also fix the tab order in the resume session dialog by
+      changing the focus policy of the main window. (Fixes: #80).
+
+  [ Heinz-M. Graesing ]
+  * New upstream version (4.0.0.0):
+    - Update refurbished X2Go Logo set. License for the X2Go Logos is GPL-2.0+.
+      The inner X2Go logo background is now white (non-transparent) which should
+      fix poor display results for X2Go icons in application menus using a dark
+      theme. (Fixes: #59).
+
+  [ Jan Engelhardt ]
+  * New upstream version (4.0.0.0):
+    - Fix Debian-like Qt path (qmake will handle it internally).
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (4.0.0.0):
+    - Translation files updated.
+    - Russian translation updated.
+    - Add support for pgp cards in broker mode.
+    - Fix displaying ssh proxy box in session settings if sessions type
+      changed. (Fixes: #61).
+    - Init config.brokerAutologin with false. (Fixes: #72).
+    - Make sure x2goclient closes if broker has no sessions. Fixes
+      appearing session profile dialog if client is configured to
+      minimize to systray. (Fixes: #73).
+    - Update license headers.
+    - Add "author" entry in UI files.
+    - Add OpenSSL license exception.
+
+  [ Ricardo Diaz ]
+  * New upstream version (4.0.0.0):
+    - Update Spanish translation file.
+
+  [ Mike Gabriel ]
+  * New upstream version (4.0.0.0):
+    - Update German translation file.
+    - Get rid of br html tags in client<->broker communication (Fixes: #81).
+    - Bump version to 4.0.0.0 (for Baikal bundle release).
+
+  [ Terje Andersen ]
+  * New upstream version (4.0.0.0):
+    - Update Bokmal (Norway) translation file.
+
+ -- Mike Gabriel <[email-masked]>  Sun, 30 Dec 2012 15:34:02 +0100
+
+x2goclient (3.99.3.0-0~x2go1) unstable; urgency=low
+
+  [ Mike Gabriel ]
+  * New upstream version (3.99.3.0):
+    - Rebuild i18n files, add x2goclient_dk.ts for the new
+      Danish translator (Christoffer Krakou).
+    - Update German translation.
+    - Run X2Go-proxied RDP session with fullscreen mode as sessions
+      of X2Go session type "D". (Fixes: #22)
+    - Allow pass-through of username and password for X2Go-proxied RDP
+      sessions. The strings X2GO_USER and X2GO_PASSWORD in rdpoptions
+      will be replaced by username+password enter into X2Go Clients
+      login dialog. Only replace username+password if they received a
+      value from the login widget of the main window.
+    - Drop i18n idea to translate English to English.
+    - Fix creation of session profile icon on desktop. The .desktop
+      files need the x-bit set. Also: add a compatibility profile name
+      rewrite for PyHoca-GUI profile names containing a slash, PyHoca-GUI
+      uses a slash as separator character for submenu cascades.
+    - Use ,,printf'' instead of ,,echo -e'' (Bashism). Fixes creation of
+      xinerama.conf files.
+    - Add XFCE as possible session type. (Fixes: #51)
+  * /debian/control:
+    + Maintainer change in package: X2Go Developers <[email-masked]>.
+    + Add rdesktop and xfreerdp to Recommends.
+    + Priority: optional.
+    + Bin:package x2goplugin-provider: depend on x2goplugin.
+  * New bin:package (all): x2goplugin-provider. Provide basic Apache2
+    configuration for a demo x2goplugin website.
+  * Bump Standards version to 3.9.3.
+
+  [ Daniel Lindgren ]
+  * New upstream version (3.99.3.0):
+    - Update Swedish translation.
+
+  [ Terje Andersen ]
+  * New upstream version (3.99.3.0):
+    - Update Norwegian Bokmal translation.
+
+  [ Christoffer Krakou ]
+  * New upstream version (3.99.3.0):
+    - Add Danish translation to x2goclient.
+    - Proof read Danish translation.
+    - Update DirectRDP in Danish translation.
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (3.99.3.0):
+    - Add settings for direct RDP connection.
+    - Implement direct RDP connection using standalone client.
+    - Build direct RDP feature only for linux.
+    - Add DEFINES += __linux__ to project file when building linux binaries
+      (need to define Q_OS_LINUX in moc generator).
+    - Update "ts" files.
+    - Fixed label "SSH port" and "RDP port" to "SSH port:" and "RDP port:".
+      Update "ts" files once again.
+    - Add translation for label "RDP port:". Update "ts" files updated
+      Russian translation.
+    - Add translation for checkbox "Direct RDP Connection" and update Russian
+      and German translation.
+    - Restart pulse server on windows if it crashed.
+    - Show "Advanced Options" button only if RDP session chosen.
+    - Fixing kbd focus issue for all kinds of sessions in thinclient mode.
+      (Fixes: #20).
+    - Add command line parameter --ssh-key and --autologin.
+    - Disable check box "use default sound port" if sound disabled.
+    - Add support for HTTP proxy - developed by Heinrich Schuchardt
+      ([email-masked]). (Fixes: #34).
+    - Add support for SSH proxy in class SshMasterConnection.
+    - SshMasterConnection emit signal to GUI thread if it need a passphrase
+      to decrypt a ssh key. GUI thread use input dialog to read a passphrase
+      from user.
+    - Add support for SSH proxy (HTTP and SSH) to X2Go Client GUI.
+    - Clean some broker code.
+    - It is possible to add several ssh keys from commandline in form:
+      --ssh-key=[user@][server:][port:]<path to key>
+      it can be useful for TCE or login over broker.
+    - Improve broker code, add support for "usebrokerpass" config variable to
+      use broker pass for ssh auth on X2Go server.
+    - Commandline options --broker-noauth.
+    - Support for SSH broker. --broker-user removed, use username in broker url
+      instead.
+    - Reduce listen interval for ssh-tunnel to 100 msec.
+    - Fix visibility of SSH-proxy box with direct RDP sessions.
+    - SshProcess is only usable over SshMasterConnection.
+    - Fixing SSH proxy support for Windows.
+    - Hide system tray icon before close.
+    - Fix error "Failed to resolve hostname" in plugin mode (Fixes: #55).
+    - Do not show "RDP Settings" group box in plugin mode (Fixes: #56).
+
+  [ Ricardo Diaz ]
+  * New upstream version (3.99.3.0):
+    - Add Spanish translation file.
+    - Update Spanish translation file.
+
+ -- Mike Gabriel <[email-masked]>  Wed, 07 Nov 2012 16:07:43 +0100
+
+x2goclient (3.99.2.2-0~x2go2) unstable; urgency=low
+
+  * Add Conflicts/Replaces for x2goclient-gtk.
+
+ -- Mike Gabriel <[email-masked]>  Mon, 20 Aug 2012 09:58:47 +0200
+
+x2goclient (3.99.2.2-0~x2go1) unstable; urgency=low
+
+  [ Mike Gabriel ]
+  * New upstream version (3.99.2.2):
+    - Drop Encoding key from .desktop file (as it is deprecated
+      according to latest FreeDesktop.org specs).
+    - Correct spelling for mis-spelled work ,,authentication''.
+    - Allow QMAKE_* parameters that are needed for hardening x2goclient
+      (see http://wiki.debian.org/Hardening).
+    - Provide CPPFLAGS for QMAKE_CFLAGS _and_ QMAKE_CXXFLAGS. Provide them as
+      first build parameters.
+    - Allow x2goclient to connect to user accounts that have other shells than
+      /bin/sh and alike configured as default shell. Also: removal bashisms in
+      shell execution commands.
+    - X2Go resume session slot: double click on a selected session is supposed
+      to resume that session. To make this feature functional for running
+      sessions the session has to be suspended first.
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (3.99.2.2):
+    - Fixing X2Go Plugin
+    - Cleaning code: double click on running session. Instead of using function
+      "sleep" starting resume-session after suspend-session is returned.
+
+ -- Mike Gabriel <[email-masked]>  Fri, 10 Aug 2012 10:08:52 +0200
+
+x2goclient (3.99.2.1-0~x2go1) unstable; urgency=low
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (3.99.2.1):
+    - Not starting smart card daemon before users are loaded in LDAP mode.
+    - Merging onmainwindow_part*.cpp into onmainwindow.cpp
+    - Support recent pulseuadio on windows
+    - removing %USERPROFILE%\.x2go\pulse\.pulse\%COMPUTERNAME%-runtime\pid
+      if exists under windows
+    - --user=<username> set username in session mode if this field is blank
+      in session settings.
+    - --autostart=<app> launch "app" by session start in "published
+      applications" mode
+
+  [ Daniel Lindgren ]
+  * New upstream version (3.99.2.1):
+    - Swedish i18n update for published applications.
+
+  [ Terje Andersen ]
+  * New upstream version (3.99.2.1):
+    - Norwegian (Bokmal) i18n update for published applications.
+
+  [ Stefan Baur ]
+  * New upstream version (3.99.2.1):
+    - German i18n update for published applications.
+
+  [ Mike Gabriel ]
+  * New upstream version (3.99.2.1):
+    - Add Ubuntu-2d (Unity) support to X2Go Client.
+
+ -- Mike Gabriel <[email-masked]>  Fri, 08 Jun 2012 12:52:07 +0200
+
+x2goclient (3.99.2.0-0~x2go1) unstable; urgency=low
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (3.99.2.0):
+    - Support for "published applications".
+      Sponsored by Stefan Baur (http://www.baur-itcs.de).
+    - Command line argument "--session-conf=<file>": path to alternative
+      session config.
+    - Fixed bug "light font colour on light background" by dark colour schema.
+    - Make X2Go system tray icon not transparent.
+    - Replace text on buttons "Application", "Share folder", "Suspend",
+      "Terminate" with icons to fit in dialog window.
+    - Support for SVG icons for published applications
+    - Set "nofocus" policy for tool buttons.
+    - Some improvements when using pgp card.
+    - Setting TCP_NODELAY for sockets on reverse tunnel and ssh session.
+    - Support for category X2Go-Top to display published applications on top
+      of application menu.
+    - Exporting PULSE_CLIENTCONFIG when running published applications.
+
+ -- Mike Gabriel <[email-masked]>  Wed, 04 Apr 2012 11:52:07 +0200
+
+x2goclient (3.99.1.1-0~x2go1) unstable; urgency=low
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (3.99.1.1):
+    - not including <netinet/in.h> on Q_OS_WIN platform.
+    - not updating Xinerama configuration in "fullscreen" mode.
+    - command line argument "--xinerama": use Xinerama by default.
+    - improved support for use in TCE
+      command line argument --thinclient - running without window manager
+      command line argument --haltbt - button to shutdown the thin client
+    - Fix comments in copyright headers.
+
+  [ Mike Gabriel ]
+  * New upstream version (3.99.1.1):
+    - Update copyright year in about window. Including all translations.
+    - Power button icon: make inner part transparent. Needed for people
+      with a dark GUI theme.
+    - Prettify x2goclient.pro.
+
+  [ Mihai Moldovan ]
+  * New upstream version (3.99.1.1):
+    - Use the Mac OS X 10.5 SDK instead 10.6 to remain compatible with
+      Leopard.
+    - Add .gitignore file.
+    - The default of a 10 seconds SSH connection timeout is pretty low,
+      especially when using tcp_wrappers with the identd option turned on.
+      Wait for a 60 seconds timeout.
+    - On Mac OS X connect to Xserver via Unix file socket.
+    - Properly set DISPLAY environment variable on Mac OS X.
+
+  [ Daniel Lindgren ]
+  * New upstream version (3.99.1.1):
+    - Update/improve Swedish translation after testing x2goclient on Windows.
+
+ -- Mike Gabriel <[email-masked]>  Wed, 07 Mar 2012 20:42:36 +0100
+
+x2goclient (3.99.1.0-0~x2go1) unstable; urgency=low
+
+  [ Mike Gabriel ]
+  * New upstream version (3.99.1.0):
+    - Update German translation file (thanks to Stefan Baur).
+    - Build .qm translation files on the fly during build.
+    - Fix for zh_TW translation: add qt_zh_TW.qm file from Qt4.8.
+    - Add language property to the French translation file.
+    - Update qt_<LANG>.qm files from Qt4.8 (as in current Debian sid).
+    - Rename x2goclient_nb.ts to x2goclient_nb_no.ts.
+    - Update all translation files (lupdate), translate unfinished translation
+      tags in x2goclient_de.ts.
+    - Provide empty translation file x2goclient_en.ts.
+    - Fix misspelled word ,,Authentification'' -> ,,Authentication''.
+    - Fix misspelled word ,,recieved'' -> ,,received''.
+    - Update date and release version in man page.
+
+  [ Mihai Moldovan ]
+  * New upstream version (3.99.1.0):
+    - Mac OS patch: Raise the stack space to 2MB for secondary threads. It
+      previously used the 512KB system default.
+
+  [ Daniel Lindgren ]
+  * New upstream version (3.99.1.0):
+    - Add Swedish translation file.
+    - Fine-tune Swedish translation file.
+
+  [ Terje Andersen ]
+  * New upstream version (3.99.1.0):
+    - Add Norwegian (Bokmal) translation. Qt4 lacks Norwegian/Bokmal
+      support, so some of the widgets may stay in English.
+    - Fine-tune/fix Norwegian (Bokmal) translation.
+
+  [ Jan Engelhardt ]
+  * New upstream version (3.99.1.0):
+    - Use /cgi-bin/man/ path in web'ified man pages.
+    - Use ,,${MAKE}'' instead of ,,make'' in Makefile.
+    - Include <netinet/in.h> in sshprocess.h to fix missing
+      struct sockaddr_in.
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (3.99.1.0):
+    - Get new ports from x2goresume-session if reserved ports are busy
+    - Fix segmentation fault by failed SSH connection to X2Go server
+
+ -- Mike Gabriel <[email-masked]>  Wed, 22 Feb 2012 14:49:49 +0100
+
+x2goclient (3.99.0.6-0~x2go1) unstable; urgency=low
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (3.99.0.6):
+    - Update copyright section in ssmasterconnection.h/cpp and
+      sshprocess.h/cpp.
+    - Traditional Chinese(zh_TW) translation for x2goclient from
+      Liu Arlo <[email-masked]>.
+
+ -- Mike Gabriel <[email-masked]>  Wed, 01 Feb 2012 13:52:40 +0100
+
+x2goclient (3.99.0.5-0~x2go1) unstable; urgency=low
+
+  [ Mike Gabriel ]
+  * New upstream version (3.99.0.5):
+    - Rename in human readable text strings ,,X2go'' to ,,X2Go''.
+    - Fix version string on man page.
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (3.99.0.5):
+    - Waiting for SshMasterConnection thread to be finished before
+      deleting it (segfault by wrong authentication fix).
+
+ -- Mike Gabriel <[email-masked]>  Fri, 27 Jan 2012 12:43:04 +0100
+
+x2goclient (3.99.0.4-0~x2go1) unstable; urgency=low
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (3.99.0.4):
+    - Enabled support for Xinerama
+
+ -- Mike Gabriel <[email-masked]>  Wed, 18 Jan 2012 14:53:20 +0100
+
+x2goclient (3.99.0.3-0~x2go4) unstable; urgency=low
+
+  [ Mike Gabriel ]
+  * Rename icon title in /debian/menu file.
+  * Also split package dependencies for x2goplugin.
+  * Add libxpm-dev as build-dependency.
+  * Revert version number in version.h and x2goplugin.rc to 3.99.0.3.
+
+  [ Guido Günther ]
+  * Split package dependencies for SSH server/client.
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (3.99.0.3):
+    - LDAP: ssh port for every x2goserver can be specified in Server entry,
+      parameter "l"
+    - Change title of proxy window to session name
+    - Change icon of proxy window (only on Linux)
+    - Multi-display support: x2goclient can be configured to fit proxy window
+      on one of the existing displays.
+    - Multi-display support: support for xinerama (temporarily disabled--support
+      in x2goagent needed)
+    - Add -lXpm in project file.
+
+ -- Mike Gabriel <[email-masked]>  Wed, 18 Jan 2012 14:50:31 +0100
+
+x2goclient (3.99.0.2-0~x2go1) unstable; urgency=low
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (3.99.0.2):
+    - QTcpSocket working not correct with some Antiviral software ( for example Avast) under windows. Fixing this by replacing it with Winsocks
+    - Connectivity test dialog to use with a broker
+
+ -- Mike Gabriel <[email-masked]>  Fri, 25 Nov 2011 11:27:42 +0100
+
+x2goclient (3.99.0.1-0~x2go1) unstable; urgency=low
+
+  * New upstream version (3.99.0.1):
+    - Set TCP_NODELAY (equals: turn Nagle off) for SSH graphical port forwarding
+      tunnel.
+    - Include cups/ppd.h in cupsprint.h, fixes build on Debian wheezy/sid.
+    - Add build_man/clean_man stanzas to Makefile.
+  * Explicitly use source format 3.0 (native).
+  * Build-depend on libssh-dev (>=0.4.7).
+  * Update menu file in /debian folder (rename title to ,,X2Go Client (Qt)'').
+  * Do not run man2html from rules file anymore.
+
+ -- Mike Gabriel <[email-masked]>  Wed, 12 Oct 2011 11:11:50 +0200
+
+x2goclient (3.99.0.0-0~x2go1) unstable; urgency=low
+
+  [ Oleksandr Shneyder ]
+  * fixed loadbalancing in LDAP mode on multiply X2Go servers
+  * fixed session crash by pulling out of smart card
+
+ -- Mike Gabriel <[email-masked]>  Wed, 20 Jul 2011 16:33:08 +0200
+
+x2goclient (3.0.1.21-0~x2go1) unstable; urgency=low
+
+  * changes in windows plugin
+
+ -- Oleksandr Shneyder <[email-masked]>  Thu, 30 Jun 2011 18:45:25 +0200
+
+x2goclient (3.0.1.20-0~x2go1) unstable; urgency=low
+
+  * support menu
+  * custom background
+  * custom icon on broker auth dialog
+  * fixed creation of desktop icons on windows
+
+ -- Oleksandr Shneyder <[email-masked]>  Fri, 08 Apr 2011 19:18:30 +0200
+
+x2goclient (3.0.1.19-0~x2go1) unstable; urgency=low
+
+  * Support to get sessions from for web broker
+
+ -- Oleksandr Shneyder <[email-masked]>  Thu, 29 Mar 2011 18:34:08 +0200
+
+x2goclient (3.0.1.18-0~x2go3) unstable; urgency=low
+
+  * Add ssh (server) as runtime dependency
+  * React to Debian bug #627990, prefer man2html-base over man2html.
+  * Use x2goumount-session instead of old x2goumount_session command.
+
+ -- Mike Gabriel <[email-masked]>  Thu, 14 Jul 2011 09:07:59 +0200
+
+x2goclient (3.0.1.18-0~x2go2) unstable; urgency=low
+
+  * adds man page skel (TODO: options)
+  * fixes all open lintian issues
+
+ -- Mike Gabriel <[email-masked]>  Tue, 17 May 2011 20:16:55 +0200
+
+x2goclient (3.0.1.18-0~x2go1) unstable; urgency=low
+
+  * change of version numbering pattern
+  * adds x2goclient-cli project as example file to x2goclient package
+
+ -- Mike Gabriel <[email-masked]>  Tue, 22 Mar 2011 01:50:27 +0100
+
+x2goclient (3.01-18) unstable; urgency=low
+
+  * Support for custom X-Servers under windows
+
+ -- Oleksandr Shneyder <[email-masked]>  Thu, 17 Feb 2011 18:15:03 +0100
+
+x2goclient (3.01-17) unstable; urgency=low
+
+  * Minimize X2Go Client to system tray thank Joachim Langenbach <[email-masked]> for patch
+
+ -- Oleksandr Shneyder <[email-masked]>  Thu, 27 Jan 2011 12:32:29 +0100
+
+x2goclient (3.01-16) unstable; urgency=low
+
+  * qtbrowserplugin sources shipped with x2goclient
+  * removed x2goclient.pri, export "X2GO_CLIENT_TARGET=plugin" to configure x2goplugin
+
+ -- Oleksandr Shneyder <[email-masked]>  Thu, 13 Jan 2011 19:24:50 +0100
+
+x2goclient (3.01-15) unstable; urgency=low
+
+  * add support for libssh-0.4.7
+
+ -- Oleksandr Shneyder <[email-masked]>  Tue, 04 Jan 2011 18:48:43 +0100
+
+x2goclient (3.01-14) unstable; urgency=low
+
+  * use libssh instead of ssh
+
+ -- Oleksandr Shneyder <[email-masked]>  Fri, 03 Dec 2010 18:31:45 +0000
+
+x2goclient (3.01-13) unstable; urgency=low
+
+  * workaround for "Full Screen" mode in windows
+  * x2goplugin based on qtbrowserplugin
+  * support for clipboard in windows
+
+ -- Oleksandr Shneyder <[email-masked]>  Tue, 03 Aug 2010 17:12:05 +0200
+
+x2goclient (3.01-12) unstable; urgency=low
+
+  * portable mode
+
+ -- Oleksandr Shneyder <[email-masked]>  Thu, 29 Jul 2010 17:43:06 +0200
+
+x2goclient (3.01-11) unstable; urgency=low
+
+  * plugin config options sound, exportfs, adsl, compression, quality, dpi, kbdlayout, kbdtype
+
+ -- Oleksandr Shneyder <[email-masked]>  Tue, 29 Jun 2010 18:12:48 +0200
+
+x2goclient (3.01-10) unstable; urgency=low
+
+  * plugin config options showstatusbar and showtoolbar
+
+ -- Oleksandr Shneyder <[email-masked]>  Thu, 24 Jun 2010 18:48:27 +0200
+
+x2goclient (3.01-9) unstable; urgency=low
+
+  * fixed dir export in LDAP mode
+
+ -- Oleksandr Shneyder <[email-masked]>  Tue, 08 Jun 2010 17:14:11 +0200
+
+x2goclient (3.01-8) unstable; urgency=low
+
+  * embeded mode for firefox plugin
+  * fixed "host key varification failed" message
+  * updated interface
+  * support for fs encodings
+
+ -- Oleksandr Shneyder <[email-masked]>  Tue, 13 Apr 2010 18:15:30 +0200
+
+x2goclient (3.01-7) unstable; urgency=low
+
+  * fixed connection to localhost
+  * fixed undefined shadow mode by ldap sessions
+
+ -- Oleksandr Shneyder <[email-masked]>  Mon, 01 Feb 2010 19:19:54 +0100
+
+x2goclient (3.01-6) unstable; urgency=low
+
+  * fixed ldap support
+  * shadow sessions
+  * xdmcp sessions
+  * commandline option for printing in LDAP mode
+
+ -- Oleksandr Shneyder <[email-masked]>  Fri, 28 Jan 2010 19:38:11 +0100
+
+x2goclient (3.01-5) unstable; urgency=low
+
+  * fixed gpg-card with older gpg version
+
+ -- Oleksandr Shneyder <[email-masked]>  Fri, 27 Nov 2009 00:00:31 +0100
+
+x2goclient (3.01-4) unstable; urgency=low
+
+  * set x2goagents dpi option
+  * fixed rsa/dsa keys with password
+  * session limit error message
+  * warning by terminating session
+  * fixed help message
+  * save pulseaudio client.conf and cookie on server
+  * in session directory not in ~/.pulse/client.conf
+  * (do not owerwrite local pulse settings for remote user)
+  * copy pulse cookie-file to remote system
+  * try to load module-native-protocol-tcp
+  * dependency for openssh-server in deb
+  * set keyboard layout by default
+  * add ssh option ServerAliveInterval=300
+  * check if port free when starting tunnel for nxproxy
+  * windows:
+  * Start own build of X Server
+  * Start one X server per x2goclient
+  * Start own build of PulseAudio
+  * Start one PulseAudio server per x2goclient
+  * Start one sshd per x2goclient
+  * printing and viewing pdf in windows using ShellExec
+  * make x2goclient work if username have spaces and unicode symbols
+
+ -- Oleksandr Shneyder <[email-masked]>  Wed, 14 Oct 2009 10:10:25 +0200
+
+x2goclient (3.01-3) unstable; urgency=low
+
+  * smart card works with gpg 2.0.11-1
+
+ -- Oleksandr Shneyder <[email-masked]>  Thu, 24 Sep 2009 21:31:45 +0200
+
+x2goclient (3.01-2) unstable; urgency=low
+
+  * Use x2goclient as SSH_ASKPASS program
+
+ -- Oleksandr Shneyder <[email-masked]>  Fri, 31 Jul 2009 19:49:02 +0200
+
+x2goclient (3.01-1) unstable; urgency=low
+
+  * create desktop icon
+  * start rdesktop session
+  * start LXDE session
+  * fixed error "ssh password with special symbols" thank Phillip Krause
+
+ -- Oleksandr Shneyder <[email-masked]>  Mon, 15 Jun 2009 19:35:38 +0200
+
+x2goclient (3.00-1) unstable; urgency=low
+
+  * Client side printing support
+
+ -- Oleksandr Shneyder <[email-masked]>  Tue, 24 Feb 2009 21:50:45 +0100
+
+x2goclient (2.99-3) unstable; urgency=low
+
+  * make sshfs mount work if user home is not in /home/<uname>
+
+ -- Oleksandr Shneyder <[email-masked]>  Mon, 02 Feb 2009 22:05:49 +0100
+
+x2goclient (2.99-2) unstable; urgency=low
+
+  * fixed ssh key in path with <space>
+
+ -- Oleksandr Shneyder <[email-masked]>  Mon, 26 Jan 2009 23:15:46 +0100
+
+x2goclient (2.99-1) unstable; urgency=low
+
+  * PulseAudio support
+  * you can use running arts or esd daemons
+  * use blowfish cipher for ssh tunnels
+  * reverse ssh tunnel for fs export (sshfs)
+
+ -- Oleksandr Shneyder <[email-masked]>  Thu, 15 Jan 2009 19:03:58 +0100
+
+x2goclient (2.0.1-24) unstable; urgency=low
+
+  * command line options:
+  * --session=<session>         start session "session"
+  * --user=<username>           preselect user "username" (LDAP mode)
+  * --hide                      do not show x2goclient (start hidden)
+
+ -- Oleksandr Shneyder <[email-masked]>  Tue, 09 Dec 2008 21:30:07 +0100
+
+x2goclient (2.0.1-23) unstable; urgency=low
+
+  * fixed: use listed in ldap x2goserver for "x2gogetservers" request instead ldapserver itself
+  * fixed: do not display error by initldap in slot_rereadUsers
+  * fixed: libldap dependencies in package
+
+ -- Oleksandr Shneyder <[email-masked]>  Mon, 08 Dec 2008 22:28:27 +0100
+
+x2goclient (2.0.1-22) unstable; urgency=low
+
+  * xorg dependency in control file
+
+ -- Oleksandr Shneyder <[email-masked]>  Tue, 25 Nov 2008 19:21:18 +0100
+
+x2goclient (2.0.1-21) unstable; urgency=low
+
+  * fixed pass error with gpg card
+
+ -- Oleksandr Shneyder <[email-masked]>  Thu, 20 Nov 2008 19:10:33 +0100
+
+x2goclient (2.0.1-20) unstable; urgency=low
+
+  * fixed resizing by session selecting
+
+ -- Oleksandr Shneyder <[email-masked]>  Wed, 19 Nov 2008 18:56:10 +0100
+
+x2goclient (2.0.1-19) unstable; urgency=low
+
+  * Fixes in traslation
+
+ -- Oleksandr Shneyder <[email-masked]>  Tue, 04 Nov 2008 19:57:59 +0100
+
+x2goclient (2.0.1-18) unstable; urgency=low
+
+  * Fixed check for sudo config error
+
+ -- Oleksandr Shneyder <[email-masked]>  Mon, 13 Oct 2008 22:20:21 +0200
+
+x2goclient (2.0.1-17) unstable; urgency=low
+
+  * Fixed: command with arguments
+  * Error massages (sudo config, can't execute command)
+
+ -- Oleksandr Shneyder <[email-masked]>  Thu, 09 Oct 2008 21:45:05 +0200
+
+x2goclient (2.0.1-16) unstable; urgency=low
+
+  * LDAP factor
+
+ -- Oleksandr Shneyder <[email-masked]>  Thu, 09 Oct 2008 21:52:21 +0200
+
+x2goclient (2.0.1-15) unstable; urgency=low
+
+  * Fixed sess_tv columns
+  * Change Xmap for hildon
+
+ -- Oleksandr Shneyder <[email-masked]>  Wed, 01 Oct 2008 22:57:35 +0200
+
+x2goclient (2.0.1-14) unstable; urgency=low
+
+  * fixed editconnectiondialog
+
+ -- Oleksandr Shneyder <[email-masked]>  Wed, 01 Oct 2008 21:18:08 +0200
+
+x2goclient (2.0.1-13) unstable; urgency=low
+
+  * Fixed "black buttons" on button focus with new qt
+
+ -- Oleksandr Shneyder <[email-masked]>  Mon, 16 Jun 2008 21:08:01 +0000
+
+x2goclient (2.0.1-12) unstable; urgency=low
+
+  * Client ssh port in settings dialog
+  * Sound system selections in session dialog
+  * "Mini mode" for modes < "800x600"
+
+ -- Oleksandr Shneyder <[email-masked]>  Fri, 14 Mar 2008 21:03:48 +0100
+
+x2goclient (2.0.1-11) unstable; urgency=low
+
+  * Mac OS X support
+  * Fixed Error '"visual != -1" in file itemviews/qheaderview.cpp' by compiling with qt >=4.3
+  * Fixed mouse tracking on SessionButton
+
+ -- Oleksandr Shneyder <[email-masked]>  Thu, 10 Jan 2008 21:54:24 +0100
+
+x2goclient (2.0.1-10) unstable; urgency=low
+
+  * russian translation
+
+ -- Oleksandr Shneyder <[email-masked]>  Mon,  1 Oct 2007 22:23:58 +0200
+
+x2goclient (2.0.1-9) unstable; urgency=low
+
+  * Added widget for ssh port select in editsessiondialog
+  * ssh port to connect in command line options
+  * client ssh port (for sshfs) in command line options
+
+ -- Oleksandr Shneyder <[email-masked]>  Fri, 21 Sep 2007 19:31:59 +0200
+
+x2goclient (2.0.1-8) unstable; urgency=low
+
+  * Fixed export directories with " " in path
+  * Fixed SessionButton frame size by empty session
+  * Compare session and display color depth
+  * MS Windows support
+
+ -- Oleksandr Shneyder <[email-masked]>  Thu, 13 Sep 2007 19:30:59 +0200
+
+x2goclient (2.0.1-7) unstable; urgency=low
+
+  * esd support
+
+ -- Oleksandr Shneyder <[email-masked]>  Tue,  7 Aug 2007 18:33:32 +0200
+
+x2goclient (2.0.1-6) unstable; urgency=low
+
+  * OpenPGP smart cards support
+
+ -- Oleksandr Shneyder <[email-masked]>  Fri,  3 Aug 2007 19:40:27 +0200
+
+x2goclient (2.0.1-5) unstable; urgency=low
+
+  * extern auth (usb, smartcard) support
+
+ -- Oleksandr Shneyder <[email-masked]>  Tue, 26 Jun 2007 21:54:48 +0200
+
+x2goclient (2.0.1-4) unstable; urgency=low
+
+  * minimized reaction time by many LDAP users
+
+ -- Oleksandr Shneyder <[email-masked]>  Thu,  1 Mar 2007 21:15:14 +0100
+
+x2goclient (2.0.1-3) unstable; urgency=low
+
+  * Failover LDAP Server config
+  * reload new users from LDAP
+
+ -- Oleksandr Shneyder <[email-masked]>  Thu,  1 Mar 2007 22:15:14 +0100
+
+x2goclient (2.0.1-2) unstable; urgency=low
+
+  * Updated German translation
+  * Add "wrong password!" in ssh error message
+
+ -- Oleksandr Shneyder <[email-masked]>  Mon, 26 Feb 2007 20:25:02 +0100
+
+x2goclient (2.0.1-1) unstable; urgency=low
+
+  * Initial release
+
+ -- Oleksandr Shneyder <[email-masked]>  Fri,  2 Feb 2007 21:36:59 +0100
+

---

From: Mihai Moldovan <[email-masked]>
Date: Wed, 12 May 2021 20:27:10 +0200

> thanks

This shouldn't have fired again, but it did. Not sure why, but feel free to
ignore it.

Mihai

---

From: X2Go Release Manager X2Go Release Manager <[email-masked]>
Date: Wed, 28 Jun 2023 22:06:22 +0200 (CEST)

close #1469
thanks

Hello,

we are very hopeful that X2Go issue #1469 reported by you
has been resolved in the new release (4.1.2.3) of the
X2Go source project »src:x2goclient«.

You can view the complete changelog entry of src:x2goclient (4.1.2.3)
below, and you can use the following link to view all the code changes
between this and the last release of src:x2goclient.

    https://code.x2go.org/gitweb?p=x2goclient.git;a=commitdiff;h=af4f113e3486f177247d774b2d1a45e0f3ecb57d;hp=043c16c050ab41a65da9e51629d7fc19ecf8ed08

If you feel that the issue has not been resolved satisfyingly, feel
free to reopen this bug report or submit a follow-up report with
further observations described based on the new released version
of src:x2goclient.

Thanks a lot for contributing to X2Go!!!

light+love

---
X2Go Component: src:x2goclient
Version: 4.1.2.3-0x2go1
Status: RELEASE
Timestamp: 1687982451
Date: Wed, 28 Jun 2023 22:00:51 +0200
Fixes: 1469
Changes:
 x2goclient (4.1.2.3-0x2go1) RELEASED; urgency=medium
 .
   [ Oleksandr Shneyder ]
   * New upstream version (4.1.2.3):
     - Load alternative image resources from specified folder.
     - Set correct aspect ratio for x2go and ON logos.
     - Download alternative resource files from http server.
     - Support for PNG background images.
     - Display state of broker connection in status bar.
     - Client can synchronize sessions with broker. Broker need to send
       syncinterval value in the client config section.
     - Set min width of session status label.
     - set clipboard mode of x2gokdriveclient in cmd line option.
     - Fix maximizing client window in thinclient mode with Qt5 (bullseye).
     - Add mime type application/x-x2go. X2Go Client can now automatically open
       session files with .x2go extension.
     - X2Go Client will send it's version to the broker when sending client
       event.
     - Don't close X2Go Client if settings dialog is called before broker auth.
     - X2Go Client will send it's OS name to the broker when sending client
       event.
     - Don't exit if connection to HTTP broker is failed when sync sessions.
     - Support for HTTP(S) urls in the session icons when using http broker.
     - Fix loading session icon to system tray when using broker.
     - Add --debug argument to x2gokdriveclient in debug mode.
     - Setting debug filter rules for QT>=5.2
     - Implement different view modes for sessions explorer:
       Favorite sessions, running sessions, all sessions.
     - Improve view modes in broker mode.
     - Set toolTip with detailed information for session button.
     - Show session path in session button in Favorite and Running views.
     - Improve synchronisation in broker mode.
     - Fix loading HTTP icon in pass dialog in broker mode.
     - Replace QFont::Thin with 0 to keep compatibility with Qt4.
     - Add special ACL for exported directories in Windows client.
     - Support for rootless X2GoKdrive sessions.
     - Fixed build with Qt5 on Windows.
     - Do not show empty folders in session explorer.
     - Support for OPENSSH PRIVATE KEY format sent from broker.
     - Do not show client in broker mode if startet in "hidden" mode.
     - Enable/Disable session view buttons inside of sessions explorer.
     - Add splash screen option when starting in hidden mode.
     - replace <HOME> with user's home dir in exports directories,
       when exporting session default directories.
     - create default export directory if not exists.
     - send to broker xdmcpserver in command option when starting xdmcp session.
     - improve processing stderr from nxproxy.
     - support for recent cygwin binaries and nxproxy 3.5.99.x
       all cygwin binaries and DLLs should be moved into the
       INSTDIR/bin directory by Windows installer.
     - for x2gokdrive sessions, when auto kbd layout is chosen,
       x2goclient will try to set the same kbd layout on server as on the
       client.
     - add "noresize" setting, which makes the proxy window not resizable
       for user.
     - on Windows SSHD will only listen 127.0.0.1 to avoid FW warnings.
     - on Windows check the location of cgwin binaries in <APPDIR> and
       in <APPDIR>/bin.
 .
   [ Ryan Schmidt ]
   * New upstream version (4.1.2.3):
     - x2goclient.pro: use the right C++ standard library on OS X/macOS.
 .
   [ Melroy van den Berg ]
   * New upstream version (4.1.2.3):
     - src/sshmasterconnection.c: send EOF before closing channel.
     - src/sshmasterconnection.c: return false if login check remote command
       execution failed.
     - src/sshmasterconnection.c: refactor some of the channel loop and fix
       channel/session closes.
     - src/sshmasterconnection.c: fix 'when not' password auth. Avoids double
       error messages.
     - src/sshmasterconnection.c: correct retval check.
     - src/sshmasterconnection.c: explicitly mark function parameters as unused.
     - .gitignore: ignore Visual Studio temporary files. Fixes: #1469.
 .
   [ Mihai Moldovan ]
   * New upstream version (4.1.2.3):
     - src/sshmasterconnection.{c,h}: fix builds, new function should have been
       registered and not static, but private.
     - .gitignore: add debian/control, since it's now auto-generated.
     - Makefile: support version switching through a QT_VERSION variable -
       might be overridden via environment variables or the make call.
     - x2goclient.spec: add version switching support. Use Qt 5 for FC31+, RHEL
       8 and *SuSE 15.3+.
     - x2goclient.spec: don't try to prepend %{_qt4_bindir} if the macro is not
       defined.
     - Makefile: allow passing down variables that are safe to pass via the
       environment.
     - x2goclient.spec: fix condition with maybe-undefined macro.
     - x2goclient.spec: typo fix in vendor macro.
     - x2goclient.spec: expand %{_qt4_bindir} to integer if it's set, instead
       of using it as a string in the condition (which then leads to parsing
       error).
     - x2goclient.spec: rework Qt5 dependencies. Use a common set of
       PkgConfig()-based dependencies for the Qt 5 libraries themselves and
       only make the linguist tools (lrelease) conditional.
     - Makefile: make controllable variables default-if-not-set to allow
       overriding via the environment.
     - Makefile: invoke make as $(MAKE) to keep original invocation.
     - x2goclient.spec: fix missing %endif in Qt-4-BuildRequires section.
     - x2goclient.spec: use %{_qt5_bindir} macro analogous to the Qt 4 variant.
     - x2goclient.spec: correctly quote PATH overrides.
     - x2goclient.spec: fix syntax error in Qt 5 PATH override.
     - x2goclient.spec: add BuildRequires on Qt5X11Extras.
     - x2goclient.spec: also use/handle %{_libqt5_bindir}, as used by *SuSE.
     - x2goclient.spec: add BuildRequires on Qt5Network. OpenSuSE Tumbleweed
       split the pkgconfig files up into individual packages, while older
       versions ship all of them in libqt5-qtbase-devel. The former does not
       automatically use that package any longer and hence will not pull in all
       library packages automatically. That's not a bad change, since it forces
       us to spell out the dependencies correctly.
     - src/onmainwindow.cpp: add Cancel standard shortcut to cancel button in
       login window. Change requested by Max-Planck-Institut für Kolloid- und
       Grenzflächenforschung Potsdam.
     - src/onmainwindow.cpp: consolidate Resume button enabling state in
       ONMainWindow::initSelectSessDlg ().
     - src/onmainwindow.{cpp,h}: add notice explaining how to resume running
       sessions. Change requested by Max-Planck-Institut für Kolloid- und
       Grenzflächenforschung Potsdam.
     - src/onmainwindow.cpp: add Cancel standard shortcut to cancel button in
       session selection view.
     - src/onmainwindow.cpp: set word wrapping on running label.
     - src/onmainwindow.cpp: increase height of session selection dialog in
       mini mode.
     - src/onmainwindow.cpp: increase fixed height of session selection dialog
       in normal mode and also set as minimum height.
     - src/onmainwindow.cpp: unbreak on Qt 4 by emulating QKeySequence::Cancel.
     - src/onmainwindow.cpp: unbreak more and make sure that the code actually
       works on older systems. A very important part of the magic is using the
       old Qt4 SIGNAL/SLOT syntax and making sure to drop parameters on both
       sides, so that the default slot parameter is used, which animates the
       button for 150 ms.
     - src/onmainwindow.cpp: fix session creation date/time display. The data
       returned by the server was changed to an ISO-date-formatted one in 2011,
       but that change was not carried over to the client. We've had silly
       dates for more than 10 years and nobody noticed. Go figure.
     - src/onmainwindow.cpp: convert server-reported time to human readable
       time in Qt's standard format in session list view.
     - handle_mxe.sh: rework, make most variables lowercase, change spacing,
       use proper if-else blocks, do not use special bash features for string
       comparison etc.
     - macbuild.sh: qmake never supported -config, it was always
       CONFIG(+)='something'.
     - config_linux_static.sh: also switch from -config to CONFIG+='...'.
     - {handle_mxe.sh,x2goclient.pro}: make mxe selectable via CONFIG option
       and prepare selector in x2goclient.pro.
     - x2goclient.pro: also select on win32 and not just win32-*, fix
       whitespace.
     - x2gohelper/Makefile.mxe: more quoting.
     - Windows: Update PuTTY from 0.73 to 0.78.
     - debian/preprocessor.pl: typo fixes only.
     - misc: pre-release copyright update.
     - man/man1/x2goclient.1: pre-release date update.
   * debian/control:
     + Move to debian/control.in.
   * debian/control.in:
     + Switch to priority: optional. "extra" has been deprecated long ago.
       Pulled from Mike's changes.
     + Drop x2goplugin{,-{provider,dbg}}. It's been dead long enough.
     + Add Qt version switching support.
     + Add build-dependency upon lsb-release. Should be always part of a
       dependency of essential or base packages, but make sure we have it.
     + Add build-dependency upon libencode-locale-perl, needed for our
       preprocessor Perl script.
     + Add build-dependency upon m4, needed by our preprocessing shell script.
   * debian/copyright:
     + Switch Upstream-Contact to myself. Pulled from Mike's changes.
     + Add new license "GPL-2+~OpenSSL" for the modified GPL 2+ license
       including the OpenSSL exception and use that where appropriate. Pulled
       from Mike's changes.
     + Move GPL-3 definition out-of-line. Pulled from Mike's changes.
     + Update notices.
   * debian/rules:
     + Preprocess files with an ".in" suffix in the "debian" directory. Mostly
       adapted from the firefox package.
     + Add Qt 4/5 switching, based upon the base system definition. Mostly
       adapted from x2gomatebindings.
     + Force re-generation of debian/control in clean rule.
     + Add force variables to bypass autodetection via lsb-release. This will
       be used by our buildscripts.
     + Do not force re-generation of debian/control in clean rule. Its executed
       non-chrooted by sbuild before building the source package, so forcing
       will overwrite the file our buildscripts generated with something not
       matching the target system.
     + Assign default values to the FORCE_{VENDOR,RELEASE_VER} variables - thus
       allowing passed-in values through the environment.
     + Utilize new version switching in main Makefile by overriding the
       QT_VERSION make variable.
     + Fix version detection on testing and unstable. lsb_release -r currently
       only outputs n/a on these suites, so fall back to a rather fragile
       detection via apt-cache policy instead.
     + Fix version detection on testing and unstable V2. Remove a= tag.
   * debian/:
     + New file "watch". We won't need this per se (since we're upstream and
       there cannot be a newer version of the Debian package without releasing
       it first), but it might make downstream's life easier. Or not, depending
       on whether it's kept up-to-date correctly or not. Pulled from Mike's
       changes.
     + New file "upstream/metadata". Same reasoning as for "watch". Pulled from
       Mike's changes.
     + New file "preprocessor.pl". Simple text file preprocessor supporting
       basic condition logic.
     + New file "proprocess.sh". Used to apply replacement tokens and run our
       new preprocessor.
 .
   [ Mike Gabriel ]
   * New upstream version (4.1.2.3):
     - Makefile: Install x-x2go.xml MIME database source file for .x2go file
       extension.
   * debian/x2gocient.install:
     + Install x-x2go.xml into bin:pkg x2goclient.
   * x2goclient.spec:
     + Install x-x2go.xml into bin:pkg and run update-mime-database during
       postinst.
 .
   [ Ulrich Sibiller ]
   * New upstream version (4.1.2.3):
     - desktop/x2goclient.desktop: drop Maemo support.
     - res/img/icons: drop Maemo support, remove hildon subdirectory.
     - res/img/svg: drop Maemo support, remove bg_hildon.svg.
     - res/resources.qrc: drop Maemo support, remove bg_hildon.svg entry.
     - src/{{InteractionDialog,configdialog,connectionwidget,
             editconnectiondialog,folderbutton,mediawidget,ongetpass,
             onmainwindow,printprocess,printwidget,sessionbutton,
             sessionmanagedialog,sessionwidget,settingswidget,
             sharewidget}.cpp,x2goclientconfig.h}: drop Maemo support.
     - /: drop Maemo support, remove x2goclient.pro.maemo.
     - /: add README.mxe, describing MXE builds.
     - /: add handle_mxe.sh, MXE control script.
     - x2goclient.pro: use different parameters for MXE builds.
     - x2gohelper/x2gohelper.cpp: use lower-case header files.
     - x2gohelper/: add Makefile.mxe.

---

From: [email-masked] (X2Go Bug Tracking System)
Date: Wed, 28 Jun 2023 20:10:05 +0000

This is an automatic notification regarding your Bug report
which was filed against the x2goclient package:

#1469: X2Go Client connection issue (Socket error)

It has been closed by X2Go Release Manager X2Go Release Manager <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact X2Go Release Manager X2Go Release Manager <[email-masked]> by
replying to this email.

-- 
X2Go Bug Tracking System
Contact [email-masked] with problems

Subject: X2Go issue (in src:x2goclient) has been marked as closed
From: X2Go Release Manager X2Go Release Manager <[email-masked]>
To: [email-masked]
Cc: [email-masked], [email-masked]
Date: Wed, 28 Jun 2023 22:06:22 +0200 (CEST)

close #1469
thanks

Hello,

light+love

---

Subject: X2Go Client connection issue (Socket error)
From: Melroy van den Berg <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Mon, 18 May 2020 18:54:06 +0000

Package: x2goclient
Version: 4.1.2.2

Thanks in advance!

Kind regards,
Melroy van den Berg