Handing off gemini protocol links from the browser


CW: windows


You're on windows and want the browser to hand off gemini: links to a gemini client.


Lagrange mentions this in the help section:

On macOS and Windows, Lagrange registers itself as a "gemini:" URL scheme handler, so you can click on Gemini links in any application to open Lagrange with that URL.


I used the portable version and this doesn't seem to happen.

I don't know about other clients.


Use regedit to create a gemini protocol handler - this is a .reg file that failed when I tried it, but has all the strings you need to create it manually:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\gemini]
@="URL:gemini Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\gemini\shell]

[HKEY_CLASSES_ROOT\gemini\shell\open]

[HKEY_CLASSES_ROOT\gemini\shell\open\command]
@="\"F:\PortableApps\lagrange\lagrange.exe\" \"%1\""

See this series of images to get a clearer idea of the set up:

create HKEY_CLASSES_ROOT\gemini as illustrated

subkey shell

subkey open

subkey command with "path\to\client\prog.exe" "%1"


Running agate and visiting gemini://localhost in the html browser brings up index.gmi on lagrange.


Likewise, clicking on the photos link on this web page brings up photos.gmi in lagrange

<!DOCTYPE html>
<html>
<head>
  <title="gemini test" />
</head>
<body>
    <a href="gemini://localhost/photos.gmi">photos</a>
</body>
</html>

I got the idea from here:

https://support.shotgunsoftware.com/hc/en-us/articles/219031308-Launching-Applications-Using-Custom-Browser-Protocols

which also gives details for mac and linux.


out of date micro~s documentation here:

https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa767914(v=vs.85)



back to index



/gemlog/