home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume3 / suntools / README < prev    next >
Encoding:
Text File  |  1986-11-30  |  5.9 KB  |  165 lines

  1. This file describes additions by nbs-amrf!libes to Sun's suntools program
  2. (version 1.2) that was distributed with 2.0.  
  3.  
  4.  
  5.  
  6. BRIEF DESCRIPTION
  7.  
  8. Menu selections are allowed from the keyboard.
  9.  
  10. Tools may be run setuid(0) by pressing the shift key down while the menus
  11. are brought up.
  12.  
  13. The user may specify the primary menu name.
  14.  
  15. The user may specify the shape, and rasterop used by the root cursor.
  16.  
  17. The one incompatibility introduced is that the 9 numerical fields in the
  18. .suntools files are now ignored.  However, these are of dubious value anyway
  19. since they are incomplete, contradictory and their effect can be achieved by
  20. using the -W tool arguments.
  21.  
  22.  
  23.  
  24. LONG DESCRIPTION
  25.  
  26. Unified key mechanism
  27.  
  28. Menu entries may be invoked from the keyboard, by creating a "key" menu
  29. (using KEYS instead of MENU in the rootmenu).  To invoke a menu item off the
  30. key menu, simply type the tag associated with the menu.  Keystrokes are
  31. stored in a key stroke buffer until a key menu tag is matched or the mouse is
  32. moved.  
  33.  
  34. For example, my root menu looks as follows:
  35.  
  36. "big shell   (b)"    /usr/bin/shelltool -Ww 80 -Wh 56 -Wp 506 0 -Wn -WL "big shell"
  37. "console     (c)"    /usr/bin/shelltool -C -Ww 50 -Wh 12 -Wp 0 0 -Wn -WL "console" -Wt /usr/lib/fonts/fixedwidthfonts/sail.r.6
  38. "debugger    (d)"    /usr/bin/dbxtool
  39. "graphics    (g)"    /usr/bin/gfxtool
  40. "rlogin"    MENU /usr2/libes/environ/rloginmenu
  41. "fun and games"    MENU /usr2/libes/environ/toolmenu
  42. "Coke Classic"    KEYS /usr2/libes/environ/keymenu
  43.  
  44. Note, that the key menu file is not displayed in the stack of menus, hence
  45. the tag is simply a place-holder.  Since key associations are not displayed,
  46. people typically include the same entries in other (visible) menus with the
  47. key tags in parens (ala Macintosh).
  48.  
  49. My key menu is as follows:
  50.  
  51. b    /usr/bin/shelltool -Ww 80 -Wh 56 -Wp 502 0 -Wn -WL "big csh"
  52. c    /usr/bin/shelltool -C -Ww 50 -Wh 12 -Wp 0 0 -Wn -WL "console" -Wt /usr/lib/fonts/fixedwidthfonts/sail.r.6
  53. d    /usr/bin/dbxtool
  54. s    /usr/bin/shelltool
  55. "g"    /usr/bin/gfxtool
  56. "r"    REFRESH
  57.     EXIT_NOCONFIRM
  58. "?"    HELP
  59. =    VERSION
  60. v    /usr/bin/shelltool -Wl "vex" -WL "" -WI /usr/local/icon/vax.icon
  61. rlogin nbs-amrf
  62. k    /usr/bin/shelltool -Wl "Kanamid at your service.  May I take your order?" -WL "" -WI /usr/local/icon/kanamid.icon rlogin kanamid
  63.  
  64. Notice that multiple keystroke tags are available.  They should be quoted if
  65. containing blanks or other whitespace.  
  66.  
  67.  
  68.  
  69. New keywords
  70.  
  71. The menu above also demonstrates several other keywords that are available.
  72.  
  73. EXIT_NOCONFIRM is like EXIT, but it does not confirm that you want to exit.
  74.  
  75. HELP puts up a help box for suntools.
  76.  
  77. VERSION prints out the current version of suntools.
  78.  
  79.  
  80.  
  81. New environment variables
  82.  
  83. Several environment variables were added for more flexibility.
  84.  
  85. ROOTMENUNAME is a string that is used as the name of the primary menu.  As
  86. distributed from Sun (and by default in this version), it is "Suntools".
  87.  
  88. ROOT_CURSOR is a cursor that is used as the root menu cursor.  Since this
  89. cursor isn't used to point to anything, it seemed odd to use an arrow.  A
  90. much more interesting cursor is the default in this version.  
  91.  
  92. ROOT_CURSOR_ROP is the rasterop function associated with the cursor.  This
  93. should be an integer.  For example, the default raster-op in this version of
  94. suntools is 28, which corresponds to or-ing the source and destination.  The
  95. raster-op used in the original suntools was 24 (source).  For more
  96. information, see <pixrect/pixrect.h>.  
  97.  
  98. ROOT_CURSOR_HOTSPOT_X sets the cursor hotspot in the x axis.
  99. ROOT_CURSOR_HOTSPOT_Y sets the cursor hotspot in the y axis.  The default for
  100. both of these is 8 - the middle of the cursor.  
  101.  
  102.  
  103.  
  104. Superuser shortcut
  105.  
  106. This feature is enabled for anyone who can supply the root password when
  107. starting suntools, or everyone if there is no root password (as at our
  108. installation, believe it or not).  
  109.  
  110. If there is a root password, and suntools is started with the -S flag, the
  111. user is prompted for the root password.  If it is correct, the running
  112. suntools will have the superuser shortcut enabled.  
  113.  
  114. When the shortcut is enabled, the user may invoke tools with setuid(0) by
  115. pressing the shift key down before bringing up the menus (or typing a key to
  116. the root window).  If the mouse is used to raise the menus, a little "su"
  117. appears to the left of the menu.  
  118.  
  119. Besides being a tremendous convenience, this squeezes the tool and su
  120. processes down into one.  We use it a lot as follows - while sitting at a
  121. client, one key stroke brings up an su'd window on the server.  
  122.  
  123.  
  124.  
  125. .suntools files
  126.  
  127. While the tools understand how to interpret arguments based on the -Wxxxx
  128. conventions, suntools provides another way of passing arguments in the
  129. suntools startup file.  That is, there are several reserved fields available
  130. for window position information and whether the window should be open or
  131. closed in the suntools startup file.
  132.  
  133. The second method has two drawbacks.  First, it is incomplete.  Second, it
  134. can contradict arguments from the first method.  Since I didn't want to waste
  135. my time figuring out how to 1) convert the .suntools parameters into
  136. tool-style parameters, 2) resolve contradictions between the two parameter
  137. passing techniques and 3) I did not have the source, I decided to disallow
  138. (actually ignore) the second method of passing arguments.
  139.  
  140. Thus if you provide information via the 9 numerical parameters, it will be
  141. ignored.  You should use the -W style of tool parameter passing.  While this
  142. means you may have to modify your .suntools file, the end result is much more
  143. consistent.  (Although no less easy to read, since strings like -Wp are not
  144. very intuitive either.)  
  145.  
  146. So for example, if you had a line in your .suntools file like:
  147.  
  148. shelltool 0 72 -1 728 -1 -1 -1 -1 emacs $HOME/sked -Wn
  149.  
  150. You should convert it to 
  151.  
  152. shelltool emacs $HOME/sked -Wp 0 72 -WP 4 4 -Wn
  153. (or even better, use -Ww and -Wh since they do not depend on the font size.)
  154.  
  155.  
  156.  
  157. Please send comments, enhancements, bug reports and fixes to:
  158.  
  159. Don Libes
  160. Met. Bldg, Rm B229
  161. National Bureau of Standards
  162. Gaithersburg, MD  20899
  163. (301) 921-2461
  164. seismo!nbs-amrf!libes
  165.