home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: alt.gopher
- Path: sparky!uunet!noc.near.net!ns.draper.com!news.draper.com!MVS.draper.com!SEB1525
- From: SEB1525@MVS.draper.com (Steve Bacher)
- Subject: Re: Executing other applications through gopher
- Message-ID: <19920731080701SEB1525@MVS.draper.com>
- Sender: MVS NNTP News Reader <NNMVS@MVS.draper.com>
- Nntp-Posting-Host: mvs.draper.com
- Organization: Draper Laboratory
- References: <1992Jul30.190406.22304@msuinfo.cl.msu.edu>
- Date: Fri, 31 Jul 1992 13:07:00 GMT
- Lines: 48
-
- In article <1992Jul30.190406.22304@msuinfo.cl.msu.edu>,
- schafers@cps.msu.edu.cps.msu.edu (Steven R Schafer) writes:
-
- >I was wondering if it is possible, and if so how would you do it, to run
- >another application from gopher. Let's say wais or www, maybe by using
- >exec in a .link file or something similar.
-
- From the man page for gopherd:
-
- Another neat thing you can do is to execute commands:
-
- Name=Execed command name
- Type={a type}
- Path=exec:"args":/scriptname
- Host=+
- Path=+
-
- This is usually used by other types of gateway scripts. For
- instance, The first script might take a search and get a few
- hits. It could then generate "exec" scripts that would
- retrieve the actual document the hit referred to.
-
- (end of man page extract)
-
- Note that the args precede the shell script name.
-
- Also, if the file in a directory being served by gopher is an
- executable shell script, the gopher server will automatically
- execute that shell script. (Watch out for this "feature"!)
- Unfortunately, it seems that gopherd currently checks this by
- looking for "#!/bin/<shellutilityname>" instead of checking
- the permissions of the file.
-
- When a shell script is executed, the standard output from the
- execution becomes the gopher data returned to the client.
- (The standard error is also returned to the client, and it
- tends to be mixed in with the standard output, which can be
- a problem.) If the menu entry is requesting a directory,
- the script should write lines of the form
-
- <type><name><tab><path><tab><host><tab><port>
-
- so that the client will be able to interpret them as gopher
- directory entries.
-
- --
- Steve Bacher (Batchman) Draper Laboratory
- Internet: seb@draper.com Cambridge, MA, USA
-