Both sides previous revisionPrevious revisionNext revision | Previous revision |
gopher_site_setup_and_hosting_features [2022/12/05 05:49] – hc9 | gopher_site_setup_and_hosting_features [2024/09/04 07:23] (current) – "'' hc9 |
---|
====== Gopher ====== | ====== Gopher ====== |
| |
| |
What is Gopher? | What is Gopher? |
===== Viewing Gopherspace ===== | ===== Viewing Gopherspace ===== |
| |
There are many ways to view gopherspace. The easiest for new users is one of the following: | There are many ways to view gopherspace. Here are the easiest ways you can [[accessing web spaces#Gopher| view gopher pages from the SDF shell]] |
| |
==== Use Lynx ==== | |
| |
[[http://lynx.invisible-island.net/|Lynx]] is the //text// web browser. \\ In addition to web browsing, Lynx is also capable of browsing gopherspace. \\ From the SDF shell, you can issue the command: | |
| |
$ lynx gopher://sdf.org/ | |
| |
and Lynx will start up at sdf.org's gopher root menu. | |
| |
==== Floodgap Gopher Proxy ==== | |
| |
Floodgap.com provides a public gopher proxy that you can view in your web browser at https://gopher.floodgap.com/gopher/gw. \\ For more information, see the proxy info page: https://gopher.floodgap.com/gopher/ | |
| |
==== Bombadillo ==== | |
| |
Made for browsing Gopherspace and [[gemini site setup and hosting features | Geminispace]], too, you can use the homegrown 'bombadillo' browser | |
$ bombadillo gopher://sdf.org/ | |
| |
==== SDF Gopher Command ==== | |
| |
You can issue the gopher command, either from the SDF shell or from within the ''mkgopher'' command prompt. This can be used to create your gopherspace as described below, and also includes a very basic browser to explore gopherspace. | Additionally, you can issue the ''gopher'' command, either from the SDF shell or from within the ''mkgopher'' command prompt. This command can be also used to create your gopherspace as described below, and also includes a very basic browser to explore gopherspace. |
| |
===== Creating your own Gopherspace ===== | ===== Creating your own Gopherspace ===== |
===== Publishing Content ===== | ===== Publishing Content ===== |
| |
You can use mkgopher to publish documents, create directories, etc. You can also manage your Gopherspace manually. If you decide to do so, remember that the server will not display your content if it is not already visible to everyone. That is, files need to world-readable (chmod o+r $HOME/gopher/yourfile), directories need also to be world executable (chmod o+rx $HOME/gopher/yourdir), etc. **The gopher server ([[gopher://gophernicus.org/1/software/gophernicus/|Gophernicus]]) will serve executable files under /cgi-bin and also gophermaps which have executable permission as gopher CGIs or "moles" (see below). In the case of gophermaps, this is likely to result in errors, so make sure your gophermaps do not have execute permission (chmod -x $HOME/gopher/yourdir/gophermap).** | You can use mkgopher to publish documents, create directories, etc. You can also manage your Gopherspace manually. If you decide to do so, remember that the server will not display your content if it is not already visible to everyone. That is, files need to world-readable (chmod o+r $HOME/gopher/yourfile), directories need also to be world executable (chmod o+rx $HOME/gopher/yourdir), etc. **The gopher server ([[gopher://gophernicus.org/1/software/gophernicus/|Gophernicus]]) will serve executable files under /cgi-bin and also gophermaps which have executable permission as gopher CGIs or “moles” (see below). In the case of gophermaps, this is likely to result in errors, so make sure your gophermaps do not have execute permission (chmod -x $HOME/gopher/yourdir/gophermap).** |
| |
The usual 'mkgopher -p' command has not yet been updated to reflect Gophernicus' permissions requirements. So you may need to reset your permissions for all files and directories in your gopher directory as noted above. The following two commands will revert all files to world-readable but non-executable, and all directories to world-readable but executable. | The usual ‘mkgopher -p’ command has not yet been updated to reflect Gophernicus' permissions requirements. So you may need to reset your permissions for all files and directories in your gopher directory as noted above. The following two commands will revert all files to world-readable but non-executable, and all directories to world-readable but executable. |
| |
$ find ~/gopher/ -type f -print0 | xargs -0 chmod 644 | $ find ~/gopher/ -type f -print0 | xargs -0 chmod 644 |
| g | GIF image | | | g | GIF image | |
| h | HTML, Hypertext Markup Language | | | h | HTML, Hypertext Markup Language | |
| i | "inline" text type | | | i | “inline” text type | |
| s | Sound | | | s | Sound | |
| I | Image (other than GIF) | | | I | Image (other than GIF) | |
0Why is Gopher Still Relevant? /gopher/relevance.txt gopher.floodgap.com 70 | 0Why is Gopher Still Relevant? /gopher/relevance.txt gopher.floodgap.com 70 |
hAn http link URL:http://sdf.org/ | hAn http link URL:http://sdf.org/ |
| |
| |
Remember the gophermap syntax? Then be careful about tab characters. In the example above, there are some<TAB>s. For instance, the third line is | Remember the gophermap syntax? Then be careful about tab characters. In the example above, there are some<TAB>s. For instance, the third line is |
</file> | </file> |
| |
//NOTE:// You can use the 'phlog' command to add your phlog/glog to the gopher.club phlog listing, and you can then update the listing after you create a post by running the following command: "touch ~ftp/pub/users/$LOGNAME" | //NOTE:// You can use the ‘phlog’ command to add your phlog/glog to the gopher.club phlog listing, and you can then update the listing after you create a post by running the following command: “touch ~ftp/pub/users/$LOGNAME” |
| |
==== Other glog/phlog software ==== | ==== Other glog/phlog software ==== |
==== Mole examples ==== | ==== Mole examples ==== |
| |
Remember that your moles need to be executable (and readable) by everyone, and under /cgi-bin. So you will have to do: "chmod 755 YOURSCRIPT.cgi" | Remember that your moles need to be executable (and readable) by everyone, and under /cgi-bin. So you will have to do: “chmod 755 YOURSCRIPT.cgi” |
| |
=== fortune.cgi === | === fortune.cgi === |
Easy enough, isn't it? As it is raw text, you can access it using am itemtype = 0, that is: gopher://sdf.org/0/users/YOUR-USERNAME/cgi-bin/fortune.cgi | Easy enough, isn't it? As it is raw text, you can access it using am itemtype = 0, that is: gopher://sdf.org/0/users/YOUR-USERNAME/cgi-bin/fortune.cgi |
| |
Did you notice that fortune was called with a full path? OK, that's because the server's path is PATH=/sbin:/bin:/usr/sbin:/usr/bin. That means that if you call a program without a path, the server will search in /sbin, /bin, /usr/sbin and /usr/bin. There's no /usr/pkg/games, or other path in the server's $PATH (eventually, you can add a path of your choice with, e.g., "PATH=$PATH:/usr/pkg/games"). | Did you notice that fortune was called with a full path? OK, that's because the server's path is PATH=/sbin:/bin:/usr/sbin:/usr/bin. That means that if you call a program without a path, the server will search in /sbin, /bin, /usr/sbin and /usr/bin. There's no /usr/pkg/games, or other path in the server's $PATH (eventually, you can add a path of your choice with, e.g., “PATH=$PATH:/usr/pkg/games”). |
| |
=== ls.cgi === | === ls.cgi === |
</code> | </code> |
| |
Note that the echo... line is\\ " echo "$itemtype$content ($date)<TAB>$rel_dir<TAB>$server<TAB>$port" " | Note that the echo… line is\\ “ ''echo "$itemtype$content ($date)<TAB>$rel_dir<TAB>$server<TAB>$port"'' ” |
| |
If you go to gopher://sdf.org/1/users/YOUR-USERNAME/cgi-bin/ls.cgi , you will see a list of your files sorted alphabetically. If you access your mole as gopher://sdf.org/1/users/YOUR-USERNAME/cgi-bin/ls.cgi?date , then you'll see your files/directories sorted by modification time. | If you go to gopher://sdf.org/1/users/YOUR-USERNAME/cgi-bin/ls.cgi , you will see a list of your files sorted alphabetically. If you access your mole as gopher://sdf.org/1/users/YOUR-USERNAME/cgi-bin/ls.cgi?date , then you'll see your files/directories sorted by modification time. |
| |
where <TAB> is a tab character (you should already know this!)C and error.host and 1 are, respectively, a fake server and port number (you could also have written fake instead of error.host and 300 instead of 1). | where <TAB> is a tab character (you should already know this!)C and error.host and 1 are, respectively, a fake server and port number (you could also have written fake instead of error.host and 300 instead of 1). |
| |
| |
---- | ---- |