Colors -- Installation Instructions VT-241 /VT-340 Color Management Software Version 5.1 April, 1988 Having a VT-241, VT-340, (or other color ReGIS terminal) is much more fun if you use color combinations other than Red-Blue-Green. These programs make it easy for the user to control his/her terminal colors. A side-effect is that a user connecting a color terminal is immediately given a set of pleasant colors. Since there is no way to tell if a terminal is a VT-240 or a VT-241 (ReGIS monochrome or color), the programs key on the ReGIS characteristic. VT-240s handle the color commands OK. We have little experience with other ReGIS terminals, except for the VT-340. Files in [COLORS] Program Sources, Etc. Sources, executables, link files, etc. Documentation In 3 forms: .TXT, .WPL for use if you use WPS-PLUS, and .LN03 to print nicely on an LN03 printer. Files in [COLORS.MANAGER] Colors.Hlp A second-level help fragment which can be added to your help library. Color_Symbols.Com A fragment to be executed from whatever part of Sylogin points to symbol definitions for all users. Fix_CRT.Scr When typed, this file restores some commonly-garbaged terminal characteristics (turns cursor on, sets window to full screen, restores tabs to "every 8", etc.) Note that this file is helpful for all VTxxx terminals. (File extension .SCR is used for files which affect screen characteristics). Restore_Colors.Com Types fix_crt.scr and (if regis terminal) sets colors to "the last reasonable set". Useful after something (set-up or program) has set terminal colors to monochrome, red-blue-green, or... Used with a parameter (1-9), restores saved color map with that number. Used with any other parameter, restores a random choice of the 9 saved color maps. Save_Colors.Com Used with a parameter (1-9), saves the current colors to the user's color map with that number. Without a parameter, saves to the "next" color map in rotation. Set_Colors.Com System .com file, executed (somewhere) from sylogin, which does something "reasonable" at user login. Look at the file for details. Sylogout.Com_Fragment Add this to your Sylogout.Com System_Default_Colors.Scr A pleasing set of colors for the user who has no other preference (or new user). This becomes "the" system default, and you may rename any Current_Colors_Cmd.Scr file to change it if you don't like this set. Colors_0n.Scr (9 Files) System defaults used in situations where a user has not saved a color map with that number. Also, a start for tailoring your own set of saved colors. User_Logout.Com ONLY needed if you don't use Sylogout.Com_Fragment. In that case, some users will need to do this. Installer's Documentation In 3 forms: .TXT, .WPL for use if you use WPS-PLUS, and .LN03 to print nicely on an LN03 printer. And 2 "fun" files: These files can be typed. Black.Scr Sets all 4 colors to Black. Mail this one to your friends. (Note: Typing OCO "blind" will get you out of this pickle). Colorbar.Tst Does the color terminal test sequence (VT241 only). Operating Philosophy of Programs oo If the terminal is not ReGIS, do nothing (except OCO); otherwise, oo If the user does nothing, always set the system default colors at login. oo Provide user flexibility as follows: Users may run programs to select their own colors (explicitly or randomly). If they do, the selected colors will stay with the user "forever" (are not changed to system default at any login). This is accomplished by writing a file Current_Colors_Cmd.Scr in the user's SYS$LOGIN directory. Two other files are written there: Current_Colors.Scr (for subsequent use by programs) and Did_Colors.Before (see below). Users may "do their own thing" by putting a Set_Colors.Com in their SYS$LOGIN directory. This will be executed at first login. Some users (like me) like to use this to get a fresh set of "random" colors each day [my Set_Colors.Com contains "$ NCO"]. oo For users who do multiple logins (SET HOST 0, Clusters, Terminal Servers), the user's selected colors are not switched at each login - until the user logs out once. The selection programs write Did_Colors.Before, which is destroyed at logout. Operating Sequence at Login 1. If the user has a DID_COLORS.BEFORE, Go To Step 3. ELSE 2. Execute the user's SET_COLORS.COM if it exists. ELSE 3. Type SYS$LOGIN:CURRENT_COLORS_CMD.SCR if it exists. This file is created by the NCO, CCO, PCO or XCO commands. This sets up the default color scheme for a user. ELSE 4. Type SYS$UTILS:[COLORS.MANAGER]SYSTEM_DEFAULT_COLORS.SCR. This is the system default color setting. Directory Structure The structure is set up to have all executable programs in SYS$UTILS:[COLORS] and manager & .COM files in the subdirectory SYS$UTILS:[COLORS.MANAGER] If this doesn't match your system requirements, edit the following files to replace entries beginning SYS$UTILS: SET_COLORS.COM SAVE_COLORS.COM RESTORE_COLORS.COM COLOR_SYMBOLS.COM COLOR_CHANGER.FOR (in [COLORS]). You will need a FORTRAN compiler. If you do not have a FORTRAN compiler, you MUST make the logical SYS$UTILS:[COLORS.MANAGER] point to the location of the COLORS_0n files. Command Structure The following commands are defined in COLOR_SYMBOLS.COM, and may be changed as you wish: CO Runs Set_Colors.Com (Gets any user some set of colors). If the user has a SYS$LOGIN:SET_COLORS.COM, It will pass all 8 parameters to SET_COLORS.COM. This allows the user to have up to 8 different color settings, i.e. CO 4 would pass the parameter 4 to the user's SET_COLORS.COM which could then type color file 4. OCO Used if terminal is garbaged - runs Fix_Crt & restores colors. NCO Gets a new set of random, contrasting colors. CCO Gets a new set of random, complementary ("artsy") colors. SCO Gets a new set of random, similar (soft) colors. PCO Lists 64 choices and lets the user pick. XCO An interactive/visual user chooser. ZCO Saves the current color map. The acronyms (sort of) stand for: Colors, OLD Colors, NEW Colors, COMPLEMENTARY Colors, PICK Colors, (X)CHANGE Colors, and Zave Colors. Installation In addition to any required editing of the 4 .COM files, and putting the files somewhere (see "Directory Structure" above), the following are required: 1. Put the command: @SYS$UTILS:[COLORS.MANAGER]SET_COLORS somewhere in your SYLogin structure. It must come after the last place you do a SET TERM/INQUIRE (which sets VT-241 colors to Red_Blue_Green). HINT: If you run All-In-1 V2.1, you may put this command in SYS$MANAGER:A1WPSPLUS_LOGIN.COM. It goes only in the section SETUP_FOR_VT200: after the loadtcs line and just before "GOTO done". You will also need to consider VT300 terminals, which are not currently recognized by A1WPSPLUS_LOGIN.COM. VT-340s have a f$getdvi("tt:","devtype") response (term_type) of 112, and can use the same setup as the VT200. 2. Put the command: @SYS$UTILS:[COLORS.MANAGER]COLOR_SYMBOLS somewhere in your SYLogin structure. 3. Edit SYLOGOUT.COM_FRAGMENT into your SYLogout.Com 4. (Optional) Add COLORS.HLP to your help library. 5. (Optional) Edit (add) a line "$ OCO" as the last line in any .COM files you have which handle programs which destroy color setup. This will automatically restore your color settings. Known examples of this are DECGraph, DECSlide, and VAXSim. 6. Publish the users' guide for your users. Hints & Other Info oo OCO is useful in many instances where your terminal gets fouled up by some program. oo Some third-party terminals and (particularly) terminal emulators may not like these programs. We know of some which "lie" to SET TERM/INQ, and others which don't properly exit from ReGIS mode when sent the standard sequence ( \ ). [Sigh!] oo [COLORS] contains the FORTRAN programs. AA_BUILD_COLORS.COM will compile and link all of them. Individual link .COMs are also provided. All of the programs use COMMON.FOR/COMMON.DAT. oo PikColors (PCO) and Color_Changer (XCO) use the SMG$ for screen and keyboard management (and link with Color_SMG). oo If you manage several non-clustered VAXen, one potentially useful trick is to set up a different set of colors (CURRENT_COLORS_CMD.SCR files) on each machine. Then you never have to wonder which machine you're on. oo Is_ReGIS.FOR is a useful logical function to determine if a terminal has ReGIS capability. It could be easily modified to determine other capabilities. oo NOTE: VT-241 terminals must be SETUP to do Mono + Color Display, or the PCO and XCO programs will not work properly. There does not seem to be a convenient way to check for this. oo A note about VT-340 terminals: Although technically a 4-color text (16-color ReGIS) terminal, the VT-340 does not provide a "Mono + Color Display" mode like the VT-241. In Color mode, the VT-340 uses the normal text color for its reverse video color. Therefore, you will usually only see 3 colors on your VT-340. These programs do recognize VT-340 terminals (if the Device Attributes Response is set to VT340), and act appropriately. If you have trouble with PCO or XCO, check the Device Attributes Response of your VT-340. oo A technical note about VT-340 terminals: In text mode, the VT-340 uses color numbers 0, 7, and 15. The VT-241 uses colors 0, 1, 2, and 3. Unfortunately, the VT-241 recognizes only the lower 2 bits of the color number; thus using 7 and 15 sets color 3 (the "wrong" one) on VT-241s. These programs now write a .SCR file which properly handles both types of terminals. oo If you used a previous version of Colors (Version 4.0 or below), this version (5.1) is upward-compatible and automatically converts the previous format of CURRENT_COLORS_CMD.SCR files to the new format. The previously provided CURRENT_COLORS.SCR (people-readable) file is no longer provided. Unless you made use of this latter file, user transition is not likely to be a problem. Attributions: (All at Los Alamos National Laboratory) Jim Whitfill, System Manager - the .COMs, etc. Tom Beery - Initial implementation of Color_Changer (XCO). Dennis Hall - Initial implementation of PikColors (PCO). Comments, Bugs, Suggestions: Dale E. Coy Los Alamos National Laboratory Group MEE-5, MS/J572 PO Box 1663 Los Alamos, NM 87545 (505) 667-3270 or 667-4277 FTS 843-3270 or 843-4277