I use the free version of RealVNC Viewer (the key word being viewer) to connect to my Mac Mini from my iPhone and Ubuntu desktop, however RealVNC Connect (read server) is not officially supported on Ubuntu versions higher than 16.04 at this time. While I was not able to get their workaround to work on Ubuntu 17.10, I did get it working on Ubuntu 18.04.
It is possible that these steps would work on 17.x as well, but who knows. I had been trying to get it working on 17.10 for some time before I tried their "fix", and it is possible that had something to do with my failure. All I know is I followed these steps, in this order, on Ubuntu 18.04, and I can now connect to my Ubuntu desktop using RealVNC viewer from other devices.
- Download RealVNC Connect (6.2.1 as I am writing this), and do the following from the terminal:
sudo dpkg -i <downloaded_file_name>.deb
sudo cp /etc/vnc/vncelevatecfg /etc/vnc/vncelevatecfg.custom
sudo nano /etc/vncelevatecfg.custom
- Uncomment the line: #CUSTOM_COMMAND= and edit it so that it reads CUSTOM_COMMAND=gnome-terminal --title DESCRIPTION --disable-factory -- sudo COMMAND save the file, and exit nano
- Launch RealVNC server
sudo systemctl start vncserver-x11-serviced.service
At this point I was presented with the GUI wherein you must enter your account credentials and a password for the computer you are installing the server on. This is where things went balls up in the past. I was able to sign into my RealVNC account, but when I attempted to create a password to protect my computer it warned that admin privileges were required. Unfortunately, during half my attempts to get it working on 17.10 it presented no way to enter the admin password, and during the other half, when it either popped up a dialog or opened a terminal, (it did both during different attempts) it simply looped back around. After following the instructions above, I was presented with a terminal window asking for my admin password and it was accepted no problem.
Note: If you want the RealVNC server to launch ever time you restart your computer you need to enter the following command at the terminal
sudo systemctl enable vncserver-x11-serviced.serviceWhen you restart your computer the GUI will flash across the screen and the icon will be in the dock, however you can safely close this and the server will continue to listen for incoming connections. Further note, that I did this as step 7 immediately after starting the server. I have no idea if waiting to do this later or disabling it will cause issues. Frankly, I have it working and do not plan on messing with it.