Skip to content
This repository has been archived by the owner on Sep 29, 2020. It is now read-only.

docker login azure @ WSL2: xdg-open executable file not found in $PATH #20

Closed
stefando opened this issue Jul 13, 2020 · 1 comment · Fixed by docker-archive/compose-cli#438
Assignees
Labels
bug Something isn't working

Comments

@stefando
Copy link

I am not able to login to azure from WSL2:

docker login azure
exec: "xdg-open": executable file not found in $PATH

Client: Docker Engine - Community
Azure integration 0.1.7
Version: 19.03.12

Docker Desktop Community
Version: 2.3.3.1 (46608)
Channel: edge

@rumpl rumpl added the bug Something isn't working label Jul 13, 2020
@metcalfc
Copy link

metcalfc commented Jul 17, 2020

Thanks for this. We'll figure out something native. In the meanwhile one workaround is to use the very nice: https://github.com/4U6U57/wsl-open. Its basically a bash script that can use/mimic xdg-open.

As always you should read the script just to make sure you trust what its going to be doing: https://github.com/4U6U57/wsl-open/blob/master/wsl-open.sh

# Make a bin folder in your home directory
mkdir ~/bin

# Add the bin folder to your PATH in your bashrc
echo '[[ -e ~/bin ]] && PATH=$PATH:~/bin' >> .bashrc

# Download the script to a file named 'wsl-open'
curl -o ~/bin/wsl-open https://raw.githubusercontent.com/4U6U57/wsl-open/master/wsl-open.sh

Now you have two options. Easy or Linux. The easy way is to link ~/bin/xdg-open to ~/bin/wsl-open. This worked for me for a long time. The better way that is more work and takes more space is to actually install the packages that include xdg-open. In Ubuntu that looks like:

sudo apt-get install -y xdg-utils

# now register browser links with wsl-open
wsl-open -w

Hopefully that unblocks you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants