AnswerBun.com

Setting up vnc server and no physical display : Ubuntu 16.04 LTS

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.

Unix & Linux Asked by ankit7540 on December 30, 2020

2 Answers

2 Answers

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.

Correct answer by Mio Rin on December 30, 2020

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

Answered by Ron Neher on December 30, 2020

Add your own answers!

Related Questions

init script for alpine not working

1  Asked on January 18, 2021 by karlsebal

   

Filter rows of a file by list of a second file

1  Asked on January 18, 2021 by sh-yang

       

Have to restart network service after reboot (centos 7)

1  Asked on January 17, 2021 by raoulpetite

   

query regarding puppet stdlib module

0  Asked on January 16, 2021 by rajnish-kumar-soni

 

Bash – Running a bash script from within a ksh script

1  Asked on January 16, 2021 by mo12

     

Pop OS doesn’t boot up because of pci-e bus error

1  Asked on January 16, 2021 by user6516763

     

How do I reformat a hybrid-mbr sd card?

0  Asked on January 12, 2021 by dave-mankoff

 

bash Noob: What’s wrong with this line?

1  Asked on January 12, 2021 by ottoeisen

   

How can I save the last command to a file?

4  Asked on January 12, 2021 by mattlbeck

     

Sourcing /root/.zshrc in Docker using current user

3  Asked on January 9, 2021 by mihai-galos

 

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved.