Skip to content

Commit 0d360ac

Browse files
authored
Merge pull request #529 from mjcheetham/wslview
Use wslview to launch browser in Windows from WSL
2 parents f571150 + f082f2e commit 0d360ac

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/shared/Core/BrowserUtils.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ public static void OpenDefaultBrowser(IEnvironment environment, Uri uri)
3939
//
4040
// We try and use the same 'shell execute' utilities as the Framework does,
4141
// searching for them in the same order until we find one.
42-
foreach (string shellExec in new[] {"xdg-open", "gnome-open", "kfmclient"})
42+
//
43+
// One additional 'shell execute' utility we also attempt to use is `wslview`
44+
// that is commonly found on WSL (Windows Subsystem for Linux) distributions that
45+
// opens the browser on the Windows host.
46+
foreach (string shellExec in new[] {"xdg-open", "gnome-open", "kfmclient", "wslview"})
4347
{
4448
if (environment.TryLocateExecutable(shellExec, out string shellExecPath))
4549
{

0 commit comments

Comments
 (0)