How to setup a virtual display with Ubuntu?

October 15, 2018 3.1k views
Ubuntu Configuration Management Ubuntu 18.04

I am trying to set up a server that goes to a web address, does some actions and takes a screenshot. To do this I have been trying to create a virtual display where I can start up a browser. but I haven’t been able to get it to work. I have tried doing:
sudo apt-get install ubuntu-desktop
sudo apt-get install ubuntu-gnome-desktop
sudo apt-get install gnome-core
and then using xserver-xorg-video-dummy from this answer: but It didn’t work

I am using xrandr to check for the display but just get ‘Can’t open display’.

any suggestions?

1 Answer

Hello, @FloatingVertex

I will recommend you to follow this tutorial in order to access your droplet with GUI:

Let me know if you have any questions.


by finid
by Brian Hogan
In this guide, you'll set up a VNC server on an Ubuntu 18.04 server and connect to it securely through an SSH tunnel.
Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!