Support xdg-open / open with browser for SSH terminals #18814

Open
opened 2026-01-31 06:25:13 +00:00 by claunia · 0 comments
Owner

Originally created by @misterjoshua on GitHub (Nov 3, 2022).

Description of the new feature/enhancement

I want Windows Terminal to support opening a browser over SSH as VS Code does. This is useful for tools that want the user to open a browser to a given website, such as for authorizing a device or authenticating via SSO.

For instance, we use Granted to access our cloud accounts. Granted comes with a tool called assume that helps get access credentials. After running assume, the tool takes me to a device authorization endpoint and my company's SSO where I can authorize the session via my desktop browser. After authorizing by browser, the tool completes the device authorization process and I am logged into the cloud with short-lived credentials.

Example

In Windows Terminal, I get the error output shown and I need to ctrl-click to open the URL:

image

But in VS Code, the browser opens on my desktop right away, saving me some time:

image

The tool above uses FreeDesktop's well-known xdg-open tool. When I run xdg-open manually, I get substantially similar error messages:

image

But the tool works fine in VS Code:

image

Proposed technical implementation details (optional)

I'm not sure how this would be implemented in Windows Terminal, but I suspect that you could look at how VS Code is doing it for some hints on how this could work.

Originally created by @misterjoshua on GitHub (Nov 3, 2022). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement I want Windows Terminal to support opening a browser over SSH as VS Code does. This is useful for tools that want the user to open a browser to a given website, such as for authorizing a device or authenticating via SSO. For instance, we use [Granted](https://granted.dev/) to access our cloud accounts. Granted comes with a tool called `assume` that helps get access credentials. After running `assume`, the tool takes me to a device authorization endpoint and my company's SSO where I can authorize the session via my desktop browser. After authorizing by browser, the tool completes the device authorization process and I am logged into the cloud with short-lived credentials. **Example** In Windows Terminal, I get the error output shown and I need to ctrl-click to open the URL: ![image](https://user-images.githubusercontent.com/644092/199789860-4b71e1c3-543e-42ca-8b4f-291711401a83.png) But in VS Code, the browser opens on my desktop right away, saving me some time: ![image](https://user-images.githubusercontent.com/644092/199790071-2ad10925-b03f-4c4c-b8f8-dbd21e67614c.png) The tool above uses FreeDesktop's well-known `xdg-open` tool. When I run xdg-open manually, I get substantially similar error messages: ![image](https://user-images.githubusercontent.com/644092/199790400-95c06561-13d1-42ca-ba06-39a3f88aab05.png) But the tool works fine in VS Code: ![image](https://user-images.githubusercontent.com/644092/199790490-7822ed73-2aeb-4ecd-9368-b9999c9f4ec4.png) <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # Proposed technical implementation details (optional) I'm not sure how this would be implemented in Windows Terminal, but I suspect that you could look at how VS Code is doing it for some hints on how this could work. <!-- A clear and concise description of what you want to happen. -->
claunia added the Issue-FeatureNeeds-Tag-FixProduct-TerminalArea-Extensibility labels 2026-01-31 06:25:14 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18814