15

I know that there are previous topics on this issue, but most of them focuses on other versions, which have different configuration options or try to solve it by installing Xfce or other custom display manager.

I want to use my computer as a home server, but I like to connect to it and access the default graphical interface on VNC. I use vino for the VNC.

When a display is attached, I can access the computer fine. When it is missing I can also connect, but only get an empty X (?) screen with a cursor and Gnome isn’t running.

xrandr says Can’t open display. How can I add a virtual display to be used and shared among multiple remote sessions?

gklka
  • 253

6 Answers6

15

https://launchpad.net/ubuntu/bionic/+source/xserver-xorg-video-dummy

sudo apt-get install xserver-xorg-video-dummy

How to use: Add Fake Display when No Monitor is Plugged In

anonim
  • 408
  • It doesn’t make a difference (or I might miss some config) – gklka May 08 '18 at 07:03
  • https://askubuntu.com/questions/453109/add-fake-display-when-no-monitor-is-plugged-in – anonim May 08 '18 at 07:06
  • 1
    Or you might buy one of those dummy hdmi dongles for 5 bucks – Mehdi May 14 '21 at 15:43
  • If you read the comments attached to that post from https://askubuntu.com/questions/453109/add-fake-display-when-no-monitor-is-plugged-in then many users claim it broke their OS. (comments also date from 2018) – Babyburger Feb 14 '22 at 14:21
4

This is how I solved it: I've created the virtual display using the answer to this question: https://unix.stackexchange.com/questions/378373/add-virtual-output-to-xorg

Create a 20-intel.conf file:

sudo vi /usr/share/X11/xorg.conf.d/20-intel.conf

Add the following configuration information into the file:

Section "Device"
    Identifier "intelgpu0"
    Driver "intel"
    Option "VirtualHeads" "2"
EndSection

This tells the Intel GPU to create 2 virtual displays. You can change the number of VirtualHeads to your needs.

Then I made a shell script (don't forget to set executable) and put that in Startup Applications:

#! /bin/bash

/usr/bin/xrandr -d :0 --output VIRTUAL1 --primary --auto
/usr/bin/xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900$
/usr/bin/xrandr --addmode VIRTUAL1 "1600x900_60.00"
/usr/bin/xrandr

That way, VIRTUAL1 is set as output and connected. At boot, a new mode (found using "cvt 1600 900") is being created and appointed to VIRTUAL1.

Only issue with this is: dock is missing at reboot... Haven't solved that yet.

  • Have you solved the dock? Sounds to me that it acted as a display area extending as if you'd add another monitor. – jave.web Apr 06 '21 at 10:02
3

I tried all the suggestions to use a dummy script. It worked but only if i NEVER wanted to use a monitor attached directly to my PC. If you want remote desktop, as well as the option of a real monitor, the only solution I could find was an HDMI Pass-Through EDID Emulator. I plugged it in and everything worked seamlessly. About $20 from amazon: https://smile.amazon.com/gp/product/B07C8BHPD6/

1

If you're using x11vnc, use the flag "-create" to create a virtual frame buffer using Xvfb if a display is not found. It will be 1280x1024 8-bit by default. Using "-env X11VNC_CREATE_GEOM=${1:-1024x768x16}", you can specify alternative display geometries.

There are other flags available for xvnc and xdummy (-xvnc and -xdummy)

More advanced options can also be configured. See this answer for a strong implementation: https://stackoverflow.com/a/40678605/848419

0

I have a easy fix. If you have one of those VGA to HDMI or VGA to Display port adapters lying around, you can use it to get past this Monitor or display issue. I used a cheap one $7 adapter and it worked for me. My Ubuntu server is a Lenovo Thinkserver. Hope that helps someone. Especially useful if you are trying to use VNC.

0

I solved it similar to Durgesh - I set it up initially with a monitor plugged in. I then plugged in a simple HDMI to VGA adapter, rebooted. Checked Screen Display settings, which shows it detected the adapter and offered a 2nd display tab. I set my resolution on the 2nd display tab, unchecked mirror or join display. Unplugged my monitor, tested and it worked. adapter image here