💾 Archived View for hyperborea.org › howto › follow-gemini-links-from-web-linux.gmi captured on 2021-12-04 at 18:04:22. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-12-03)
-=-=-=-=-=-=-
There's Gemini space, and there's the web. It's easy enough to follow links from Gemini to a website because all modern devices know what http and https are, and how to launch a web browser, but what about the other way around?
Most web browsers on Linux will use xdg-open to open unfamiliar link types. Chromium, Epiphany, Ephemeral, Konqueror, Chrome, etc. If you've installed a Gemini client using a package or installer, it might already be able to send those clicks over.
Firefox works a bit differently.
But what if XDG doesn't know which applications can open gemini links? Or if you have several Gemini clients, but it's opening the wrong one?
1. Check the settings by typing this:
xdg-settings get default-url-scheme-handler gemini
If there's a handler configured, you'll see a response like Kristall.desktop. If there isn't one, it'll exit without output.
2. Find the name of the .desktop file for the Gemini client you want to use. It might be:
Depending on how you installed it, it might be in any of several places
If you didn't install through a package or install script, you might need to track down the .desktop file and set it up properly.
How to set up the .desktop file for a Gemini client
3. Set a new default by typing this (adjusted for the filename you found):
xdg-settings set default-url-scheme-handler gemini fi.skyjake.Lagrange.desktop
On some browsers, opening protocols in another application is a per-website permission (like allowing location access). The first time you click on a gemini link from a website, you'll see a confirmation dialog asking if you want to allow that site to open gemini links in Lagrange (or whatever client you've chosen), with a checkbox to always allow that site.
Screencap of confirmation dialog box in Chromium/Chrome
Open xdg-open?
https://www.hyperborea.org wants to open this application.
✔️ Always allow www.hyperborea.org to open links of this type in the associated app
[Cancel] [Open xdg-open]
—Kelson Vibber, 2021-06-16
Related: Tell Firefox to open Gemini links with your favorite client