X2Go Connection Failure – Failure negotiating the session in stage ‘7’

X2Go Connection Failure – Failure negotiating the session in stage ‘7’

X2Go is my favourite remote desktop solution for Linux, mainly because its so responsive. Hopefully I’ll write up a quick How To on getting it setup soon, but for now, here’s an issue I’ve just overcome after a couple of days of stress!



SSH connection to my home server was working fine but X2go had stopped working. This was caused by me trying to shut the server down in the Mate desktop from within an X2Go session. The session then hung forcing me to terminate the client window. After rebooting the server through SSH, I tried to reconnect with X2Go. The X2Go client log then displayed the following error messages:


And a pop up window displayed:




I connected to my CentOS server to check the log file – /var/log/messages


which reported:



After looking at the server log, I knew there was a problem with resuming session 58. I decided to move this session’s files, rightfully assuming a new session would take its place. So I went searching and found a session directory in $HOME/.x2go/ . This directory contains symlinks to /tmp/.x2go-userName/. Instead of deleting it straight away, I cautiously moved the session symlink to /tmp which ultimately resolved the issue, but I had to make two attempts at making a connection to reconnect.


I watched the server log again following the above move:


Then attempted to connect from the X2Go client. The first attempt resulted in:


That sort of message was expected. Connection attempt 2 then succeeded 😀 :


Clean up:


Update 20/12/2015

Experienced this issue once again when attempting to connect using SSH. This time it was resolved by deleting the actual session files in /tmp/.x2go-userName/. I’m now in the habit of removing all traces of both the symlinks and session files:



  1. I found that I had to comment out “AllowTcpForwarding no” (or, you could probably change it to yes) in /etc/ssh/sshd_config on the “server” (running openssh on Ubuntu 14.04 64-bit LTS Server, with LXDE installed), restart ssh, and check “Use SSH port forwarding to tunnel file system connections through firewalls” on the client configuration.

Leave a Reply

Your email address will not be published. Required fields are marked *