1

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.

  • What do you want to share with vnc then, if you have no X? Your text console? – peterh Jun 28 at 16:20
  • You are right I believe that I don't know the architectural aspect of how GUI works in linux. I hoped that the vnc server would somehow manage everything for me. – Z.Szymon Jun 28 at 16:22
  • If you have no X, practical usage suggest ssh. You are communicating characters with your machine, there is no need to get them graphically. (Side remark: be a nice guy, "I" is always capital letter on English). – peterh Jun 28 at 16:30
1

x11vnc, as also its name suggests, shares an X11 display on vnc. You have no X, so x11vnc has nothing to share.

This error message says, that x11vnc wanted to connect your X11 display, to grab its content (to share to the connected vnc clients). However, it could not connect the X server, because it does not exist on your machine.

It would be possible to develop a vnc server which shares a linux text console, but my google queries did not result anything. Probably no one has developed it, because anybody wanting to access a linux text console, uses ssh.

It could be developed in around 2 weeks for an experienced developer, in my opinion.

However, current Linux installations use nearly always framebuffer. It means, that even the Linux text console uses a graphical mode of the video card. For the framebuffer, multiple vnc servers are already existing, like this, this or this.

  • That's some impressive knowledge. Could you please tell me what packages should I install in order to get X11? Or even better, could you tell me where could I find such an information on my own? I've read somewhere that xorg package ships basic X11 implementation for ubuntu however upon installing it I still get the same message as before. – Z.Szymon Jun 28 at 16:42
  • @Z.Szymon Default Ubuntu install has X11 automatically. To remove it, you would need to significantly change your system (apt-get --purge remove x11-common libxau6:amd64). On your question, you did not do that. Probably your X is installed, but it did not start on some reason. If you can't find something with google (simplest way: type in your question into the search box), then you can ask it here on the Unix SE. askubuntu.com is also an useful resource. – peterh Jun 28 at 16:54
  • @Z.Szymon If you explain in your question, what you googled and why it does not work, it makes the threatment of your question much more nice. – peterh Jun 28 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.