Getting RealVNC To Work With Ubuntu 18.04

in #linux6 years ago

image1.png

Viewing My Ubuntu 18.04 Desktop From My iPhone 8

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.

  1. Download RealVNC Connect (6.2.1 as I am writing this), and do the following from the terminal:
  2. sudo dpkg -i <downloaded_file_name>.deb
  3. sudo cp /etc/vnc/vncelevatecfg /etc/vnc/vncelevatecfg.custom
  4. sudo nano /etc/vncelevatecfg.custom
  5. 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
  6. Launch RealVNC server sudo systemctl start vncserver-x11-serviced.service

term.png

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.


real_vnc_restart.png

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.service When 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.

Disclaimer: this seems to be a crap shoot, I make mistakes, sudo can end life as we know it if put into the wrong hands.

Sort:  

Interesting, just erased my primary machine (had 16.04)and installed 18.04. I searched how to enable remote viewing and followed the steps and am now using Remmina (does vnc and rdp) vieweer to remote my 18.04 desktop.

I used Remmina for a little while, and tried a couple other solutions, but they performed poorly for me. I used to use Splahtop before I started using Linux, but they do not support Linux.

I found that Remina was displaying poorly until I adjusted the quality to good, even though I had a higher resolution color depth and was running on a gigabit network.

I have also used Remina to rdp Windows and my Raspberry Pi computers running xrdp on Pi.

I tried several different setting combinations, but I just could not get the same results. Of course you do not have to sign up to use Remmina, which is a big plus.

A couple of years ago I tried RealVNC, but found it real picky. I switched to tightvnc and when I setup my primary pc running Ubuntu and tried Remina I have not looked back. Interestingly Remina does not want to connect to RealVNC with it's VNC mode. That is when I discovered XRDP on Raspbian. This allowed me to connect from Windows or Linux.

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.033
BTC 64386.10
ETH 3142.17
USDT 1.00
SBD 3.98