Gopher, Gemini, and the rise of the small Internet

Linux Gemini Clients

Jaakko Keränen's Lagrange [14] is a highly polished GUI Gemini client. One minor warning: On high-resolution screens, Lagrange's user interface will be unusably small. Fortunately, there is a preference item under Window called UI scale factor that works perfectly, although the program needs to be restarted before it takes effect.

There was only one other tiny glitch: I have my Caps Lock key mapped as a second control key, which works in every other application, but is not recognized in Lagrange. However, there is an easy-to-use preference item for remapping the keyboard shortcuts, and with this it only took a few seconds to fix this glitch for most shortcuts. Regrettably, certain others can not be remapped; so I still need to use the pointing device to enter an address, for example.

Lagrange embeds images linked from a page into the display, rather than opening a new window. An important part of the Gemini protocol is that the clients will not make network requests that are not manually initiated by the user, so normally the reader will click on each image of interest. However, Lagrange offers a preference setting that loads images when they are scrolled into view, reproducing an experience more like a conventional web browser. With this setting selected, images are inlined when scrolling with the arrow key or the spacebar, but the user can use the scrollbar to scroll without triggering image loading. This is another example of Lagrange's pleasant and well thought out user experience. Lagrange can also embed an audio player in the displayed page.

Lagrange can display a navigable outline of the page in a sidebar, but it requires the mouse to jump between page sections. The two sidebars can also display other information, such as bookmarks, history, and TLS client certificates. This mature browser also lets you search for text on the page. It is quite configurable through its preferences dialog, allowing the user to choose or reject smooth scrolling and set many aspects of the appearance and user interface. It has tabs as well.

Lagrange has keyboard navigation that works like link hinting in Vimperator and similar systems, but it is even easier to use. It caches recent pages, so going back and forth is instantaneous.

In Figure 5, you can see (both) results displayed in Lagrange from a search for "cornea" using GUS. The rendering shows most of the common elements that a user may encounter on a Gemini page: regular text, two different levels of headings, links both within the server and to pages on other servers, and a quotation. It is up to the client to decide how to display these various elements. Lagrange distinguishes server-local and remote links with a triangle or a globe, shows link destinations when hovering, shows you what links you have visited by coloring them differently, displays link hints when hitting F that replace the triangle or globe symbols, and has special formatting for quotations.

Figure 5: The results from searching "cornea" in the Gemini Universal Search, as shown in the Lagrange Gemini browser.

Let's take a look now at the markup language used by Gemini. The source for the page in Figure  5 is shown in Listing 1. Readers familiar with Markdown will recognize the inspiration for the syntax, but this markup format, called "Gemtext," has some important differences from Markdown and from HTML.

The most unusual aspect to Gemtext markup is that it is based on single lines, with each line possessing one type. Paragraphs of normal text exist as single long lines, wrapped by the client for display. The longer lines are wrapped here to fit the format of the page. The other major line types are signalled by the characters at the start of the line. Headers are indicated by # characters, links by =>, and quotations by >. By design, links are on their own lines and can not be intermixed with text, as mentioned above. Gemtext therefore is deliberately designed to not be a full hypertext format.

The line-oriented specification has two purposes: to create a well-structured, organized document, and to make it as easy as possible to write parsers for the format, making it more likely that clients will proliferate. It is possible to write a Gemini client in under 100 lines of code in a high-level language like Python.

Amfora [15] is a browser exclusively for Gemini, like Lagrange, but running in the terminal rather than in a GUI. It is distributed as a simple binary for Linux, all BSDs, macOS, and Windows, as well as, of course, source code. Since Amfora is navigated solely through the keyboard, some form of link hinting is required. As shown in Figure 6, Amfora supplies numerals beside each link in the document display. To follow a single-digit hint, the user need merely type the digit; to disambiguate multiple-digit hints, hitting the spacebar takes the user to the address area at the bottom. This system of navigation is quick and efficient. Amfora does not display images inline, as might be expected. Selecting an image will give the user a choice to download it or display it in the default external application. Amfora has tabs, handled neatly in the text interface, as shown in Figure 7. I could find no way to search within a page, however, which is a serious omission.

Figure 6: Information about Project Gemini, displayed in the Amfora Gemini browser.
Figure 7: The Amfora browser, which runs in the terminal, offers some interesting features, including the tabs shown here.

In my trial of Amfora, I found that it had no problem following links and quickly navigating backward and forward, but that there was an issue in handling forms, as queries to the GUS search engine became stuck and never returned results. This was not a problem with the server, as identical queries at the same time from Lagrange returned results almost instantly. However, the problem only exists when trying to use the dialog box that pops up when querying GUS through its search link. If you enter Amfora's command area by hitting the spacebar, you can enter search terms there, and pressing the return key sends them directly to GUS as URL parameters and quickly displays the returned results.

