home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 3 / hotmix_v03.iso / Intro / start.flag < prev    next >
Text File  |  1993-02-04  |  1KB  |  50 lines

  1. #! /bin/sh 
  2. #
  3. #    added code to place new showcase window in place depending on 
  4. #    what type of graphics hardware the user has.
  5. #
  6. #                [ Fri Jan  29 1993 nlouie ]
  7. #
  8. #       start.flag
  9. #
  10. #       This script stops showcase from displaying any other flag
  11. #       screens that were started with the start.flag script.
  12. #       It then starts showcase in the foreground, view-only, full-color
  13. #       mode (fvb) with the flag file ($1) as input. 
  14. #
  15. #       To run the script, type: start.flag flagfile
  16. #       (where flagfile is a file in the ../flags directory)
  17. #
  18. #       The last 2 lines
  19. #       capture the process id (PID) of this instance of showcase, store
  20. #       the PID in a file (/tmp/.endflag), and make this file a shell script.
  21. #       This way you can stop this particular instance of showcase
  22. #       with the shell script end.flag, which just executes the
  23. #       /tmp/.endflag file.
  24. #
  25.  
  26. #end.flag
  27. # the following is the startups for the truecolor displays:
  28. CDDISPTYPE='none'; export CDDISPTYPE
  29. cd $HOTMIXDIR/Intro
  30.  
  31. # set the display type based on screen size.
  32.  
  33. SCREENSIZE=`xdpyinfo | grep dimensions | awk '{print $2}'`
  34.  
  35. if [ $SCREENSIZE = "1024x768" ]; then
  36.           CDDISPTYPE="PSEUDO"
  37.           export CDDISPTYPE
  38. else
  39.           CDDISPTYPE='TRUEC'
  40.           export CDDISPTYPE
  41. fi
  42.  
  43. if [ $CDDISPTYPE = "TRUEC" ]; then
  44.     showcase -fbv -S488,250,1048,592 ./$1 &
  45. else
  46.     showcase -fbv -S235,200,793,542 ./$1 &
  47. fi
  48.  
  49. echo kill $child > /tmp/.endflag && chmod 755 /tmp/.endflag
  50.