The integration between the Windows Subsystem for Linux (aka WSL) and Windows works spectacularly most of the time, but occasionally things get a little troublesome. One such case was a change in browser behaviour that I noticed recently after upgrading to a new laptop.
On my old machine, I had an Ubuntu environment running under WSL2 and any time a browser was needed, it would open in the Windows environment. One common scenario was authentication, running az login
when working with Azure.
After upgrading to my new laptop, I kept getting errors from xdg-open
that indicated it was unable to open a browser.
A temporary workaround was to use --use-device-code
with az login
, but that wasn’t a satisfactory solution because I never remembered to use it first time.
It turns out the package wslu
was pre-installed on earlier Ubuntu builds, but is not on the latest versions. Installing wslu
via sudo apt install wslu
fixed the issue.
One of the interesting things I found while investigating the problem was this post from one of the authors of Azure CLI authentication.
Comments
blog comments powered by Disqus