I have been attempting to connect to my home server running Ubuntu 19.10 over TeamViewer from my other devices (Linux computers, Android phones or Windows computers) in vain. I have tried fiddling with Xorg configurations, installing and uninstalling various things.

To summarise:

  • Unable to connect to the server without a monitor connected. It does connect, but I end up on a black screen.
  • When I installed xserver-xorg-video-dummy package and tried setting Xorg configurations in /etc and /usr in their respective paths, I could no longer log into Ubuntu by entering username and password via TeamViewer on the Ubuntu login screen, until I got rid of it via ssh.

    Also, when I installed the package, my mouse and keyboard stopped working. Only through TeamViewer, it was accessible. Installing the package also disabled my monitor.

  • The same issue persists when I am using with the monitor and I disconnect the monitor while TeamViewer is running.

What I am looking to do:

  • Have a headless Ubuntu 19.10 server accessible over TeamViewer.
  • Should be able to use when a monitor is also connected.
  • All hardware should be accessible.

Any help or suggestion would be welcome, even the ones I have already tried in case I did it wrong.


You can create an evdi file representing your monitor (since everything is a file on Linux), then point to it in your Xorg.conf file. Have a look at how it's done here (about point 12 or so)

  • Hey @rasmus91, thanks for replying. I did get the GUI to show up on TeamViewer by following askubuntu.com/a/1087551/707371. But I am unable to log in by typing my username and password. Once I type in, it tries to login and then I guess it logs out and puts me back on the lock screen. SSH works perfectly fine when I try to log in. Any suggestions? – Aravind V. Nair Nov 22 '19 at 9:05
  • Hrm. Sorry. I'm not exactly sure if it's something with permissions of the user under which TeamViewer is running. Is it the TeamViewer host version? (The one made to run Headless) – rasmus91 Nov 22 '19 at 9:09
  • Ahh @rasmus91, I have given all permissions within the application. I also have WoL enabled. I have TeamViewer for Linux, not TeamViewer Host. TeamViewer works fine. But I am unable to log in only after installing that package. SSH login works, GNOME login doesn't work. – Aravind V. Nair Nov 22 '19 at 14:30

Here's what I did and it's been perfectly working for me:

  • Step 1: Open Terminal and paste sudo nano /etc/default/grub

  • Step 2: Update the line GRUB_CMDLINE_LINUX_DEFAULT to include nomodeset.

  • Step 3: sudo update-grub && sudo reboot

At this point, TeamViewer should be able to load, and you should be able to log in. But the resolution is bad and the graphics aren't good either.

  • Step 4: Open Terminal and paste sudo apt install xserver-xorg-video-dummy -y

  • Step 5: Make a script called monitor.sh with contents as sudo rm /usr/share/X11/xorg.conf.d/xorg.conf and nomonitor.sh with contents as sudo cp xorg.conf /usr/share/X11/xorg.conf.d/. This can be kept in home folder for easier accessibility.

  • Step 6: The contents of xorg.conf are as follows:

Section "Device"
    Identifier  "Configured Video Device"
    Driver      "dummy"

Section "Monitor"
    Identifier  "Configured Monitor"
    HorizSync 31.5-48.5
    VertRefresh 50-70

Section "Screen"
    Identifier  "Default Screen"
    Monitor     "Configured Monitor"
    Device      "Configured Video Device"
    DefaultDepth 24
    SubSection "Display"
    Depth 24
    Modes "1366x768"
  • Step 7: Now all that's required is to run one of those scripts according to the situation (monitor connected or disconnected) and TeamViewer, VNC, AnyDesk, etc will start working fine with any resolution.

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.