0

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.

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.

  • 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 '16 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. ;) – Mioriin Nov 28 '16 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 '18 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. – Mioriin Apr 18 '18 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 '18 at 22:41

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.