I use x2go client on an Ubuntu laptop to work on a remote Ubuntu server. My network connection is not very stable (WiFi), and it disconnects several times per day. When this happens while I'm using x2go, the laptop basically becomes unresponsive for a few minutes, until x2go client shows a dialog asking if it shall disconnect.
The x2go client runs in full-screen mode. There are keyboard shortcuts to disconnect or minimize the client, and also a mouse "shortcut" (CTRL-click in the upper right corner), but they stop working when there is no connection, so there is no easy way to close x2go.
The only way I found so far is to switch to a text terminal with CTRL-ALT-F3, log in with a password, kill the x2go client from command line, then log out and switch back to the GUI session with CTRL-ALT-F1, log in with a password again. Both options (wait for a few minutes or switch to a text terminal) are pretty inconvenient, so I'm looking for any kind of a better solution.
Some solutions I was thinking about, but don't know how to make them work:
Write a bash script which detects when x2go client gets disconnected and kills it in a few seconds. Unclear if it's possible to detect a disconnection in a reliable way.
Some kind of a special system keyboard shortcut to run a script which kills x2go client. Standard Ubuntu desktop shortcuts don't work while x2go is in full-screen mode.
Any way to make x2go client handle a minimize or disconnect shortcut on the client side?