GWSL-Source icon indicating copy to clipboard operation
GWSL-Source copied to clipboard

Add easy way to configure to use wslview to use the Hosts Browser in GWSL Distro Tools.

Open LiamKarlMitchell opened this issue 3 years ago • 0 comments
trafficstars

Things I tried:

export the BROWSER variable in bashrc or zshrc.

Use default host browser

export BROWSER=wslview

Running xdg-settings get default-web-browser

Shows me firefox.desktop

After running this. And selecting wslview

It did not update for xdg. Neither did this.

But after I removed the BROWSER export and I ran the command to set default it worked.

Was able to test on an xdg app by running

xdg-open https://github.com

This app comes from the xdg-utils package.

Solution: Create the wslview.desktop according to: https://github.com/wslutilities/wslu/issues/214

xdg-settings set default-web-browser wslview.desktop
update-alternatives --config x-www-browser

But I'm not sure if this also sets it for other potential usages of opening URL in default browser.

LiamKarlMitchell avatar Mar 28 '22 21:03 LiamKarlMitchell