The enclosed files are an example of a way to use a table lookup to set the terminal ID for BBx when running in a FacetTerm window. Normally, this is based upon the raw device line that is being used. This application note utilizes the user name to assign unique BBx aliases. To implement the example on your system, do the following:
# setbbterm.tbl # BBTERM tty,window T1 donna,0 T501 donna,1 T502 donna,2 T2 tom,0 T503 tom,1 T504 tom,2 T3 joe,0 T505 joe,1 T506 joe,2
alias T20 /dev/tty term
Example shell script named "setbbterm"
############################################################ # # setbbterm # # This script sets the BBTERM variable based on the original # login name and the FacetTerm window number, # if any. It should be invoked using the ". setbbterm" # command (so that the exported BBTERM variable is available # to bbx. Then, when bbx is run, it will look for the alias # line in the config.bbx file whose TTYID matches BBTERM. # ############################################################ ############################################################ # # If this is not being run in a FacetTerm # window, set the window number to zero. If this is being # run in a FacetTerm window, set the window # number to the FacetTerm window number. # ############################################################ if fct_info not_a_window then WINDOW=0 else WINDOW=`fct_info window_number` fi echo LOGNAME=$LOGNAME echo WINDOW=$WINDOW ############################################################ # # Now, look up the combination of ttyname,window in the file # and set the BBTERM variable to the first entry on that # line, or to TX if no entry is found that matches. # ############################################################ set `grep $LOGNAME,$WINDOW /etc/setbbterm.tbl` XxXx if [ "$1" != "XxXx" ] then BBTERM=$1 else BBTERM=TX fi export BBTERM echo BBTERM=$BBTERM ############################################################ # # Note: What may appear to be apostrophes in the 2 noted # lines above are actually the grave accent or # "backward quote", hex value of 0x60. # ############################################################