4

I am using subsystem Ubuntu under windows10.

I have already installed vscode, but when I want to open it, there was a problem.

I can't find this file, it likes not to exist.

How can I solve this?

MatsK
  • 916
Estelle
  • 41
  • 1
  • 1
  • 4

3 Answers3

5

I've got vscode running under the newer wsl2 on ubuntu, but I'm not sure if its advisable - vscode seems to be pushing you to run vscode in windows and use a wsl2 in a terminal tab.

Also vscode started the windows is a bit 'soft' i.e. fuzzy.

If you really want to give it a try then you'll need to install the dependencies. The line below is actually the dependencies for 'xclock' which is a simpler app to test whether your X11/DISPLAY is set up

sudo apt install --assume-yes libx11-xcb1 libasound2 x11-apps libice6 libsm6 libxaw7 libxft2 libxmu6 libxpm4 libxt6 x11-apps xbitmaps

vscode certainly requires the 'libx11-xcb1 libasound2' dependencies above.

You'll also need an X11 server running e.g. you'll need to install and start: https://sourceforge.net/projects/vcxsrv/

There are a few gotchas - e.g. X11 security (if you are very naughty, you can disable this when starting xcxsrv) and also remember to set the

export DISPLAY=<your windows ip>:0

in wsl2 and then run your app e.g. xclock

I think I read somewhere that wsl2 does not yet share the same network stack so localhost in windows is not the same as localhost in wsl2 this means that 'export DISPLAY :0' doesn't work and you have to put your windows ip before :

Some further details here: https://www.youtube.com/watch?v=IZSYi8bivxA

owennewo
  • 169
0

you need

sudo apt install x11-common
0

Run:

sudo apt install chromium-browser -y
Eliah Kagan
  • 117,780
  • 2
    OP has a problem in opening vscode. Please specify the reason to install chromium-browser and how it will solve the problem. – Tejas Lotlikar Jan 01 '20 at 06:08
  • 1
    @SławomirSiudek Is the reason this worked for solving a problem with VS Code due to dependencies of the chromium-browser package that were installed along with it? – Eliah Kagan Jan 01 '20 at 06:21