-- Leo's gemini proxy

-- Connecting to hyperborea.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-US

🌐 Tell (most) Linux Web Browsers to open Gemini links with your favorite client


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?


Configure your default gemini: handler


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:

amfora.desktop

Kristall.desktop

fi.skyjake.Lagrange.desktop


Depending on how you installed it, it might be in any of several places

/usr/share/applications (systemwide)

/var/lib/flatpak/exports/share/applications (Flatpak)

~/.local/share/applications (specific to your login)


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


Allow specific websites to open gemini links


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

Related: Add a Gemini filetype to Gnome

More Tips

Fediverse: KelsonV@Wandering.shop

-- Response ended

-- Page fetched on Fri May 17 10:18:21 2024