Repository navigation
Links From Other Apps
Any application can hand a link to LinkUnbound through its own address, linkunbound://, even when LinkUnbound is not the default browser. The link goes through the same rules and the same picker as a click.
It's meant for developers who want their app to respect the user's browser choices, and for power users with scripts, launchers or automation tools.
linkunbound://open?url=<the whole link, encoded as one component>
For example, to open https://example.com/a?b=1:
linkunbound://open?url=https%3A%2F%2Fexample.com%2Fa%3Fb%3D1
The link must be encoded as a single component: every :, /, ?, &, =, #, % and + has to be escaped. An unescaped & or # cuts the link short, and an unescaped + arrives as a space.
| Language | How |
|---|---|
| JavaScript | "linkunbound://open?url=" + encodeURIComponent(link) |
| Rust |
utf8_percent_encode(link, NON_ALPHANUMERIC) from the percent-encoding crate |
| Python | "linkunbound://open?url=" + urllib.parse.quote(link, safe="") |
From a terminal:
# Windows
Start-Process "linkunbound://open?url=https%3A%2F%2Fexample.com"# macOS
open "linkunbound://open?url=https%3A%2F%2Fexample.com"- Only
httpandhttpslinks. A file, a script,javascript:or anything else is dropped before it's shown or opened. - Nothing is sent back. The application that sent the link can't learn which browser opened it, whether a rule decided, or what the rules are. It can't tell whether the user cancelled either.
- The address is held in memory while it's routed, like any other link. See Privacy.
Ask the system whether the scheme exists before using it, and open the plain link when nothing answers.
Windows: call AssocQueryStringW(ASSOCF_IS_PROTOCOL, …, L"linkunbound", L"open", …) twice:
- with
ASSOCSTR_EXECUTABLE, which answers for the downloaded copy; - with
ASSOCSTR_APPID, which answers for the Microsoft Store copy, since it has no executable to name.
If the answer is OpenWith.exe, treat it as not installed: that's Windows offering to choose an app.
macOS: NSWorkspace.shared.urlForApplication(toOpen: URL(string: "linkunbound:")!) is not nil while the app is installed.
- The scheme is registered by the installer on Windows, and declared by the app itself on a Mac, so it goes away when LinkUnbound is uninstalled. Remove LinkUnbound from Windows in Settings › Maintenance removes it too.
- The origin shown in the picker is still the app that was in front, as for any link.
LinkUnbound — libre, de código abierto y local · free, open source and local. Repositorio · Repository · Versiones · Releases · Reportes · Issues
Español
Para empezar
Usarlo a diario
Tus datos y tu copia
Ayuda
English
Getting started
Everyday use
Your data and your copy
Help