ENV(8)                                                     ENV(8)

     NAME
          ctxrc, getrole, locate, mail2who, mkwhat, pc2who, setrole,
          terms, uam2who, update, who, who2uam, who2web, x10outside -
          environment and context processing

     SYNOPSIS
          env/ctxrc

          env/getrole [ machine ]

          env/locate [ -n ] [ newlocation ]

          env/mail2who

          env/mkwhat

          env/pc2who

          env/setrole

          env/terms

          env/uam2who

          env/update

          env/who

          env/who2uam

          env/who2web

          env/x10outside

     DESCRIPTION
          Collectivelly, these programs provide context awareness and
          context handling for Plan B. Most of them are expected to be
          customized by the space administrators and/or by the users
          to reflect the local conventions of the environment. The
          programs provided reflect the setting at URJC.

          Some of the programs extract context information for users,
          places, and things from various sources and place the infor-
          mation within /who, /where, and /what.  Some other programs
          use that information to automate the environment, customize
          it, and generate new information.

          Context information for most places, users in the environ-
          ment but not using this system, and administrative users, is
          extracted by executing some of these programs in CPU

     Page 1                       Plan 9             (printed 4/30/24)

     ENV(8)                                                     ENV(8)

          servers. Context information for users is not extracted.
          They are expected to arrange for some of these programs to
          run on their name at any machine in the environment, and to
          customize them to make them more appropriate for their par-
          ticular behaviour.  Using context to automate the environ-
          ment is done in the same way.

          Ctxrc is a script that starts all the relevant environment
          tools, to update context and relevant environment devices as
          things change. This is run by the space administrator at a
          central machine.

          Uam2who imports context from users at UAM, where a differ-
          ent, XML based, system is run. This program updates our con-
          text file trees.

          Pc2who updates user status for those who are usually close
          to their laptop, and use to be available when the laptop is
          running.

          Mail2who imports real world mail status from a digital image
          processing system, to update information about unread mail
          in (real world) mail cabinets.

          X10outside switches on/off corridor terminals depending on
          the state of the motion detectors close to them.

          Who2uam expors part of our local context information to a
          foreign, XML based, system.  This is the counterpart of
          uam2who.

          Who2web updates the http://lsub.org/who page to reflect part
          of our context.

          Who starts a ofaces(1) program to display the face of those
          whose status is not away, i.e., of those who are in the
          environment.

          Locate sets $location if not set, by asking the user for a
          suitable value. It obtains the location from hxfs(4) or the
          loc attribute in the ndb(6) database by default.  It also
          updates context information at /who, /what, and /where if
          such directories exist. Option -n assumes that there is a
          new location and ignores any previous value for $location.
          This program is run from brc (8) during system start up.

          Terms prints  the name of terminals (machines if flag -a is
          given) and its role for the user if option -r is given.
          When called only with flag -k terms prints the list of
          machines and addresses for their kbdfs keyboard redirectors.
          Flag -m can be used in the same way to print addresses for
          mouse redirectors.  Flag -a shows not just terminals, but

     Page 2                       Plan 9             (printed 4/30/24)

     ENV(8)                                                     ENV(8)

          all machines for the user.

          To help users automate how to use their (multiple) machines,
          different roles are assigned to different terminals depend-
          ing on their properties.  This is heavily dependent on the
          user preferences and the local installation.

          Getrole prints the role of machine (or $sysname by default)
          for the user who makes the call. The role is defined by a
          gofer(1) program according to the location and list of
          devices for the machines involved. Common roles are server
          for CPU servers and shared machines, main for wall sized
          displays, remote for machines not co-located with the user,
          primary for the best display available for editing, and
          other for everything else.

          Setrole assigns a role for the machine while booting, and
          updates context information to reflect that. If the $role
          variable is set, that value is used, otherwise Getrole
          determines the role for the machine.

          Mkwhat creates the tiny file system to contain
          /what/$sysname for the machine. This is used on machines
          that are not always avail. Permanent stationary machines
          have their /what directories in the main file servers
          (together with /who and /where hierarchies).

          Update updates context for the user. This is usually run
          from the user's profile. It polls the devices in the envi-
          ronment to determine user's location and other standard con-
          text. Besides, part of the automation of the environment for
          the user (e.g., updating the user's web page to reflect the
          status) is done here as well.

     FILES
          /who,
               /where, /what.

     SOURCE
          /rc/bin/env

     SEE ALSO
          x10(1) and hxfs(4).

     BUGS
          Most tools are specific and assume a setup similar to the
          one at the Laboratorio de Sistemas at URJC. There is no such
          thing as a generic-context-toolset.

     Page 3                       Plan 9             (printed 4/30/24)