0

I have a Ubuntu VM on VirtualBox running in headless mode. Host is a Windows 10 machine. I want to be able to render Ubuntu's applications on Windows using XServer.

Currently, I tried this:

  • Installed X410 XServer on Windows.
  • ssh into Virtual Machine with a -X option so that X forwarding is enabled.
  • If I run a graphical application from command line now, it complains that cannot connect XServer. My DISPLAY env variable is localhost:10.0.

Below is error I get on launching the graphical application:

connect /tmp/.X11-unix/X0: No such file or directory Unable to init  
server: Could not connect: Connection refused Failed to parse  
arguments: Cannot open display:
0

You need to enter the IP of the host machine, not localhost. And also check what is the display number for your X server. The command should be:

export DISPLAY=<host IP>:<host display>.0 
  • I am using NAT networking so both have the same hostname. Do I need to setup port forwarding instead? How can I find out display number for my X server? I think it is 0 but I am not sure. – Bhopesh Bassi Feb 14 at 20:45
  • You did the forward (by using -X in ssh – Romeo Ninov Feb 14 at 20:46
  • Oh yeah!! Sorry about that. Can you please respond to other questions? – Bhopesh Bassi Feb 14 at 22:49

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.