💾 Archived View for zaibatsu.circumlunar.space › ~visiblink › misc › phlogguide captured on 2021-12-04 at 18:04:22.

View Raw

More Information

⬅️ Previous capture (2021-12-03)

-=-=-=-=-=-=-

The Step-by-Step Guide to setting up a Gopher Hole and Phlog
at circumlunar.space

Note: this guide assumes that you have Linux installed and
are familiar with a few basic Linux/UNIX concepts and
commands. When the guide instructs you to type a command, do
not include the quotation marks.

The steps:

1. Request your gopherspace. Follow the instructions on the
'Request Asylum' page. Don't request space unless you're
actually going to use it, since disk space is limited.

2. When your request is granted you'll receive an email from
solderpunk and you'll see your username on the main page.

3. You're going to access your account using FTP (File
Transfer Protocol).

   a. Open a terminal and type 'sftp -i ~/.ssh/id_rsa 
   username@circumlunar.space' (remember to replace 
   'username' - and 'id_rsa', if necessary - with your 
   details and remember not to type the quotation marks!). 

   Note: there's a single space between '~/.ssh/id_rsa' and
   'username@circumlunar.space'.

You should then see: sftp>

4. Type 'ls' to list the files. You should see two things: a
gopher directory and a plain text file called orientation.
If you type 'get orientation' sftp will download the
orientation file, which you can then open and read on your
computer.

5. Many regular Linux commands work in the sftp shell. There
are also some unique commands. The most important to you
will be the following:

   ls     list the files in a directory 
   
   cd     change directory  

   put    send a file from your computer to your
          gopher space at circumlunar.space 

   get    download a file from your gopher space at 
          circumlunar.space to your computer

   mkdir  make a directory 

   rm     delete a file  

   rmdir  delete a directory  

   chmod  change the permissions on a file

   You can find a full list of the available commands by
   typing 'man sftp' in a terminal. The list is under the
   heading 'INTERACTIVE COMMANDS' near the end of the man
   page.

6. The first thing that you're going to do is set up a
directory for your phlog entries. 

   a. Type 'cd gopher' to move into the gopher directory.
   This is the directory that contains the files that visitors
   to your gopher hole see.

   b. Type 'mkdir phlog' to make a directory for your phlog
   entries.

   c. Type 'chmod 705 phlog' to make your phlog directory
   readable by everyone. This is a necessary step. If you don't
   change the permissions on the directory, visitors won't be
   able to see it.

7. Now you're going to create a welcome page for your gopher
hole and add your phlog directory to it. The welcome page is
called a 'gophermap'.

   a. Since you only have FTP (File Transfer Protocol)
   access to your gopher space, you will have to create the
   file on your local computer, using a text editor, and then
   transfer it to your gopher hole.

   b. Create a folder on your computer for your gopher
   files. Call it gopher.

   c. Using your text editor, create a file like the one
   between the dashed lines. Do not include the dashed lines
   themselves. The space between the words '1Phlog' and 'phlog'
   is a tab. It has to be a tab space or it will not function
   correctly.


-------------------------------------------------------------

Welcome to So-and-so's Gopher hole!

1Phlog	phlog


-------------------------------------------------------------

   d. Save the page with the name gophermap in your gopher
   folder.

   e. The first line will display as plain text. Alter it as
   you like. The second line will create a link to your phlog
   directory. The second line works as follows: the 1 is the
   file type, which in this case is a directory; "Phlog" is the
   link that will be displayed to the user when they view the
   page; the second "phlog" is the directory that will be
   opened when the user 'clicks' the link. 
   
   You can find more information on creating gophermaps at the 
   following places:
   
   gopher://167.88.113.62/0/docs/README.Gophermap
   gopher://baud.baby/0/phlog/fs20181102.txt   
   gopher://sdf.org:70/0/users/dbucklin/posts/how_gopher.txt

   Side note: all of the guides that I have seen say to put
   an i at the beginning of each empty and plain text line in a
   gophermap. I think that the i's are supposed to be
   invisible, but the first time I created a gophermap, I
   included them and they displayed in the browser. So I took
   them out. As long as a line contains no tabs (or reserved
   characters like parentheses), it will be displayed as plain
   text. 

   f. Upload the gophermap file to your gopherspace by
   returning to sftp in the terminal. You should still be in
   the gopher directory. You can check by typing 'pwd'.
   Navigate to the gopher directory if necessary.

   g. To upload the gophermap, type "put -p
   /home/user/gopher/gophermap gophermap" where user is your
   username on your local Linux machine. Note that there's a 
   single space between -p and /home...

   h. Start your gopher browser (I'm going to assume that
   you'll leave your sftp terminal open and start the browser
   in a separate terminal if you're using Lynx or another
   terminal-based browser) and navigate to your gopherspace.
   You should see your new gophermap displayed. If you don't
   see it, the problem is probably with the permissions. In
   that case, return to the sftp terminal window and type
   'chmod 704 gophermap' which should resolve the problem.

8. Create your first phlog entry.

   a. This is really easy. Write a phlog entry in a text
   file. 

   b. Save the text file in the gopher folder on your local
   machine. I'm going to assume that you've named your file
   'foo'. 

   Side note: once you get phlogging, you'll probably want
   to use some kind of systematic naming convention so that
   your blog entries sort properly. Alternatively, you could
   create a gophermap in your phlog folder that lists your
   phlog entries in order, but if you do so, you'll have to
   update the gophermap manually every time you upload a new
   phlog entry. See the note on gophermaps below for more
   information.

   c. I'm going to assume that the sftp terminal is still
   open and that you are still in the gopher directory (If
   you've logged out of sftp, log back in using the command
   from step 3. Type 'cd gopher' to navigate into the gopher
   directory.) 
   
   d. To upload your entry type 'put -p
   /home/user/gopher/foo phlog/foo'. 

   Again, that's a single space between -p and /home...

   e. If you cannot see your entry from the browser, you may
   have to change the permissions. In the sftp terminal,
   navigate to the phlog directory (type 'cd phlog' if you've
   still got the sftp terminal open ... otherwise if you've
   just logged in again and you're in the root directory, the
   command would be 'cd gopher/phlog') and type 'chmod 704 foo'
   to fix the permissions.

That's it! You're phlogging!


A note on user etiquette: 

Throughout the guide, I worked under the assumption that you 
remained logged into circumlunar.space via sftp. I did that 
for the sake of simplicity. Now that you know what you're 
doing, log out whenever you're not actively transferring files 
or creating directories.


A note on gophermaps: 

As you've probably guessed, a gophermap is simply an index
page. If there is no gophermap in a directory, your browser
will automatically display the list of files in that
directory. If there is a gophermap in the directory, the
browser will display it instead. As a result, you can choose
whether to have directories display their contents as a file
list or use a gophermap to display the directory's contents
in a customized manner. The gophermap gives you control over
what the user sees as they navigate, which means that you
can use it to conceal some of the contents of a directory
(depending on the links you put into the gophermap), to list
the files in an alternative order or hierarchy, and even to
include hyperlinks, gopherlinks to other gopherholes, etc.