[foxboro] What Generates the "No Licenses" error meesage for Remote Display Manager?

WE have a node with only a couple of Remote Display Manager Licenses on it,
and we have a problem with people forgeting to log off of it. We have even
found instnaces where 1 user would have iconofied one copy & started
another ;_(

So, I modifed the .profile for the ia user (/opt/is/.profile) to look like
this:


--------
PATH=/bin:/usr/bin:/usr/sbin:/etc:/usr/ucb:/usr/local:/usr/ccs/bin:.:/usr/opt/SUNWmd/sbin:/opt/gms/bin:/usr/fox/wp/bin/tools
export PATH

# Need to set up library path for jettool (needs libview.so.x)
# LD_LIBRARY_PATH=/usr/openwin/lib ; export LD_LIBRARY_PATH
LD_LIBRARY_PATH=/opt/gms/lib:/usr/openwin/lib:/usr/dt/lib:/opt/windu/lib:/opt/windu/fox
 ; export LD_LIBRARY_PATH
l () ls -l $*
lc () ls -CF $*

#
# Added "-sig" arg to blink_task to avoid the Display Manager starting
# up before blink_task is fully initialized.  blink_task uses SIGUSR1
# to signal back.  This signal is different between the platforms.
# So we need to determine what signal to trap on
#
SIG_PATH=/usr/include/sys/signal.h
SIGUSR1=`grep SIGUSR1 $SIG_PATH | awk '{ printf ( "%s", $3 ) }'`

REM_STATION=`who am i| awk '{print $6}' | tr -d "()"`
LOC_STATION=`uname -n`

DISPLAY=$REM_STATION:0 ; export DISPLAY
echo Setting DISPLAY to $DISPLAY

WUHOME=/opt/windu ; export WUHOME
GMS_HOME=/opt/gms ; export GMS_HOME
HHPATH=/opt/windu/bin ; export HHPATH
HHHOME=/opt/windu ; export HHHOME

# The next 2 lines record the time at which this 
# dm session will be auto terminated.
# To change the time before termination modify the echo line,
# changing the value between the ' ' after --date= 

LIMIT_FILE=limit_file$REM_STATION
echo `/opt/gnu/bin/gdate --date='1 hour' +%s` > $LIMIT_FILE

if [ -z "$REM_STATION" -o "$REM_STATION" = "$LOC_STATION" ]
then
   exit
fi

#
# If this is not a WP or AW, exit
# Determine station type from hldb file
#    11 DEC 97   TEC  Added station 206 (Bug# 12129)
#

HLDB=/usr/fox/sp/hldb

if [ -s $HLDB ]
then
   TYPE=`awk '{   if ($1 == "'$LOC_STATION'")
                  {
                     # filter out non-WP/AW stations
                     # WP/AWs station types:
                     #    AW    30x
                     #    WP    40x
                     if ( $2 ~ /[234]0[0-9]/ )
                     {
                        print $2
                     }
                     exit
                  }
              }' $HLDB`
fi

if [ -z "$TYPE" ]
then
   exit
fi

/usr/fox/wp/bin/jettool -Wi -f &
PID_PRINT=`echo $!`

#
# Wait for SIGUSR1 signal from blink_task or 30 second
# timeout.
#
trap "GO=Y" $SIGUSR1
GO=N

/usr/fox/wp/bin/blink_task -sig -r -hb 5 &
PID_BLINK=`echo $!`

tot=0
while test "$GO" = "N"
 do
    sleep 1
    tot=`expr $tot + 1`
    if test $tot -eq 30
     then
       GO="Y"
    fi
 done

trap "" $SIGUSR1


PID_BLINK=`echo $!`
#/usr/fox/wp/bin/dm_wp50

### BEGIN 07/16/98 FONTDEF.DAT STARTUP FILE FIX ###

#
# Set the startup directory for default_dm, so that
# SL-GMS applications use the correct fontdef.dat file.
#               (07/15/98 AJ Cerier)
#
# Get the Vendor name for our X Server
#
VENDOR="`/usr/openwin/bin/xdpyinfo | grep 'vendor string' | awk '{ print $3 }' 
`"
#
# If this is a Sun X server ...
#
if [ "$VENDOR" = "Sun" ] 
then
   # 
   # For the Sun X Server, we start from /usr/fox.  Because
   # there is no fontdef.dat file in /usr/fox, SL-GMS applications
   # will user the fontdef.dat file in /usr/fox/wp/data.  This file
   # contains font selections optimized for Sun X Servers.
   #
   cd /usr/fox
else
   #
   # For non-Sun X Server, we start from /opt/ia, where
   # the "remote" fontdef.dat file is located.  This file
   # contains font selections optimized for non-Sun X Servers..
   #
   cd /opt/ia
fi

### END 07/16/98 FONTDEF.DAT STARTUP FILE FIX ###

/opt/fox/wp/bin/default_dm &
# get PID of display manager
PID_DM=`echo $!`

# Check to see if we have run long enough.
# If so then we will fall through this while.
# The result of this will be terminating
# all 3 processes
while [ `/opt/gnu/bin/gdate +%s` -lt `cat $LIMIT_FILE` ]
do
        # echo "checking `/opt/gnu/bin/gdate +%s` against `cat $LIMIT_FILE`"
        sleep 10
done
rm $LIMIT_FILE

if [ -n "$PID_DM" ]
then
        # echo About to kill display manager
        kill  $PID_DM
fi

if [ -n "$PID_BLINK" ]
then
        # echo About to kill blink_task
        kill -9 $PID_BLINK
fi
if [ -n "$PID_PRINT" ]
then
        # echo About to kill jettool
        kill -USR1 $PID_PRINT
fi
exit
-------------

This limits a givne session to 1 hour. This works well, and does exactly
what we want, _except_ for one minor problem. If someone atempts to log in,
and there are no licenses available, the normal blue error dialog for this
_does not_ pop up. This confises the users.


The only difference that strikes me, is that I am disposing default_dm to
the background, but I can't see how this should prevent it from generating
the error dialog.

What am I missing?


-- 
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
                                                -- Benjamin Franklin
 
 
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
 
foxboro mailing list:             http://www.freelists.org/list/foxboro
to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
 

Other related posts: