Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opens Windows File Explorer instead of browser #267

Closed
1 task done
MartinEmrich opened this issue Mar 2, 2023 · 17 comments
Closed
1 task done

Opens Windows File Explorer instead of browser #267

MartinEmrich opened this issue Mar 2, 2023 · 17 comments
Assignees
Labels
Bug This is either an issue that describes a bug or a PR that resolves a bug Status: Patched This is fixed and is part of a released version. Target: 4.x This is targeted to the 4.x release.

Comments

@MartinEmrich
Copy link

Windows Version

Windows 10

Windows Build Number

19045.2604

WSL Version

WSL 2

Distro Version

Debian (bullseye)

WSL Utilities Version

3.2.4-1 (latest from package repository)

Describe the bug

(Probably) Since the latest WSL update this week, wslview no longer opens the link in the Windows default browser, but it opens a new Windows File Explorer window on the current working directory.

Steps to Reproduce

run e.g. wslview "https://www.google.com"

Expected behavior

I expect a new tab in Edge opening Google.

Additional context

$ wsl.exe --version
WSL-Version: 1.1.3.0
Kernelversion: 5.15.90.1
WSLg-Version: 1.0.49
MSRDC-Version: 1.2.3770
Direct3D-Version: 1.608.2-61064218
DXCore-Version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows Version: 10.0.19045.2604

Code of Conduct

  • I agree to follow this project's Code of Conduct
@MartinEmrich MartinEmrich added the Bug This is either an issue that describes a bug or a PR that resolves a bug label Mar 2, 2023
@xpeoh
Copy link

xpeoh commented Mar 6, 2023

We are seeing this issue as well.

@lithammer
Copy link

Manually updating to 4.4.1 solved the issue for me. It's a bit unfortunate that the Debian package is still on 3.2.4. So I added the Ubuntu PPA which less than ideal, but solved the problem.

@MartinEmrich
Copy link
Author

Yes, installing from source worked here, too.

@Physikbuddha
Copy link

Physikbuddha commented Mar 6, 2023

Another dev and I are experiencing the same issue. Yet another developer reported that he can open URLs just fine.
All of us are using Windows 10.

However, we noticed that the "broken" systems are using Debian on WSL2, while the working installation is running Ubuntu instead.

It might help if you report which Linux distribution you are using.

EDIT: Didn't read the comment by @lithammer yet. Haven't tried manually updating yet. Will report.

@xpeoh
Copy link

xpeoh commented Mar 6, 2023

We're using Debian on WSL2.

@MartinEmrich
Copy link
Author

Debian (bullseye)

@patrick330602
Copy link
Member

Thank you for the report. Will try to look into it this weekend.

@patrick330602 patrick330602 added the Target: 4.x This is targeted to the 4.x release. label Mar 6, 2023
@karlcloudy
Copy link

karlcloudy commented Mar 13, 2023

This is also not working on openSUSE Tumbleweed - that said, the version available on the repo there is also only 3.2.4, so I suspect this is why I have the issue as well.

$ zypper up wslu
Loading repository data...
Reading installed packages...
No update candidate for 'wslu-3.2.4-26.12.noarch'. The highest available version is already installed.
Resolving package dependencies...
Nothing to do.

@GeorgeGomez
Copy link

GeorgeGomez commented Mar 14, 2023

I am using WSL with Ubuntu and the identical WSL versions as the OP and also experiencing File Explorer opening up instead of Chrome, my default browser.

I do have 2 Ubuntu distributions, I will call them OG (working) and New (bug), here are the wslview versions FYI:

OG version : wslu v2.3.6; wslview v06 (working like a champ)
Ubuntu version: Ubuntu 20.04.5 LTS 20.04

New version: wslu v3.2.4-1; wslview v10 (opening up file explorer)
Ubuntu version: Ubuntu 22.04.2 LTS 20.04

edit #1 I added the Ubuntu versions as well because they are different and facts and details matter.

edit #2 Running these commands solved my issue as it took me to version 4.4.1 via the package manager!

sudo add-apt-repository ppa:wslutilities/wslu
sudo apt update
sudo apt install wslu

@HenrikStanley
Copy link

HenrikStanley commented Mar 19, 2023

I am seeing the same issue using ArchLinux.
When looking into the https://pkg.wslutiliti.es/arch/ the newest version is 3.2.4-0 which does match the challenge of having the issue while not on the v4.x

Edit:
Manually building newest version from git solves the issue.
Any way to assist making a workflow or similar to keep the https://pkg.wslutiliti.es/arch updated?

@patrick330602 patrick330602 added the Status: In Progress This is being worked on and not ready. label Mar 20, 2023
@patrick330602
Copy link
Member

Sorry for late updates. As people point out, multiple packages are still using old releases. I am right now upgrading all the rest of the packages to the latest version, and currently Arch Linux is completed. I will update once the rest of them are updated.

@patrick330602
Copy link
Member

@karlcloudy I just notice there are problems with OpenSUSE Build Service. Please delete the old repository:

sudo zypper repos #list repos and find the corresponding Alias/#
sudo zypper rr <Alias/#>

And then add the new one:

sudo zypper addrepo https://copr.fedorainfracloud.org/coprs/wslutilities/wslu/repo/opensuse-tumbleweed/wslutilities-wslu-opensuse-tumbleweed.repo
sudo zypper up
sudo zypper in wslu

@patrick330602
Copy link
Member

debian buster and bullseye completed update to wslu 4.1.1.

@patrick330602 patrick330602 added Status: Patched This is fixed and is part of a released version. and removed Status: In Progress This is being worked on and not ready. labels Mar 20, 2023
@patrick330602
Copy link
Member

I will close this for now, if you still have issue, I will re-open this

@sirianni
Copy link

sirianni commented Nov 30, 2023

Thanks @patrick330602! I am seeing a similar issue on 4.1.1 but it only happens for certain applications.
For example, with the gh CLI

gh pr open --web

opens up an Explorer window instead of a browser.

However,

gh browse

opens up a browser as expected.

When I run wslview http://github.com it works correctly.

So it seems to have something to do with the URL that's being passed...? Or maybe a mime type issue? I haven't yet dug into the gh CLI source code to see what's happening differently here. It's likely a different problem but I'd appreciate any pointers you have on debugging this!

@crramirez
Copy link
Contributor

crramirez commented Dec 1, 2023 via email

@sirianni
Copy link

sirianni commented Dec 1, 2023

Thanks for the suggestion! I did that and discovered that wslview isn't even being invoked on this path. It turns out that the GH CLI is using xdg-open if installed as priority. xdg-open is delegating to explorer.exe which seems to get confused on certain URL paths 🤷 .

I fixed the gh CLI by

export BROWSER=wslview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is either an issue that describes a bug or a PR that resolves a bug Status: Patched This is fixed and is part of a released version. Target: 4.x This is targeted to the 4.x release.
Projects
None yet
Development

No branches or pull requests

10 participants