AKA: I've finally found i remote desktop solution that i actually like
Recently due to increased time spent on remote work i spent a lot of time trying remote desktop solutions that suit my needs... i guess it's the same for you guys!
I don't really like remote desktop, and honestly most of the times I'm happy with just SSH, but sometimes i need to use some GUI that i can't use locally from home... Every time i had some issue:
- TeamViewer: even using the licensed version, it get stuck on non-compatible versions, commercial use (just tell me why; i paid for it!). The latest version are even more prone to become obsolete very fast.
- AnyDesk: it works... but not so much. I spend more time restarting the remote server because the connection drops suddenly and most of the times it can't connect again (stuck on login). This happens even under good network conditions.
- TightVNC: this is very stable, but even with a good connection, the image quality is not so good. This makes impossible for me to use some software were text colours and details matter. I think this is a more general limitation of the VNC protocol.
- TigerVNC: more or less the same as TightVNC
So before giving another try to new software i have carefully thought on what i really needed and what i didn't: it came out that since i connect to office using a VPN i don't really need solutions that are built to be used for "remote assistance". All i need is just a server that binds on a fixed port, and makes me able to use any light DE detached from the physical X server (i don't really want some random to see my PC doing stuff all alone XD).
So I've finally found a solution that works great for me: X2Go.
The project webpage isn't very appealing, but this doesn't represent the quality of the software, which is great:
- It can be installed in 2 minutes
- It's lightweight
- It tunnel the traffic over SSH, which gives it a secure connection "for free"
- It is optimized for narrow bandwidth requirement
So, in the next section we'll see how to install and use it on Ubuntu 18.04 and it's derivates.
Choosing the right DE
X2Go is compatible with the most common desktop environments. My suggestion is to stick with something minimal in order to further optimize bandwidth and CPU usage.
My choice is MATE since it is also my daily driver both at work and home.
Install the server
The server binaries are not included in the standard repositories, so we need do add them via PPA:
$ sudo apt-add-repository ppa:x2go/stable
Next just update and install
$ sudo apt-get update
$ sudo apt-get install x2goserver x2goserver-xsession
Install the client
The client is available for all the major OS. Here i'll focus on Ubuntu 18.04, as for the server.
The client is available in the official reposistories, so you can install it with just:
$ sudo apt-get install x2goclient
The client interface is really simple: once started you just need to add a new "session" and fill the form
On this first tab you have to set the server IP and the SSH user that will connect to the remote desktop.
Did you remember that i said X2Go use an SSH tunnel? Well, another free feature of this is that you have user management.
The other thing to configure in this tab is the DE from the combobox in the "Session Type" area. In my case i went for MATE.
In this tab set the resolution that you want to use, for example 1280*1024 (which is 4:3... feeling old yet?)
Also don't forget to set your keyboard layout if the auto-detect doesn't work as expected.
There is one little thing i want you to notice from this view: bidirectional copy-paste works out of the box.
If you don't have strange setups on SSH or network, this is everything you need to do in order to have a working remote desktop. Just apply the settings the then from the main view double click the profile just created, fill user and password and hit "OK" to connect.
As i already said, i am amazed by the quality and simplicity of x2go. I have already used it for about ten hours testing different connections: ADSL, mobile both on LTE and 3G. The place where i live is not server by a stable internet connection, so x2go happened to lag some time, but beside this i wouldn't have said i was using a remote desktop! I don't know how x2go protocol works, but it was like i was using the native DE.
I haven't covered aspects like how to open ports on firewall because it's something in common with SSH, so you probably already have it. If you need help with it, just ask on the comments I'll be happy to help.