Skip to content

Guide

How to open links in a specific browser profile.

On this page

When you click a link in a mail or chat app, Chrome opens it in the profile whose window you used last. With several accounts, that puts a link for one account into the session of another. Donut Browser can be your system’s default browser and ask which profile opens each link. Scripts can open a URL in a named profile through the local API. You need Donut Browser installed (not the portable Windows build) and at least one profile.

1. Make Donut the default browser

  1. Open Settings (Cmd/Ctrl+,) and go to Default Browser.
  2. Click Set as default browser.

What happens next depends on the system:

SystemWhat Donut does
macOSRegisters itself for http and https links. macOS can ask you to confirm the change.
WindowsRegisters itself and opens Windows Settings. Choose Donut Browser under Web browser to finish. The toast reads “Finish in Windows Settings”.
LinuxRuns xdg-mime default for http and https, so xdg-utils must be installed. In a Snap it uses xdg-settings. The Flatpak build cannot set itself as default and shows instructions instead.

The row then reads “Donut Browser is your default browser”, with an Active chip in place of the button. The portable Windows build has no Default Browser section.

Click a link in any app. Donut comes to the front and shows Open link with the link’s host and path and a copy button.

  • Profiles that are running have a green Running badge, and the first running profile is selected.
  • With 6 profiles or more, a search box finds profiles by name, proxy or VPN name, or group.
  • Each row shows the profile’s operating system, proxy or VPN, and group, and marks password-protected and ephemeral profiles.

Choose the profile and click Open, press Enter, or double-click the row. If the profile runs, the link opens in a new tab of that browser. If it is stopped, Donut launches it with the link. A profile that is starting or stopping cannot take the link until it is done.

Before a stopped profile starts, Donut runs its usual launch checks. A timezone mismatch with the proxy can stop the launch, and the picker then shows an error.

Donut asks every time

Donut has no rule that sends links from one site to one profile. It always shows Open link. There is no command-line flag or donut:// link that picks a profile either: a URL passed to the app opens the same picker.

To open links in one profile without a question, use the API below from a script, a launcher or a keyboard tool.

Open a URL in a profile from a script

POST /v1/profiles/{id}/open-url opens a URL in a profile. If the profile is stopped, Donut launches it with a window. If it runs, the URL opens in a new tab. If the profile runs on a remote machine, that session goes to the URL. The route needs Pro, Team or Enterprise; other plans get 402. Turn on the local API and export the token as DONUT_API_KEY first.

curl -sS -X POST http://127.0.0.1:10108/v1/profiles/<profile id>/open-url \
  -H "Authorization: Bearer $DONUT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://mail.example.com/inbox"}'

Find a profile’s ID in its panel (Overview), in the table’s ID column when the window is wide, or with GET /v1/profiles. A small shell function gives you one command per account:

# ~/.zshrc or ~/.bashrc
open_in() {
  curl -sS -X POST "http://127.0.0.1:10108/v1/profiles/$1/open-url" \
    -H "Authorization: Bearer $DONUT_API_KEY" \
    -H "Content-Type: application/json" \
    -d "{\"url\": \"$2\"}"
}
# open_in <profile id> https://example.com

Only http, https and about:blank addresses are allowed. Unlike a launch from the picker, a launch from the API is not stopped by a timezone mismatch; the app shows a warning instead.

Troubleshooting

ProblemWhat to do
“Could not set the default browser”On Linux, install xdg-utils and try again. On Windows, finish the choice in Windows Settings.
Links still open in another browserDonut is not the default. In Settings → Default Browser, the row reads “Donut Browser is not your default browser”. Set it again.
“This profile is launching. Wait a moment.”The profile is starting. Wait, then open the link again.
“No profiles available. Please create a profile first.”Create a profile in the main window.
402 from open-urlThe route needs Pro, Team or Enterprise.
400 with “Only http and https addresses can be opened.”The URL has another scheme, such as file: or mailto:.
409 from open-urlA teammate has the profile locked, or a remote session of it is still being pulled back.

The link picker is free. Opening URLs by API is part of Pro.

Last updated .