1

I am trying to setup a vnc server on Ubuntu 16.04 LTS which has unity desktop installed. I do not want to install other desktop environment.

I started with installing x11vncserver and later realized that it does not work when the server does not have a physical monitor. It gives the error as

*** XOpenDisplay failed. No -display or DISPLAY.

(There are ways to emulate the monitor but I did not try it.)

After removing it, I tried vncserver ( xvnc ) which does work but I need to move to gnome panel and it looks really weird and low quality.

Connection details: Gigabit ethernet (all the way from client to server) but not on local network.

Can somebody help. Thanks.

2 Answers 2

6

I use this to set up a virtual monitor for my headless server to work with VNC and Steam in-home streaming:

/etc/X11/xorg.conf.d/10-monitor.conf

    Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0    #Virtual monitor needs this
    VertRefresh     43.0 - 72.0    #this, too
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"              #change for AMD or Intel
    VendorName     "NVIDIA Corporation"  #this, too
    Option "NoLogo" "1"                  #also this
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
        Virtual 1920 1080
    Option          "AllowEmptyInitialConfiguration" "True"
    EndSubSection
EndSection

Adjust as needed to fit your GPU and monitor setup. Note that this configuration only works for X. Mir and Wayland use a different configuration setup.

6
  • Thanks for reply. Above looks like emulating a display. 2 questions. Is your solution applicable to x11vnc server which is of course based on x.org ? Do we need to do any more setting like making the server specifically use this 'monitor' ?
    – ankit7540
    Nov 27, 2016 at 13:35
  • 1
    If it uses the X graphics stack, it should work without further configuration, since this is just telling X that there's a display to use "right there" and the EDID probe missed it. ;)
    – Mio Rin
    Nov 28, 2016 at 5:48
  • What if I do not have NVIDIA? My graphic card is on board. Can I simply remove Section "Device" ? BTW, this file /etc/X11/xorg.conf.d/10-monitor.conf does not exist on Ubuntu 18.04. Does it work there too?
    – ar2015
    Apr 18, 2018 at 3:57
  • @ar2015 As per the comment in the file, you change Driver to the appropriate driver on your system. Yours would likely be "intel" or "i915". If the file does not exist, you simply create it.
    – Mio Rin
    Apr 18, 2018 at 15:56
  • @Mioriin, thanks a lot. For VendorName can I use "intel Corporation"? Are these names arbitrary? Also if sometimes I connect a monitor, do they create any problem for a normal display?
    – ar2015
    Apr 18, 2018 at 22:41
2

Here is link to script we pulled together to set an Intel NUC (NUC8i3BEH) -- https://github.com/rneher-igel/Linux-Scripts

Script to update and configure a FRESHLY installed version of Ubuntu Desktop 18.04 / 20.04 as a headless system (no attached monitor) that can be accessed via VNC (such as with RealVNC client).

Items installed / configured include:

  • Prepped for a VirtualBox install
  • Time service (chrony)
  • OpenSSH
  • VNC (Vino)
  • Headless via dummy video driver

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .