gemini, gopher, SDF part 2
This is part two of a series on gemini and gopher. In part one I mentioned Lagrange, an iOS client that has helped me explore geminispace, and an excellent series of articles by Brennan on gemini.
One note: I’m using lowercase “gemini” to try to clarify that I’m talking about the protocol, and not the Gemini LLM.
SDF, the Super Dimension Fortress, is a public Unix system that offers gemini and gopher hosting. I decided to use SDF to create a site for gemini (and gopher, as it turns out). gemini sites are called capsules, and gopher sites are often called gopherholes. Capsules and gopherholes are just collections of mostly text files.
Creating an account on SDF
There are several ways to create an account. I used the SSH method, logging in with account name “new”.
ssh new@sdf.org
After logging in as “new”, you’re prompted through a series of steps. The first step is to choose your user name. The second step is to agree with and accept the SDF policy.
Next come some basic questions, with the instructions “Please answer the following questions as you see fit.”
Your Name:
Year of Birth:
Postal Zip Code:
Are you a K-12, University faculty member or student? (y/n)
Are you an Amateur Radio Operator? (y/n)
Are you an Amateur or Professional DJ? (y/n)
Do you play Minecraft, MUDs, MOOs or MMORPG? (y/n)
Where did you hear about SDF?
What do you want most out of a shell account?
After you answer the questions, you get a list of service addresses for the new account. Copy and paste the list into a local text document for future reference. At this point you can answer “y” to create the account, or “n” to cancel the process.
If you cancel account creation, you are left at a prompt “FEP Command:”. Type “help” to get a list of available commands. If you want to retry creating an account, for example to select a different user name, type “mkacct”. Type “logout” to exit.
Logging in
Once the account is created, you log in via ssh with your username and the password you set:
ssh <username>@tty.sdf.org
Consult the list of services you copied when you created the account in case the host name for ssh has changed.
Prevalidation
You start out as a “prevalidated” user, meaning that you don’t have access to all the services that SDF provides. You run in a restricted shell that doesn’t have command history or autocomplete. The only text editor available is Pico.
You can type the command “unix” to see a listing of UNIX commands available to you, but the list isn’t completely accurate. Commands like “chmod”, “links”, and “talk” all return “not found” even though they appear on the list. There are other oddities, like “man” can’t find man pages for any command.
But you can do quite a bit right away before you validate your account. I was able to create a gemini capsule, use Pico to create a few files, and start experimenting with gemini.
Validating your account
Validating an account supports SDF and gives you access to a more complete Unix environment. You also get more storage, file transfer capability, and a web URL.
You validate your SDF account in a pleasantly analog manner by sending one US dollar through the mail to a physical address in Seattle. There are a couple of other methods for validating an account, like Paypal or cryptocurrency, but I don’t use Paypal, and anything crypto is just a “no” for me.
Log in to your shell account and type “validate” for full instructions and the mailing address to use. It took a little over a week to get validated after I mailed my dollar. It may take longer depending on how far you live from Seattle.
The next step up from a validated account is becoming a lifetime member with a one-time payment of $36. I plan to do that soon.
gemini and gopher
gemini and gopher overlap on SDF; you use the “mkgopher” command to set them both up. When you’re done, you have both a gemini capsule, and a gopherhole if you want to use it.
Type “mkgopher” to start the process.
MKGOPHER (c)2003 smj@sdf.lonestar.org - Version 4
Type HELP for Commands.
MKGOPHER> help
MKGOPHER (c)2003 smj@sdf.lonestar.org - Version 4
HOWTO - Tips on managing your GOPHERSPACE
setup - First step, create your GOPHERSPACE
chmod - Set/Restore file permissions
title - Title your site
describe - Create a site description
mkdir {directory} - Create a directory
rmdir {directory} - Delete a directory
edit {filename} - Publish a document
upload {filename} - Transfer a file via ZMODEM to SDF
ls - List the current directory
cd {directory} - Change directory
pwd - Present working directory
gopher - Browse your site
quit
MKGOPHER>
The only command you need to use to get started is “setup”.
MKGOPHER> setup
You have no GOPHER directory, creating directory.
Setting permissions for //gopher
Creating SYMLINK to your GOPHER directory ..
MKGOPHER>
Type “quit”, and you have what you need for both gopher and gemini. “cd” to your gopher directory and type “edit
The next step for a gemini capsule is to create a file “index.gmi” in your gopher directory. This file is the equivalent to “index.html” on a web server. You put links into index.gmi to point to the other files you want to serve. Refer to this introduction to “gemtext” markup for information on formatting text and links in .gmi files.
In my case I added these files, and put links to them in index.gmi:
- about.gmi, a brief introduction
- bookmarks.gmi, a list of other interesting gemini sites I’ve found
- tinylog.gmi, a brief daily personal log
That’s it! Your capsule is working. Open a gemini client and navigate to “gemini://sdf.org/
At this point you should read more detailed documentation to continue creating your capsule content. Some useful links:
gopher
This article is getting a little long, but I wanted to add a few more words about gopher.
As I said, gemini and gopher overlap on SDF. Your gopher directory, or “gopherhole”, holds both your gemini and gopher files. If you browse to your gopherhole with a gopher client, by default you will see all the files in the directory, including the .gmi files you created for gemini.
gemini on the other hand only shows what’s in a .gmi file. There is a way to configure gemini to show directory listings, but so far I prefer to use index.gmi to control what the server shows to the client.
But gopher by default does show directory listings. You control this by adding a text file named “gophermap”. gophermap is like index.html for http or index.gmi for gemini. It lists the content you want to display to a gopher client.
The format of the gophermap file is documented in SDF’s gopher tutorial and in a Wikipedia article. The only thing I would add is that the actual format of the file can be simpler than the examples show. If all your files are local, you only need the first two fields, which are the menu text and the file name.
For example, my gophermap is:
!Welcome to my gopherhole
0Welcome<TAB>Welcome
1Phlog<TAB>phlog
Line 1 is displayed as is. “Welcome” in line 2 is a text file containing a welcome message, and phlog in line 3 is a directory. “
Final Note
In the course of learning about gemini, I’ve come across a few articles criticizing gemini on various grounds. I think it’s legitimate to ask, “why would anyone use gemini when you could just create plain text web pages?”. I’m giving this some thought and will write another post on why I think gemini is worth looking into.