October 12, 1977 The editor uses the following data bases: /etc/ttytype gives teletype types of hardwire ports /etc/ttycap gives capabilities of teletypes /etc/htmp gives home directories and teletype types The implications of the absence of these are as follows: /etc/ttycap Editor will think all terminals are model 33 teletypes, essentially, as they will be "unknown." You'll have no way of specifying the capabilities of your terminal. /etc/ttytype You will have to tell the editor the type of the terminal you are on every time you log in, unless you trust that the way the last user of your port set your terminal type is correct. /etc/htmp Editor start-up files cannot work; you won't be able to specify your terminal type once per login... you have to do it each time you enter the editor. These data bases are maintained and used in the following ways: HTMP data base: The file /etc/htmp contains a structure described by htmp (V). It contains, for each user, his "home" directory, normally the login directory, his user-id, and the type of terminal he is on. The home directory is here because on large systems searching the password file is unreasonably slow. Its presence in this data base also allows it to be changed. The tty type information is necessary here because users who dial in on a dialup port need to be able to specify it. TTYTYPE data base: The file /etc/ttytype is organized similarly to /etc/ttys and maps tty names to 2 character codes. This data base is used both by the editor and by the program "tset", and can be used by other programs. TTYCAP data base: The file /etc/ttycap allows programs to map a terminal's type code to its characteristics. This allows addition of new terminals to the system without changing any existing programs - only the data base needs to be updated. (Note that currently cursor addressing information is not recorded here requiring changes to the editor to add new such terminals.) The following utility programs are included with the editor: SETHOME Set the home directory entry in /etc/htmp. TTYTYPE Set the teletype type entry in /etc/htmp. The following changes to support the editor are suggested: LOGIN So that naive users may login on dial up ports and have their home directory and terminal-type set to reasonable values at initialization without any action on their part, the program login should be changed to write the initial entry in /etc/htmp. The work involved is in getting the terminal type from the file /etc/ttytype and writing it into /etc/htmp. The overhead should be negligible, especially since the operations of reading /etc/passwd and looking for mail in /usr/mail are typically much more expensive. This change is simple to make, just calling some of the routines in the supplied library htmp (V) .. SU So that the home directory will be correct after a su command, the command should be changed to save and restore this entry in /etc/htmp before and after the su. This is similar to the saving and restoring of the utmp user byte entry to allow who to print out the name of the person one is su'd to. (This latter change has been made at Berkeley.) For more information on formats and programs see the following documents Section V: htmp, ttycap, ttytype Section VI: sethome, ttytype Section VII: htmp, typeof, ttycap Bill Joy CS Division Department of EE and CS UC Berkeley Berkeley, California 94704 (415) 524-4510 [home] (415) 642-4948 [school]