Client Usage


Gecko implements an NFS-based front end to the web, allowing the user to access a web document as if it were a standard unix file. This allows unmodified applications, shell scripts, etc to operate directly on web content.

Assume that Gecko is setup in /etc/fstab as the /mount/web directory (for instructions see the client install section).

Type "mount /mnt/web" to mount the gecko server and "umount /mnt/web" to unmount Gecko.

To get started, you will need to 'chdir' into the directory representing the website of your choice. For example,

host:/ >cd /tmp/web/www.cs.arizona.edu
host:/mnt/web/raptor.cs.arizona.edu >ls -al
total 58
lrwxrwxrwx 2 nobody empty 4096 Dec 31 1969 ... -> ../
lrwxrwxrwx 2 nobody empty 4096 Dec 31 1969 .contents -> .contents_prime
-rw-rw-rw- 2 nobody empty 4376 Jan 30 10:34 .contents_prime
lrwxrwxrwx 2 nobody empty 4096 Dec 31 1969 .headers -> .headers_prime
-rw-rw-rw- 2 nobody empty 256 Jan 30 10:34 .headers_prime
lrwxrwxrwx 2 nobody empty 4096 Dec 31 1969 .link0 -> .../raptor.cs.arizona.edu/general/department.html/
lrwxrwxrwx 2 nobody empty 4096 Dec 31 1969 .link1 -> .../cos.arizona.edu/
(remainder of output terminated for brevity)

As you can see above, a web page is represented as a directory in the Gecko file system. Note that many of our files begin with '.' and you will need to use the -a option when running 'ls' to see them. To retrieve the contents of a page, 'cat' the .contents file. For example,

host:/mnt/web/raptor.cs.arizona.edu >cat .contents
<html><head>
<title>Arizona Computer Science: Home Page</title>
</head><body bgcolor="#FFF9E6">
<a name="pagetop"><br clear=all></a>
<!-- Created by HTPREP -->
<center>
<img src="general/splash.gif" width=472 height=150
alt="The University of Arizona / Department of Computer Science">
</center>
(remainder of output terminated for brevity)

You can also use 'cp', 'more', or any of your favorite unix commands on the file. There are also a multitude of other files present in each directory: .headers, .link, etc. The .headers file is always a link to the HTTP headers returned from the web server. If your particular application doesn't require http headers, then don't worry about it.

The .link files are symlinks representing the hyperlinks contained in the web page. For the above example, .link0 represents the first hyperlink in the cs homepage, which happens to point to general/department.html. You can 'chdir' into any .link directory to automatically follow the link.

If you know the name of an existing web page, then you can simply 'chdir' into the directory. Gecko assumes whatever directory you create is a valid web page. If you don't see a name listed in a directory, you can still 'chdir' into it, and Gecko will create it for you. For example,

Important Notes:

Please report any bugs/correctness issues directly to me at bakers@cs.arizona.edu. If you have feature suggestions, general comments, or criticisms, then you may submit them to gecko@cs.arizona.edu where they will be made available to everyone on the project.