0

When I try to launch browser from WSL, it provides the following message:

Command '/usr/bin/x-www-browser' requires the chromium snap to be installed.
Please install it with:

snap install chromium

Running snap install chromium gets me:

error: cannot communicate with server: Post http://localhost/v2/snaps/chromium: dial unix /run/snapd.socket: connect: no such file or directory
4
  • 1
    How are you launching the browser ?
    – harrymc
    Commented Aug 11, 2023 at 16:33
  • For example, gh auth login should open up the browser to allow for GitHub authentication.
    – wrrnlim
    Commented Aug 11, 2023 at 16:50
  • Just for curiosity sake? Why use the browser on that side of the wall? Why not simply use the one that already works? And.. the question is totally fair.. I am just curious about the motive. Commented Aug 11, 2023 at 17:03
  • You must be on Windows 11 for this to work and the distribution must come from the Microsoft Store (which one is yours?). Exit wsl via wsl --shutdown and run wsl --update. Run wsl again and check that the file /etc/wsl.conf contains just 2 lines: [boot] and systemd=true (if not change it and do wsl --shutdown again). Now try snap.
    – harrymc
    Commented Aug 11, 2023 at 19:19

1 Answer 1

0

I was able to fix this by uninstalling chromium:

sudo apt-get purge chromium-browser
rm -rf ~/.config/chromium/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .