FSETHOST(1)

NAME
fhostcmd, fhost - set environment variables

SYNOPSIS
fhostcmd [-d delay] [-p local port] [-l local directory] [-o timeout] [-t trace] [-w password] [-f filename] [-h number | name] [host port [directory] | abbreviation]

fhost [-d delay] [-p local port] [-l local directory] [-o timeout] [-t trace] [-w password] [-f filename] [-h number | name] [host port [directory] | abbreviation]

DESCRIPTION

Fhost uses a resources file to set all environmant variables needed to connect to a given host via FSP. If a -f option is given, the given filename is used as resources file, if not a file .fsprc is searched in the current working directory and in the user's home directory. If none is found a system wide default file is used. If fhost is invoked with an abbreviation given, the resource file is searched for the first host to match this abbreviation. The values given for this host will be set.

If fhost is invoked with a given host and port number, this host will be used and no searching in the resource file will be done.

Setting up the host the user can change between using the host name or the internet address. In case only one is given and the other should be used fhost tries to find it using a built in mini-nslookup facility. The default is to use what is given and to use the number if both are given.

Since programs cannot change environment variables of their parent shell in a simple way, it is recommended that the user defines a shell alias or function to make it possible. csh example:

alias fhost 'eval `fhostcmd *`'

FSPRC
For more information about the resource file confer fsprc(5). Here's just a short example of how it works. If your resource file contains the following
host seismo.soar.cs.cmu.edu
fsp port 30
local directory ~/sources/fsp-266.1
trace off
a call of fhost seismo in csh will produce the following output to be evaluated
unsetenv FSP_TRACE;
setenv FSP_PORT 30;
setenv FSP_LOCAL_DIR ~/sources/fsp-266.1;
setenv FSP_HOST seismo.soar.cs.cmu.edu;
setenv FSP_DIR /;

ARGUMENTS

-d -- set FSP_DELAY to delay

-p -- set FSP_LOCALPORT to local port

-l -- set FSP_LOCAL_DIR to local directory

-o -- set FSP_TIMEOUT to timeout

-t -- set FSP_TRACE if trace = on, unset it if trace = off

-p -- set FSP_PASSWORD to password

-f -- use filename as resource file

ENVIRONMENT

The following variables associate this program with a FSP database and are set (resp. unset) if needed:

FSP_HOST
    The name or internet number of the machine with the FSP server.

FSP_PORT
    The port number of the UDP socket used by the FSP server.

FSP_LOCALPORT
    The port number of the UDP socket used by FSP client utilities. The only reason to define this variable is to ensure mutual exclusion of client commands when none of the udp packet multiplexing mechanisms are enabled during compile time. You may pick any number not currently used for other purposes.

FSP_DIR
    The current working directory of the client in the FSP database. The root of the database is /.

FSP_TRACE
    If this variable is set, some commands will display the number of kilo-byte blocks transferred as transfer progresses. Also shown will be an indication of the network speed in the form of characters per second and the retries on not answered commands.

FSP_LOCAL_DIR
    If this variable is set, it contains the local working directory.

FSP_TIMEOUT
    If this variable is set, it contains the timeout value. The default value is 4. No function if program was compiled without timeout code.

FSP_PASSWORD
    If this variable is set, it contains a password.

SEE ALSO
fcatcmd(1), fcdcmd(1), fgetcmd(1), fgrabcmd(1), flscmd(1), fmkdir(1), fprocmd(1), fput(1), frmcmd(1), frmdircmd(1), fver(1), fducmd(1), fhostcmd(1), fspd(1), fsp_prof(5), ffindcmd(1)