User default browser when opening file:/// URLs of HTML pages #21079

Closed
opened 2026-01-31 07:32:32 +00:00 by claunia · 2 comments
Owner

Originally created by @Vampire on GitHub (Jan 9, 2024).

Windows Terminal version

1.18.3181.0

Windows build number

10.0.19045.3693

Steps to reproduce

Ctrl+Click a file:/// URL that points to an HTML page

Expected Behavior

file:/// URLs of HTML pages should be launched in the default browser, not some other

Actual Behavior

If you have an http:// URL, the default browser is properly launched.
But if you have a file:/// URL, a different browser is launched.
If you for example run a Gradle build with failing tests, you get a file:/// URL pointing at the test report HTML.
Opening this starts not the default browser, but a different browser.

Originally created by @Vampire on GitHub (Jan 9, 2024). ### Windows Terminal version 1.18.3181.0 ### Windows build number 10.0.19045.3693 ### Steps to reproduce Ctrl+Click a file:/// URL that points to an HTML page ### Expected Behavior file:/// URLs of HTML pages should be launched in the default browser, not some other ### Actual Behavior If you have an http:// URL, the default browser is properly launched. But if you have a file:/// URL, a different browser is launched. If you for example run a Gradle build with failing tests, you get a file:/// URL pointing at the test report HTML. Opening this starts not the default browser, but a different browser.
claunia added the Needs-TriageIssue-Bug labels 2026-01-31 07:32:33 +00:00
Author
Owner

@DHowett commented on GitHub (Jan 9, 2024):

Thanks for filing!

Terminal just tells the desktop shell to open the file. Because it points at a file, it will use the file handler associated with .html files. It will not use the default handler for http and https URLs, because it is not one of those.

You can configure the default handler for .html files in Settings. Search for "choose a default app for each type of file".

image

@DHowett commented on GitHub (Jan 9, 2024): Thanks for filing! Terminal just tells the desktop shell to open the file. Because it points at a _file_, it will use the _file handler_ associated with `.html` files. It will _not_ use the default handler for `http` and `https` URLs, because it is not one of those. You can configure the default handler for `.html` files in Settings. Search for "choose a default app for each type of file". ![image](https://github.com/microsoft/terminal/assets/189190/c3fdbc7c-56cc-43d8-8ba9-8fab7e19d713)
Author
Owner

@Vampire commented on GitHub (Jan 10, 2024):

Oh, thanks, you are fully right, sorry.
Unfortunately, the BrowserSelector App is not selectable there, but I guess its author needs to do something for that.

@Vampire commented on GitHub (Jan 10, 2024): Oh, thanks, you are fully right, sorry. Unfortunately, the BrowserSelector App is not selectable there, but I guess its author needs to do something for that.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21079