0

I am running Xenial Ubuntu in Windows 10 subsystem linux system. I need to install xvfb-run but I can not because it is not in the repo. I guess I need to upgrade Ubuntu, but do-release-upgrade finds no new versions.

How can I get xvfb-run running on my Xenial Ubuntu in WSL?

dman
  • 103
  • 3
  • 15
  • 3
    You don't. WSL doesn't come with the same X layers as a full Ubuntu version. There's also no newer WSL than 16.04. If I may ask, why do you need xvfb-run? – Thomas Ward Feb 13 '18 at 00:02
  • I am a front end developer. I need to run E2E tests. I need xvfb-run so I can run the browser headless. I haven't found a away for the WSL to access the GUI Windows chrome. – dman Feb 13 '18 at 00:04
  • You can always drop WSL and install normal Ubuntu to VM or alongside Windows or instead of Windows. – N0rbert Feb 13 '18 at 00:12
  • 1
    In WSL the command is sudo apt install xvfb – Terrance Feb 13 '18 at 00:14
  • I get connection failed... I think the repos are to old – dman Feb 13 '18 at 00:16
  • I can't tell ya. They could be. Try running sudo apt update first. I just installed it on mine and I get the xvfb-run command. – Terrance Feb 13 '18 at 00:16
  • I did, no success – dman Feb 13 '18 at 00:17
  • 1
    You might have a different problem then if you are getting connection failed. Can you run ping www.google.com? – Terrance Feb 13 '18 at 00:18
  • You might want to take a look at https://github.com/Microsoft/WSL/issues/761 as it could be an Anti-Virus blocking the internet or maybe a firewall issue. Just some suggestions. – Terrance Feb 13 '18 at 00:22
  • 2
    @dman it's currently not possible either way. (https://github.com/Microsoft/WSL/issues/2356). The closest you could get is to run XMing and try and SSH to the WSL layer, and use that to run X apps through X Server via XMing or something. Direct GUI applications in WSL isn't a high priority based on that bug. However, xvfb-run directly in WSL won't help. I would suggest you use an Ubuntu VM though, to do E2E tests and front-end devlopment tests, rather than try to use WSL to get a 'linux' version of a web browser to do testing. – Thomas Ward Feb 13 '18 at 01:36
  • 1
    @ThomasWard You CAN run any docker image on WSL - https://github.com/RoliSoft/WSL-Distribution-Switcher . Many of the docker images are fairly minimal and may need to be configured, and I have tried many, but all the ones I tried are working. Running graphical apps, however, is limited with variable degrees of success. – Panther Feb 13 '18 at 09:19
  • @Panther docker images roll their own X though, and sorta bypass that. I wasnt talking about docker images, we were talking about xvfb-run which is part of a directly run X Server within Linux... – Thomas Ward Feb 13 '18 at 12:48
  • 1
    @ThomasWard - I understand about X, or wayland as the case may be, I was replying to your comment that your comment "There's also no newer WSL than 16.04. " . That is simply not the case, you can run Ubuntu all the way up to 17.10 if you so desire , see the link I gave you. – Panther Feb 13 '18 at 15:14

0 Answers0