3

I'm trying to run a VirtualBox Ubuntu VM via Vagrant on a headless server. The VM has ubuntu-desktop package installed, however when the machine boots up I can't open X applications. DISPLAY environment is empty and setting it to ":0" doesn't help.

I know there is an option to start VirtualBox in non-headless mode (vb.gui = true), however I'm unable to perform vagrant up with that option turned on, unless I connect to the sever with X forwarding turned on (the server I run Vagrant on is headless).

Am I missing something? When I do ssh X tunnelling all the way down to the VM, it works, but then I guess the display will be set by ssh. What I wanted to achieve is a VM that can run x applications on it's internal ":0" screen. I don't need to see them, I need to be able to execute X applications remotely.

1

I've found a very useful thread here based on which I believe I know how to make this working.

It seems like it should be enough to just run Xvfb and then setup the DISPLAY environment variable accordingly before running the X application of interest. A way to check if it's working is to use x11vnc and connect over VNC to the server.

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.