I have a fresh Ubuntu 16.04 installation, which is the only OS on my computer. Not any package installed or whatsoever. I don't want to have a graphical environment on my local machine, however I want to be able to remotely connect it via vnc. I found that the package that ships the vnc server is x11vnc. So I tried:
apt-get install x11vnc
and then
x11vnc
and I received:
28/06/2019 15:47:37 x11vnc version: 0.9.13 lastmod: 2011-08-10 pid: 25749
28/06/2019 15:47:37 XOpenDisplay("") failed.
28/06/2019 15:47:37 Trying again with XAUTHLOCALHOSTNAME=localhost ...
28/06/2019 15:47:37
28/06/2019 15:47:37 *** XOpenDisplay failed. No -display or DISPLAY.
28/06/2019 15:47:37 *** Trying ":0" in 4 seconds. Press Ctrl-C to abort.
28/06/2019 15:47:37 *** 1 2 3 4
28/06/2019 15:47:41 XOpenDisplay(":0") failed.
28/06/2019 15:47:41 Trying again with XAUTHLOCALHOSTNAME=localhost ...
28/06/2019 15:47:41 XOpenDisplay(":0") failed.
28/06/2019 15:47:41 Trying again with unset XAUTHLOCALHOSTNAME ...
28/06/2019 15:47:41
28/06/2019 15:47:41 ***************************************
28/06/2019 15:47:41 *** XOpenDisplay failed (:0)
I don't know if I'm missing some package or maybe there is some other reason why is it happening.
I am connecting this machine with ssh.