Finally, if you would like to browse Geminispace content without installing one of the small Internet browsers, there is a portal for the WWW [16] that works in a normal web client.

Combined Clients

Several clients exist that can handle both Gopher and Gemini (and sometimes Finger, as well).

One of these is called Bombadillo [17], a terminal program that can handle all three protocols, plus local files. Bombadillo can be compiled from source on any Unix-like operating system if you have a Go compiler installed, and there are precompiled binaries available for several processor architectures on Linux and for macOS.

Figure 8 shows how Bombadillo renders the GUS search results page that we saw Lagrange handling above. It uses numerals for navigation, using the same system as Amfora for following links with either one digit or more. Unlike Amfora, Bombadillo does not color links, and, as Figure 8 shows, does not break lines correctly, splitting words at arbitrary places. Also unlike Amfora, Bombadillo handled the query to the search engine with no problem, using a one-line command area at the bottom of the window to accept the search terms. Like the other clients reviewed here, Bombadillo has back and forward navigation and a way to save the user's bookmarks. Operation is quick and painless.

Figure 8: Bombadillo's rendering of a GUS search results page.

Another graphical client supporting Gemini, Gopher, and Finger is called Castor [18]. It is written in Rust using the GTK GUI library.

Have Fun!

The new phenomenon of the "small Internet" is still not a place to go for serious research. But it is, today, an interesting place to explore. After the cacophony of the modern web, browsing through Gopher or Gemini land feels like a quiet stroll on a remote beach, where you might just find the occasional beautiful shell lying on the sand.

There are good reasons to expect Gemini, in particular, to evolve into a viable alternative to the modern web. For now, I intend to keep a couple of small Internet browsers installed and visit the beach on occasion.

Infos

  1. "25 Years of Linux" by Brian Proffitt, Red Hat Blog, 2016: https://www.redhat.com/en/blog/25-years-linux
  2. WAIS: https://www.ou.edu/research/electron/internet/wais-faq.htm
  3. "The Rise and Fall of Thinking Machines" by Gary A. Taubes, Inc.com, 2020: https://www.inc.com/magazine/19950915/2622.html
  4. "Why Is Gopher Still Relevant?" by Cameron Kaiser: https://gopher.floodgap.com/overbite/relevance.html
  5. "W3 vs. WAIS and Gopher" by Tim Berners-Lee, W3.org, 1992: https://www.w3.org/History/1992/WWW/FAQ/WAISandGopher.html
  6. "30 Years On, What's Next #ForTheWeb": https://webfoundation.org/2019/03/web-birthday-30/
  7. Contract for the Web: https://contractfortheweb.org/
  8. "The Web May Have Won, but Gopher Tunnels On" by Nate Anderson, Ars Technica, 2009: https://arstechnica.com/tech-policy/2009/11/the-web-may-have-won-but-gopher-tunnels-on/
  9. Project Gemini: https://gemini.circumlunar.space/
  10. Gemini protocol specification: https://gemini.circumlunar.space/docs/specification.html
  11. VF-1 command line Gopher client: https://github.com/solderpunk/VF-1
  12. phetch: https://github.com/xvxx/phetch/releases/tag/v1.0.0
  13. FORG on GitHub: https://github.com/Tom4hawk/FORG
  14. Lagrange Gemini client: https://git.skyjake.fi/skyjake/lagrange
  15. Amfora terminal browser for Gemini: https://github.com/makeworld-the-better-one/amfora
  16. Gemini portal: https://portal.mozz.us/gemini/gemini.circumlunar.space/
  17. Bombadillo: https://bombadillo.colorfield.space/
  18. Castor browser for Gemini, Gopher, and Finger: https://sr.ht/julienxx/Castor/

The Author

Dr. Lee Phillips is a theoretical physicist and writer who has worked on projects for the Navy, NASA, and DOE on laser fusion, fluid flow, plasma physics, and scientific computation. He has written numerous popular science and computing articles, as well as technical publications, and he is engaged in science education and outreach.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Gemini Protocol

    Create Gemini pages to show sensor data or control a Raspberry Pi rover.

  • Introduction

    This month in Linux Voice.

  • FOSSPicks

    After watching Ubuntu help NASA with its first controlled flight on another planet, Graham spent far too much time this month visiting Mars in Elite Dangerous, via Proton on Linux.

  • FOSSPicks

    There's a collective groan in Graham's household whenever he gets a new device and finds a terminal prompt. The latest victim to his nmap skills is an LG OLED television!

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News