home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / andrew / FAQ.51 < prev    next >
Encoding:
Text File  |  1992-05-13  |  43.3 KB  |  1,057 lines

  1. Andrew Toolkit 
  2. Frequently Asked Questions
  3. Release 5.1
  4.  
  5. This file contains questions from everywhere and answers from many
  6. places.  The sections on General Information and Common Problems
  7. Building Andrew were compiled by Susan Straub (susan+@andrew.cmu.edu). 
  8. The section on User Questions has been extracted from a larger FAQ for
  9. CMU maintained by Andrew Plotkin (ap1i+@andrew.cmu.edu).  You can send
  10. suggestions and comments to these people or directly to the consortium's
  11. mailing list/bulletin board:  
  12.  
  13.     info-andrew@andrew.cmu.edu.
  14.  
  15. Send bug reports to:
  16.  
  17.     info-andrew-bugs@andrew.cmu.edu
  18.  
  19. For information about the consortium you can contact:
  20.  
  21.     Wilfred J. Hansen
  22.     Director, Andrew Toolkit Consortium
  23.     238 UCCB   4910 Forbes Ave.
  24.     Pittsburgh, PA 15213
  25.     wjh+@andrew.cmu.edu
  26.     412 268 6710
  27.  
  28.  
  29. General Information
  30.  
  31. G1.  What is Andrew?
  32. G2.  How do I obtain the latest release?
  33. G3.  Which platforms has Andrew been ported to?
  34. G4.  What books have been written for Andrew and where can I obtain them?
  35. G5.  What is the Remote Andrew Demo Service?
  36.  
  37. Common Problems/Questions Building Andrew
  38.  
  39. Q1.  Why doesn't my macro expand in site.mcr?
  40. Q2.  How can I instruct "messages" to use /usr/spool/mail for mail drop?
  41. Q3.  Why do I get errors when building Ultrix 4.2 against AFS 3.1 libraries?
  42. Q4.  Why does the distribution as made available on MIT's X.V11R5 tape
  43.     install files as links instead of actual files? 
  44. Q5.  Which configuration variables are used most often? 
  45. Q6.  Do I need to have AFS to run the Andrew Message System (AMS)?
  46. Q7.  How can I get other useful software?
  47. Q8.  How can I use PostScript fonts other than those defined in
  48.     /usr/andrew/X11fonts both in displayed and printed documents? 
  49. Q9.  How can I print Andrew documents?
  50. Q10.  Ezprint outputs rasters in PostScript.  Can I print those rasters?
  51. Q11.  When using UCB sendmail, are aliases in /usr/lib/aliases
  52. case-sensitive?  
  53. Q12.  How can I fix the error message in my console about <getstats/gvm>
  54.     Cannot open /dev/kmem? 
  55. Q13.  I get the following error in my console:  <appname>X error
  56.     BadValue, integer parameter out of range ...  How can I fix this?  
  57. Q14.  Why can't the help program find any help files?
  58. Q15.  Should I modify the Imakefile or the Makefile?
  59. Q16.  How do I use the spell checker function in ez?  
  60. Q17.  How do I debug Andrew applications?  
  61.  
  62.  
  63. User Questions  (Extracted from CMU FAQ)
  64.  
  65. U0. Introduction
  66. U1. Customizing your account
  67. U2. Playing with ATK things, including ez, typescript, console, and help
  68. U3. Mail and bboards, including messages
  69. U4. Strange file formats
  70. U5. Working with graphics and images
  71. U6. Fancy key bindings
  72. U7. Programming in Ness and C
  73.  
  74. ___________________________________________________
  75. General Questions
  76.  
  77. G1.  What is Andrew?
  78.     The Andrew Toolkit (ATK) is a portable user-interface toolkit
  79.     that runs under X11. It provides a dynamically-loadable
  80.     object-oriented environment wherein objects can be embedded in
  81.     one-another. Thus, one could use our 'generic-object' editor
  82.     (ez) to edit text that, in addition to containing multiple
  83.     fonts, contains embedded raster images, spreadsheets, drawing
  84.     editors, equations, simple animations, etc.. These embedded
  85.     objects could themselves contain other objects, including text.
  86.     With the toolkit, programmers can create new objects that can be
  87.     embedded as easily as those that come with the system. Many
  88.     objects, including those mentioned above, along with a help
  89.     system, a system monitoring tool (console), an editor based
  90.     shell interface (typescript), and support for printing
  91.     multi-media documents, are included in the release, making it
  92.     useful to programmers and non-programmers alike. 
  93.  
  94.     The Andrew Message System(AMS) provides a multi-media interface
  95.     to mail and bulletin-boards.  AMS contains many advanced 
  96.     features including authentication, return receipts, automatic
  97.     sorting of mail, vote collection and tabulation, enclosures,
  98.     audit trails of related messages, and subscription management.
  99.     It also provides a variety of interfaces that support ttys and
  100.     low-function personal computers in addition to the high-function
  101.     workstations. 
  102.  
  103. G2.  How do I obtain the latest release?
  104.  
  105.     This release, 5.1, can be obtained in several ways.  The entire
  106.     X distribution is available via anonymous ftp from the Internet
  107.     host export.lcs.mit.edu (Internet address:  18.30.0.238).  The
  108.     sources of ATK and AMS are located in the contrib/andrew tree,
  109.     one of the contributed toolkits.  Andrew, as well as a variety
  110.     of CMU software and the latest patches, is also available via
  111.     anonymous ftp from the Internet host, emsworth.andrew.cmu.edu
  112.     (Internet: 128.2.30.62).   Due to its size, the compressed tar'd
  113.     tree is split into 11 files, andrew.aa through andrew.ak (about
  114.     1MB each) in the split/ directory.    You should cat andrew.*
  115.     together into andrew.tar.Z, uncompress the tree then tar -xvpf.  
  116.  
  117.     NOTE:  If you obtain Andrew from the X tape, you will receive
  118.     Release 5.0.  You should review the file ANNOUNCE.5 in the
  119.     contrib/andrew directory for instructions on fixing build
  120.     problems you will encounter.
  121.  
  122. G3.  Which platforms has Andrew been ported to?
  123.  
  124. The (intended) available machine types are:
  125.  
  126.     Machine Type                Operating System                <machine>
  127.  
  128.     IBM RT                      AOS December 1988               rt_aos4
  129.     IBM RT                      AIX 2.2.1                       rt_aix221
  130.     IBM RS/6000                 AIX 3.1                 rs_aix31
  131.     IBM PS/2 M70/80             AIX 1.2                 ps_aix12 
  132.     Sun 3                               SunOS 3.5                       sun3_35
  133.     Sun 3                               SunOS 4.0                       sun3_4
  134.     Sun 3                               SunOS 4.1                       sun3_41
  135.     Sun 4                               SunOS 4.0                       sun4_40
  136.     Sun 4                               SunOS 4.1                       sun4_41
  137.     DEC Vax                     Ultrix 3.0                      vax_3
  138.     DEC Vax                     BSD (4.3)                       vax_43
  139.     HP 300                      HP UX                           hp300
  140.     HP 900                      HP UX                           hp800
  141.     Macintosh II                        MacMach                 mac2_51
  142.     Apollo                              DomainOS                       
  143.     apollo68k
  144.     DEC MIPS                    Ultrix 3.0                      pmax_3
  145.     DEC MIPS                    Ultrix 4.1                      pmax_41
  146.     DEC MIPS                    Ultrix 4.2                      pmax_42
  147.     SGI                         IRIX 4.0                        sgi_4d
  148.     SCO                         SCO                             sco_i386
  149.  
  150. G4.  What books have been written for Andrew and where can I obtain them?
  151.  
  152.     Nathaniel S. Borenstein's book: Multimedia Applications
  153.     Development with the Andrew Toolkit (Prentice-Hall).
  154.  
  155.     ODA Project Book: Multi-media Document Interchange: ODA and the
  156.     EXPRES Project (Springer Verlag).
  157.  
  158.  
  159. ____________________________
  160. Common Problems/Questions Building Andrew
  161.  
  162.  
  163. Q1.  Why doesn't my macro expand in site.mcr?
  164.  
  165.     Tabs are not allowed before macro declarations in the site.mcr. 
  166.     Although the error is not reported as such, the macro is not
  167.     expanded properly and thus not noticed by imake.  Use spaces.  
  168.  
  169. Q2.  How can I instruct "messages" to use /usr/spool/mail for mail drop?
  170.  
  171.     Although the following lines are in /usr/andrew/etc/AndrewSetup:
  172.  
  173.         AMS_NonAMSDelivery: yes
  174.         AMS_MailBoxPrefix: /usr/spool/mail
  175.  
  176.     Messages says, "/usr/user/Mailbox" could not be properly read and
  177. >     delivered (0 success, 0 failure)". 
  178.  
  179.     You should create a file $HOME/.mailrc and put in this line:
  180.  
  181.         unset hold
  182.  
  183.     WARNING:  Once you start reading mail with messages, you incoming
  184.     mail will be stored within directories maintained by messages.  It
  185.     is possible to return to other mail handling systems, but it may not
  186.     be easy.
  187.  
  188. Q3.  Why do I get errors when building Ultrix 4.2 against AFS 3.1 libraries? 
  189.  
  190.     You need to define AFS_ULTRIX in your site.h file.  
  191.  
  192. Q4. Why does the distribution as made available on MIT's X.V11R5 tape
  193. install files as links instead of actual files?  This fails in two
  194. directories:  overhead/class/lib and xmkfontd.  
  195.  
  196.     The distribution defaults to install links instead of files.  To
  197.     change this, #undef LINKINSTALL_ENV in your site.h file.   If you
  198.     want to build using LINKINSTALL_ENV, you will have to change the
  199.     following two files: 
  200.  
  201.     overhead/class/lib/Imakefile:
  202.  
  203.         29,32d28
  204.         < #ifdef LIBDL_ENV
  205.         < install.time:: libclass.a
  206.         <       $(INSTALL) $(INSTLIBFLAGS) libclass.a $(DESTDIR)/lib
  207.         < #else /* LIBDL_ENV */
  208.         34d29
  209.         < #endif /* LIBDL_ENV */
  210.  
  211.     xmkfontd/Imakefile:
  212.  
  213.         18c18
  214.         <       $(INSTALL)  ${INSTLIBFLAGS} non-andrew.fonts.alias 
  215.         ${DESTDIR}/X11fonts/fonts.alias 
  216.         ---
  217.         > InstallFileToFile(non-andrew.fonts.alias, ${INSTLIBFLAGS},
  218.         ${DESTDIR}/X11fonts/fonts.alias)
  219.  
  220.  
  221. Q5.  Which configuration variables are used most often? 
  222.  
  223.     AFS30_ENV
  224.     AFS31_ENV 
  225.     AMS_DELIVERY_ENV 
  226.     WHITEPAGES_ENV 
  227.     SNAP_ENV 
  228.     ANDREW_MALLOC_ENV
  229.     DEBUG_MALLOC_ENV
  230.     MK_BASIC_UTILS
  231.     MK_AUTHORING 
  232.     MK_AUX_UTILS 
  233.     MK_AUX_INSETS
  234.     MK_EXAMPLES 
  235.     RUN_AMDS_ENV
  236.     ANDREW_PRINTING_ENV
  237.     LINKINSTALL_ENV
  238.     CONTRIB_ENV 
  239.     PRE_X11R4_ENV 
  240.     DPS_ENV 
  241.     DEFAULT_ANDREWDIR_ENV 
  242.     BUILDANDREWINSTALL_ENV 
  243.     ISO80_FONTS_ENV     
  244.     FONTS_TO_PCF_ENV
  245.  
  246.     CDEBUGFLAGS = -g
  247.     MAKEDODEBUG = -g
  248.     AFSBASEDIR = /usr/local
  249.     XMKFONTDIR = /usr/local/bin/mkfontdir
  250.     XFC = /usr/local/bin/bdftosnf
  251.     XLIBDIR = /usr/local/lib
  252.     XINCDIR = /usr/local/include
  253.     RESOLVLIB = ${AFSBASEDIR}/lib/res/libresolv.a
  254.     RESINC = -I$(AFSBASEDIR)/include/res
  255.     INCLUDES =  -I${BASEDIR}/include -I$(BASEDIR)/include/atk $(RESINC)
  256.     -I$(AFSBASEDIR)/include -I${XINCDIR}
  257.  
  258.  
  259. Q6.  Do I need to have AFS to run the Andrew Message System (AMS)?
  260.  
  261.     No, but having AFS gives you better functionality. 
  262.  
  263. Q7.  How can I get other useful software?
  264.  
  265.     Enormous quantities of software are available for free from the
  266.     internet.  Many of the pieces are also available via electronic
  267.     mail.  Subsequent paragraphs list some software that may be of value
  268.     as an adjunct to ATK/AMS.
  269.  
  270. archie - archive locator
  271.     A major source of information about the location of software on the
  272.     network is 'archie'.  Send mail to 
  273.         archie@archie.rutgers.edu
  274.     In the body of the message include line(s) of the form
  275.         prog   name
  276.     where name is the name of the software you would like to find out
  277.     about.  For more information, the body can contain the line
  278.         help
  279.     The listing returned from a 'prog' request will list ftp sites
  280.     containing information with the name you gave.  A site with a name
  281.     ending in .com, .edu, or .gov will be in the United States and will
  282.     be the best place to try.
  283.  
  284. ftp - file transfer package
  285.     To retrieve information via ftp over the internet:  Give the command 
  286.         ftp <site name>
  287.     The response will ask for your login;  reply
  288.         anonymous
  289.     the response will ask for your email address;  type it in.  Now you
  290.     can give the help command to see the commands.  I generally use ls,
  291.     dir, cd, lcd, pwd, and get.
  292.  
  293. on the ATK cd-rom
  294.     Some useful non-ATK software is included in the ATK cd-rom.  For
  295.     details see subsequent paragraphs.
  296.         binaries only:  X11 for RS6000, Sun 4, Dec Pmax, and HP700
  297.         binaries and source:  metamail imake makedepend patch
  298.         source only: ispell, psroff, pbmplus
  299.  
  300. X Windows System:  X11, imake, makedepend, patch
  301.     Screen management and graphics software
  302.     Binaries on cdrom in <system>/X11/...
  303.     Bdf fonts  on cdrom in  src/util/bdffonts
  304.     imake, makedepend, and patch
  305.         source on cdrom in src/util/...
  306.         objects on cdrom in <system>/util/...
  307.     ftp: export.mit.edu and numerous other sites (see archie)
  308.     newsgroup: comp.windows.x 
  309.     mail address:
  310.         MIT Software Distribution Center
  311.         Technology Licensing Office
  312.         room E32-300
  313.         77 Massachusetts Avenue
  314.         Cambridge, MA  02139
  315.     phone: (617) 258-8330
  316.  
  317. metamail
  318.     Converter for implementing MIME multi-media internet standard.
  319.     newer version due early April, 1992
  320.     contact:  Nathaniel Borenstein
  321.         Bellcore Room 2A-274
  322.         Morristown, NJ 07962-1910
  323.     phone: (201) 829-4270
  324.     email: nsb@thumper.bellcore.com
  325.     ftp:  thumper.bellcore.com,  see  pub/nsb/README
  326.     source: $ATKSRC/overhead/mail/metamail
  327.  
  328. pbmplus
  329.     Portable bit map conversion and transformation software
  330.     version in cdrom:/src/util/pbmplus is from   10 December 1991
  331.     contact: Jef Poskanzer
  332.     email: jef@well.sf.ca.us
  333.  
  334. psroff
  335.     Software augmenting troff and providing printer drivers.
  336.     on cdrom: src/util/psroff  is version 3.0 patch level 07
  337.     contact:  Chris Lewis
  338.     psroff-request@ferret.ocunix.on.ca
  339.  
  340. ispell  
  341.     version on cdrom in src/util/ispell is 2.0.02
  342.         updated with a bigger dictionary
  343.     new version 3.0 is coming soon
  344.     contact: Geoff Kuenning
  345.     email:  geoff@ITcorp.com
  346.  
  347. GNU software: groff, g++, gcc, gdb, gnuemacs, ... 
  348.     Free software, eventually replacing Un*x
  349.     ftp: prep.ai.mit.edu
  350.         see pub/gnu/GNUinfo/FTP
  351.         and pub/gnu/etc/DISTRIB
  352.     email: gnu@prep.ai.mit.edu
  353.     mailing address:
  354.         Free Software Foundation, Inc.
  355.         675 Massachusetts Avenue
  356.         Cambridge, MA  02139
  357.         USA
  358.     phone:  +1 617-876-3296
  359.  
  360. transcript (psdit)
  361.     Contact: 
  362.         Adobe
  363.         1585 Charleston Road
  364.         P.O. Box 7900
  365.         Mountain View, CA 94039-7900
  366.     phone: 1-800-833-6687
  367.  
  368. Documenter's WorkBench
  369.     AT&T / NCR Computer Division
  370.         800 225 5627
  371.     Gary Wagner  513 445 1475
  372.  
  373.  
  374. Q8.  How can I use PostScript fonts other than those defined in
  375. /usr/andrew/X11fonts both in displayed and printed documents?
  376. There are two aspects of this problem: screen display and print display.
  377. Screen Display
  378.     To have your own fonts used by ATK applications for displaying text
  379.     you must first create those fonts and place them in a directory,
  380.     possibly set up a fonts.alias file, run mkfontdir to get a fonts.dir
  381.     file, and finally add that directory to your X fontpath.  Also,
  382.     you'll have to specify in your preferences file the fontname:
  383.  
  384.     ez.bodyfont: myfont12
  385.  
  386. Print Display
  387.     To get these fonts to print you have to create the appropriate troff
  388.     device-specific font description files (see /usr/lib/font/devpsc for
  389.     the Postscript fonts).  Question: Are there tools around that let
  390.     you create a troff font? Furthermore, you'd have to alter the
  391.     ATK-to-troff text translator (../andrew/atk/text/txtroff.c) to
  392.     recognize your new font family and to make the appropriate mapping
  393.     from your fontname to the troff fontname.  Currently, the only fonts
  394.     used for printing are Times, Helvetica, and Courier.
  395.  
  396.  
  397. Q9. How can I print Andrew documents?
  398.  
  399.     Printing requires two steps, text formatting and then driving the
  400.     printer.  ATK utilizes troff for text formatting.  That is adequate
  401.     for printing documents with styled texts, but some insets such as
  402.     rasters and zip require that the printer be driven with PostScript.
  403.  
  404.     Print processing is controlled via the FormatCommand and
  405.     PrintCommand options, which can be specified in site.h during system
  406.     build, the global preferences in $ANDREWDIR/lib/global.prf, or the
  407.     user's ~/preferences file.  The most general defaults are:
  408.         *.FormatCommand: eqn -Tpsc /tmp/%s.n  | troff -Tpsc - |
  409.         *.PrintCommand: lpr -n
  410.     The -Tpsc flags specify that the troff output is ultimately intended
  411.     for a PostScript printer.  If you do not have one, this value must
  412.     be set to whatever is appropriate for your printer.  ATK documents
  413.     containing only styled text can be printed via most versions of
  414.     troff and most print drivers.
  415.  
  416.     To print ATK documents via PostScript printers, you have three options:
  417.         troff - psroff
  418.         ditroff - psdit
  419.         groff
  420.     These differ in cost and the difficulty of installation.  See Q8 for
  421.     hints on acquiring these packages.
  422.  
  423.     troff - psroff
  424.     Standard Unix systems are often delivered with an old troff which
  425.     generates output for the "CAT" typesetter.  This troff can be used
  426.     to print ATK documents by sending the output through the psroff
  427.     processor, available freely on the internet.  See the psroff
  428.     documentation.
  429.  
  430.     ditroff - psdit
  431.     This is the route we use at CMU.  ditroff is the device independent
  432.     troff which comes with the Documenters Work Bench portion of Unix
  433.     System V.  psdit is part of the "Transcript" package available from
  434.     Adobe software.  Both ditroff and Transcript cost money.  Adjust the
  435.     FormatCommand to utilize the ditroff version of troff (it is usually
  436.     called troff).  The PrintCommand should usually use the -n switch
  437.     and the lpr daemon will run psdit.
  438.  
  439.     groff 
  440.     This package is free from the Free Software Foundation, the gnu
  441.     people.  The only hitch is that to build groff you must first build
  442.     g++ and to build g++ you must first build gcc.  We have compiled
  443.     groff without any problems with g++-1.39.1. g++ also compiled gpic,
  444.     geqn, gtbl.   
  445.  
  446.     Groff includes gtroff to do text formatting and grops to generate
  447.     PostScript.  To To use both, have this specification:
  448.         *.formatcommand:      groff -pte -E /tmp/%s.n |
  449.         *.PrintCommand: lpr -v
  450.     Note:  The -pte switches tell it to run gpic, gtbl, and geqn before
  451.     running gtroff.  The output of gtroff is automatically piped into
  452.     grops, which generates the PostScript.  (This assumes that
  453.     /usr/gnu/bin (or wherever groff is installed) is on one's path.)
  454.  
  455.     The drawback of this simple approach is that the ATK preview option
  456.     will no longer work.  To retain the preview command, I believe, one
  457.     can use specifications something like this:
  458.         *.FormatCommand: cat /tmp/%s.n | gpic|gtbl|geqn|gtroff -Tpsc |
  459.         *.PrintCommand: grops | lpr -v
  460.  
  461. Q10.  Ezprint outputs rasters in PostScript.  Can I print those rasters?
  462.  
  463.     If you just want to print one raster from an Andrew document, you
  464.     can extract the raster from the troff output with a raw text editor
  465.     and print it directly.  You may have to add the line
  466.         20 20 translate
  467.     to get it out of the bottom corner.  You may also have to add an
  468.     initial line containing only 
  469.         %!
  470.  
  471.     If you haven't got a postscript printer, the raster image can still
  472.     be massaged with the pbm package.  pbm understands the Andrew format
  473.     or you can use the output of 
  474.         ezprint -t <file>
  475.     which will include the raster encoded in PostScript / hex form.
  476.  
  477. Q11.  When using UCB sendmail, are aliases in /usr/lib/aliases
  478. case-sensitive?  
  479.  
  480.     If you build your UCB sendmail with the ``DBM'' option set, aliases
  481.     in /usr/lib/aliases are case-sensitive; if you build it without that
  482.     option, they're case-insensitive. For purposes of validating user
  483.     names, AMS assumes that aliases in /usr/lib/aliases are
  484.     case-insensitive. This might mean that a name that validates OK with
  485.     AMS might be rejected by UCB sendmail, if that sendmail uses DBM to
  486.     do its alias lookup.
  487.  
  488. Q12.  How can I fix the error message in my console about <getstats/gvm>
  489. Cannot open /dev/kmem?
  490.  
  491.     You may see the following error message: 
  492.  
  493.         |>> console:<getstats/gvm> Cannot open /dev/kmem - will not
  494.         monitor Disk and GVMStats <<| 
  495.         console: ->> Try 'Restart Stats' Menu <<
  496.  
  497.     If you get this message, your ``getstats'' program, installed from
  498.     atk/console/stats/common, wasn't installed with sufficient privilege
  499.     to be able to open /dev/kmem. This happens because your /dev/kmem is
  500.     protected against global reading, but you didn't do an Andrew
  501.     installation from an account with enough privilege to install
  502.     ``getstats'' set-uid or set-gid. One possibility for this is that
  503.     you are running AFS although you didn't turn the AFS flag on for the
  504.     compilation. In order for console to monitor information available
  505.     only through /dev/kmem, you'll have to do the following: 
  506.  
  507.         cd ..../atk/console/stats/common
  508.         su admin (or su root)
  509.         chmod 4555 getstats
  510.  
  511.     We have not included any consoles specifically tailored to a
  512.     non-AMDS, non-AFS environment. We hope to have some available in
  513.     future patch distributions. 
  514.  
  515. Q13.  I get the following error in my console:  <appname>X error
  516.     BadValue, integer parameter out of range ...  How can I fix this?  
  517.  
  518.     Some users do not remember to run mkfontdir in the
  519.     ${DESTDIR}/X11fonts directory after the dependInstall operation is
  520.     complete. If you do not do so, you will see an error message similar
  521.     to the following: 
  522.  
  523.         <appname>X error BadValue, integer parameter out of range ...
  524.  
  525.     Running on HP-UX, you may see problems with the fonts. A possible
  526.     workaround for the font problem is to change the bodyfont font
  527.     preference in your preferences file to some font that is in the X
  528.     default font path. 
  529.  
  530.     Some formulation of the bdf files causes either convertfont or the
  531.     window system to miscount the position of the glyphs in the font.
  532.     This means that the window system doesn't believe that you have
  533.     glyphs for lower-case characters. 
  534.  
  535.     The distributed Andrew fonts are tailored for about 80 pixels to the
  536.     inch. By default these are not used, since for workstations with
  537.     other resolutions it is generally best to utilize the X fonts
  538.     instead. See the discussion of ISO80_FONTS_ENV above.
  539.  
  540. Q14.  Why can't the help program find any help files?
  541.  
  542.     If help files cannot be found or the alias database is missing, the
  543.     following make operations from the root of the object tree may help:
  544.  
  545.         make dependInstall SUBDIRS='helpindex helpaliases'
  546.  
  547.     These operations can be repeated as desired.
  548.  
  549. Q15.  Should I modify the Imakefile or the Makefile?  
  550.     Changes should never be made to the Makefile. All changes should be
  551.     made to Imakefile; "make Makefile" to regenerate that one file, or
  552.     "make Makefiles" to regenerate the Makefiles in all subdirectories,
  553.     recursively.
  554.  
  555.     "make clean" and "make Clean" do not delete the Makefile, so a
  556.     subsequent "make Makefile" says it is up to date, i.e., comparing
  557.     its own timestamp against itself. Beware: once you remove the
  558.     Makefile from a directory, you can't say "make Makefile" there
  559.     again, You can, however, rename Makefile to another name and say
  560.     "make Makefile -f newname". 
  561.  
  562. Q16.  How do I use the spell checker function in ez?  
  563.  
  564.     If Ispell, the spelling checker used by ez, is not available at your
  565.     site or is not along your path, ez will not be able to perform this
  566.     function. Ispell is widely available (e.g. via anonymous FTP off of
  567.     uunet.uu.net). All an installer has to do to get ez spell checking
  568.     to work is to install ispell somewhere along the user's path. The
  569.     following .atkinit line will then be useful:
  570.  
  571.         addmenu "spell-check-document" "Search/Spell~1,Check
  572.         Spelling~30" textview
  573.  
  574. Q17.  How do I debug Andrew applications?  
  575.  
  576.     In order to debug ATK applications you will need to have gdb version
  577.     3.5 or greater from the Free Software Foundation.    See Q7, How can
  578.     I get other useful software? above for information on how to contact
  579.     the FSF.  
  580.  
  581.     To compile the system such that symbol tables exist add these two
  582.     lines to your site.mcr:
  583.  
  584.             CDEBUGFLAGS = -g
  585.             MAKEDODEBUG = -g
  586.  
  587.     To debug the raster application you would first load the
  588.     statically-linked portion of the ATK run-time system, called runapp,
  589.     into gdb. It is important that the above make.1 macros are set to
  590.     include the -g switch so that the symbol table is created. There is
  591.     no use attempting to use gdb if the system has not been built with
  592.     the -g switch.
  593.  
  594.     % gdb runapp
  595.     GDB, Copyright (C) 1987 Free Software Foundation, Inc.
  596.     There is ABSOLUTELY NO WARRANTY for GDB; type "info warranty" for details.
  597.     GDB is free software and you are welcome to distribute copies of it
  598.      under certain conditions; type "info copying" to see the conditions.
  599.     Reading symbol data from runapp...
  600.     done.
  601.     Type "help" for a list of commands.
  602.     (gdb) run -d ezapp foo.ras -d
  603.     Starting program: runapp -d ezapp foo.ras -d
  604.     Starting ez (Version 7.0, ATK 15.0); please wait...
  605.      raster: text = 0x10046594  data = 0x10049280  entry = 0x100498a8
  606.      rasterview: text = 0x1004f820  data = 0x1005cc60  entry = 0x1005f8d8
  607.      rasterimage: text = 0x1006701c  data = 0x100675d0  entry = 0x10067810
  608.      pixelimage: text = 0x1006e758  data = 0x100703bc  entry = 0x1007068c
  609.  
  610.     To load the symbol table for the raster dynamic object you would use
  611.     this command on a Sun or a DECstation 3100[An Andrew ToolKit view (a
  612.     footnote) was included here, but could not be displayed.]:
  613.     (gdb) add-file raster.dog 0x10046594
  614.  
  615.     and on an RT:
  616.     (gdb) set-rel 0x10046594
  617.     (gdb) add-file raster.dog
  618.  
  619.     Note that the addresses passed to these gdb commands come from the
  620.     text address that runapp outputs when the -d switch is used (the
  621.     second -d switch prevents runapp from forking itself to become an
  622.     orphaned process). To determine which module to load in the fashion
  623.     described above compare the various text addresses with the address
  624.     at which the program failed. For example, if the program died at
  625.     address 0x1004a520 you would find that address between what was
  626.     reported as the start of the text segments for raster and
  627.     rasterview. Since the raster module was loaded first, we can
  628.     conclude that the failure was somewhere in the raster module.
  629. ___________________________________________________
  630. User Questions
  631.  
  632. U0. Introduction
  633.  
  634. This section has been extracted from a larger FAQ file maintained at CMU
  635. by Andrew Plotkin  (ap1i+@andrew.cmu.edu).  Its permission information
  636. reads:
  637.  
  638.     Everything in this file is public domain. You can copy it, mail
  639.     it to people, put bits of it in other files, print it out in
  640.     500-point type and staple it to the walls, whatever you want --
  641.     I'm happy to give you the opportunity, and I couldn't do a thing
  642.     about it if I wanted to.
  643.  
  644.     Thanks to the multiple people who provided me with questions and
  645.     answers.
  646.  
  647.  
  648. U1. Customizing your account
  649.  
  650. How can I customize my Andrew account?
  651.     For info on your preferences file:
  652.         help preferences   (or help prefs)
  653.  
  654. I edited my .cshrc, but now I get strange errors when I start typescript, or
  655. I edited my .login, but now I get strange errors when I log in, or
  656. I edited my .plan, but now I get strange symbols when I finger myself, or
  657. I edited my .Xresources, but now I get strange errors when I start X, or
  658. I edited this file, but now I get strange errors....
  659.     If you use ez to edit your .plan, .login, .logout, preferences,
  660.     .cshrc, .Xresources, .Xclients, .Xmodmap, .signature, or any file
  661.     like that: you must get rid of any styles you put in. You can't have
  662.     sections of bold, or typewriter, or italics, or different text
  663.     sizes, or indentation. (Not even in your .plan file or .signature,
  664.     although that would be nice.) Use "Plainest" on the whole file if
  665.     you have to.
  666.  
  667.  
  668. U2. Playing with ATK things
  669.  
  670. How do I customize an ATK program?
  671.     See the help file on it. The ATK help files are more friendly than
  672.     average; lots of examples, no words over two syllables, etc.
  673.  
  674. How do I change the behavior, fonts, and so on in ATK windows and menus?
  675.     Most of these are controlled by preferences:
  676.         help preferences
  677.         help menubar
  678.     The lines described in these help files go in your preferences file.
  679.     For example, 
  680.         *.Thumbscroll: yes
  681.     will cause the text in any ATK window to swoop up and down when you
  682.     wiggle the scroll bar.
  683.         typescript.Thumbscroll: yes
  684.     will cause that to happen only in typescript windows.
  685.  
  686.     A major exception is the appearance of the pop-up menus you get when
  687.     you press and hold the middle button. These are controlled by X
  688.     resources (when you are running X.)
  689.         help cmenu
  690.     The resources described in this help file go in your .Xresources file. 
  691.         *TitleFont: andysans22b
  692.     will cause your menu card titles to be printed in a 22-point bold
  693.     sans-serif font. 
  694.         help*TitleFont: andysans22b
  695.     will cause that to happen only in help windows.
  696.     (Notice the format of an .Xresources entry is different from a
  697.     preferences entry.)
  698.  
  699. I have a color display.  Can I get windows in colors other than black
  700. and white?
  701.     Yes, set the colors in your preference file with lines like this:
  702.  
  703.         # darker blue on lighter tan.  tan good.  (blue not really dark enough)
  704.         ez.foregroundcolor: #003ea2
  705.         ez.backgroundcolor: wheat
  706.  
  707.     For colors you can run xcolorpick or edit the file
  708.     /usr/lib/X11/rgb.txt.   Color names are recognized by X only if they
  709.     are in rgb.txt.
  710.     If you want colors just for one execution of a program, you can set
  711.     them on the command line:
  712.         typescript -fg black -bg burlywood
  713.  
  714.     Here's a technique for setting color preferences based on the value
  715.     of the environment variable ISCOLOR, which you can set in your
  716.     .login file as follows:  
  717.  
  718.         set TTY = `tty`
  719.         if ($TTY == /dev/console || \
  720.                 $TTY == /dev/hft/0 || \
  721.                 $TTY == /dev/ttyaed || \
  722.                 $TTY == /dev/ttyapa16 || \
  723.                 $TTY == /dev/ttyap16 || \
  724.                 $TTY == /dev/tty8514 || \
  725.                 $TTY == /dev/pty/ttyse || \
  726.                 $TTY == /dev/ttymono) then
  727.                 set consolelogin = 1
  728.                 echo -n "Color display? [y/n]: "
  729.                 set answer = $<
  730.                 if ($answer" =~ [Yy]*) then
  731.                         setenv ISCOLOR 1
  732.                         echo "color console login"
  733.                 else
  734.                         echo "console login"
  735.                 endif
  736.                 unset answer
  737.         endif
  738.  
  739.     You can then reference this variable in your preferences file: 
  740.  
  741.         ?E=ISCOLOR=1:ez.backgroundcolor: antiquewhite1
  742.         ?E=ISCOLOR=1:console.backgroundcolor: cornsilk
  743.         ?E=ISCOLOR=1:typescript.backgroundcolor: cornsilk3
  744.         ?E=ISCOLOR=1:help.backgroundcolor: cornsilk3
  745.         ?E=ISCOLOR=1:messages.backgroundcolor: cornsilk2
  746.         ?E=ISCOLOR=1:bush.backgroundcolor: #e5d7c6
  747.  
  748. How do I add styles to ATK documents?
  749.         help ez-styles
  750.  
  751. How do I add tables of contents and footnotes to ATK documents?
  752.         help ez-contents
  753.         help ez-footnotes
  754.  
  755. How do I adjust line spacing and margins in ATK documents?
  756.         help ez
  757.     and scroll down to "Formatting text: line spacing and margins".
  758.  
  759. What keystroke commands work in ATK programs?
  760.         help ez-keys
  761.     Notice that most gnu-emacs keys work in ATK programs. 
  762.  
  763. How do I work with multiple ez windows or multiple buffers?
  764.         help ez-buffers
  765.  
  766. How do I remove ATK formatting from an ATK document, to turn it into
  767. plain text?
  768.     The easy way is to edit it with ez, select (highlight) the entire
  769.     document, and select "Plainest". 
  770.     This will not work if the document has pagebreaks, footnotes, or
  771.     insets (such as embedded rasters.)
  772.     If you don't want to start up ez, you can use ez2ascii:
  773.         ez2ascii filename
  774.  
  775.     Another alternative is to type
  776.         rtfm -f filename
  777.     This produces output with terminal formatting. It will look ok in an
  778.     xterm, and underlining and boldface will show up correctly. However,
  779.     it will fail nastily in a typescript, or if you put the output in a
  780.     file and edit it. 
  781.  
  782.     For more info, see
  783.         help ez2ascii
  784.         help rtfm
  785.  
  786. How can I write my own console layout?
  787.         help lacc
  788.     The publically-available console layouts are in
  789.     /usr/local/lib/consoles. If you want to write your own, it's best to
  790.     start with one of these and modify it.
  791.  
  792.     Once you've written your console layout file, add this line to your
  793.     preferences:
  794.         console.default: consolefilename
  795.     where consolefile is a full pathname (no ~'s), for example
  796.     /afs/andrew/usr99/userid/layoutfile
  797.  
  798. What is a help search path?
  799.     Look at
  800.         help preferences
  801.     and scroll down to "Help preferences." (Redundant, aren't I? And
  802.     repetitive.)
  803.     The default help search path includes the help directories for all
  804.     the standard Andrew programs, and everything in /usr/contributed. To
  805.     add, for example, the help directory for the Computer Club's
  806.     programs, you would add this line to your preferences:
  807.         help.searchpath: /afs/andrew.cmu.edu/usr0/cl0x/man
  808.     If you have more than one directory in this line, they should be
  809.     separated by colons, not spaces.
  810.  
  811.     The search path is read in when you start help. If help is already
  812.     running, you can add a directory to the search path by choosing "Add
  813.     Search Directory" from the menu. This change is only temporary and
  814.     will go away when you quit help. To permanently add a directory, you
  815.     have to put it in your preferences.
  816.  
  817.  
  818. U3.  Mail and bboards
  819.  
  820. How do I set options for messages?
  821.     Select "Set Options" on the "Other" menu card. This will bring up a
  822.     long list of options where the message titles usually are, and
  823.     explanations and switches where the message bodies usually are. You
  824.     can scroll through either list, and click on the switches to change
  825.     things. (Some of these changes take effect immediately; for others,
  826.     you have to quit and restart messages.) 
  827.     There are a few, more obscure, options that you can set in your
  828.     preferences file. Type
  829.         help preferences
  830.     and scroll down to "Andrew Messages System preferences". 
  831.  
  832.  
  833. U4. Strange file formats
  834.  
  835. How do I convert rasters, bitmaps, or images from one type to another?
  836.     To convert old-style ATK rasters (.ras) to new-style ATK rasters
  837.     (.raster) or vice-versa,
  838.         help convertraster
  839.     convertraster claims to be able to convert MacPaint files that you
  840.     have ftp'd to Andrew. This may not be reliable.
  841.     To convert other image types, including X bitmaps, MacPaint files,
  842.     and GIFs, 
  843.         help pbm
  844.         help pnm
  845.     and also see the help files on all the little programs they mention.
  846.  
  847.     Some notes:
  848.         PBM, PPM, and PGM are special image file formats which are
  849.     designed to be "intermediate" conversion formats. That is, you can
  850.     convert anything to these formats, and then convert it to anything
  851.     else. (The RLE format is another "intermediate" format available on
  852.     Andrew. For information on it, see the help file on URT.)
  853.         PBM ("portable bitmap") is for simple black-and-white images
  854.     like those produced by MacPaint or bitmap. PGM ("portable greymap")
  855.     is for images with shades of grey, and PPM ("portable pixmap") is
  856.     for full-color images. PNM ("portable any-map") is not a file
  857.     format; a program called "pnm-something" can handle PBM, PPM, or PGM
  858.     files.
  859.         PBM, PGM, and PPM can be interconverted with the appropriate
  860.     programs (ppmtopgm, pgmtopbm.) Both of these lose information, of
  861.     course: ppmtopgm reduces the color image to shades of grey, and
  862.     pgmtopbm changes shades to grey to black-and-white (although it will
  863.     simulate grey by mixing black and white dots.)
  864.         Also, a PGM file can be used whenever a PPM file is expected
  865.     (ie, as input to ppm-something), and a PBM file can be used whenever
  866.     either of the other two formats is expected. This is reasonable,
  867.     since a bitmap is just a greyscale image with only two shades of
  868.     grey, and a greyscale image is just a color image with only grey
  869.     colors.
  870.         The PBM, PNM, PPM, and PGM programs (xbmtopbm, pbmtorast,
  871.     pnmrotate, etc.) are not invoked directly; instead, you run pbm with
  872.     the actual program name as the first argument. (Umm, that's still
  873.     confusing. See the examples below.) 
  874.         All the conversion programs (except convertraster) work as
  875.     filters. See the examples below.
  876.         There are two programs, atobm and bmtoa, which convert X bitmaps
  877.     to and from ASCII files. There are no help files on them.
  878.         The MacPaint to RLE program, painttorle, is not reliable for
  879.     large (full-screen) MacPaint files.
  880.         PostScript files are designed only to be printed, so they're
  881.     hard to convert to any other format. If you want to do that, you
  882.     should view the file with dxpsview and then take a window dump of
  883.     the dxpsview window (which produces an XWD file), and then convert
  884.     that.
  885.  
  886.     To convert an X bitmap to a PBM file, use
  887.         cat file.bm | pbm xbmtopbm > file.pbm
  888.  
  889.     To convert a PBM file to an X bitmap file, use
  890.         cat file.pbm | pbm pbmtoxbm > file.bm
  891.  
  892.     To convert a GIF to PostScript, use
  893.         cat file.gif | pbm giftoppm | pbm ppmtops > file.ps
  894.  
  895.     To convert a MacPaint file that you've ftp'd to Andrew to PBM, use
  896.         cat file.paint | painttorle | rletoppm | pbm ppmtopgm | pbm
  897.     pgmtopbm > file.pbm
  898.  
  899.  
  900. U5.  Working with graphics and images
  901.  
  902. What drawing and painting programs are available on Andrew?
  903.     (Drawing programs are the ones like MacDraw, that let you put down
  904.     geometric objects and then move them around, change their sizes, and
  905.     so on. Painting programs, like MacPaint, let you splot paint down on
  906.     a raster, possibly in geometric shapes, and edit it pixel by pixel.)
  907.     There are the ATK versions, zip (drawing) and raster (painting). zip
  908.     is slow and somewhat buggy, and nobody uses it. raster is very
  909.     primitive, and nobody uses it. However, they have the advantage of
  910.     letting you put zip-drawings or rasters into ATK documents along
  911.     with text.
  912.         help zip
  913.         help raster
  914.  
  915. U6. Fancy key bindings
  916.  
  917. Some packages commonly used by developers are not normally bound to keys
  918. in order to simplify the user interface.  If you want to bind them, add
  919. the given line to your ~/.atkinit file or to apply the binding just to
  920. application xxx, add the line to ~/.xxxinit.
  921.     help initfiles
  922.  
  923. How can I execute an arbitrary expression?
  924.     help ness
  925. and read
  926.     $ANDREWDIR/doc/atk/ness/nesshack.doc
  927. The normal binding of this function is ESC-ESC, though some people find
  928. this too easy to type by mistake (and Ness does take a couple of seconds
  929. to load the first time it is called).  To get the ESC-ESC binding add to
  930. your .atkinit the line:
  931.     addkey ness-dostmt  \e\e  view  
  932.  
  933. What is the "proctable"?
  934.     help procs
  935. Menu entries and key sequences are not bound directly to functions in C
  936. code.  Instead they are bound to routines made available by the C code
  937. for the various insets.  For instance, the operation on text usually
  938. bound to ESC-b, which moves the cursor backward by one word, is the
  939. proctable function textview-backward-word.  When such a function is
  940. called from Ness, however, the dashes are written as underscores:
  941. textview_backward_word.  
  942.  
  943. How can I find out what is in the proctable?
  944.     help deskey
  945. The deskey package offers several proctable functions which can be bound
  946. to keys or menu entries.  My own usage is given by these lines in my
  947. ~/.atkinit:
  948.     addkey deskey-describe-bound-keys ^XK im
  949.     addkey deskey-describe-proctable ^XP im
  950. Then control-X-shift-K opens another window showing all the current key
  951. bindings and control-X-shift-P opens a window showing all functions
  952. currently in the proctable.  More functions are added as insets with new
  953. user interfaces are added.
  954.  
  955. How can I execute an arbitrary proctable function?
  956.     help metax
  957. The metax package offers two operations to bind to keys.  They prompt
  958. for a function to execute and provide name completion by examining the
  959. proctable for function names.  To bind ESC-x the operation that calls a
  960. function without passing an argument add to .atkinit the line:
  961.     addkey metax "\ex" view metax
  962.  
  963. How can I get file name completion in typescript?
  964. If you are typing a file name to ez, you can get file name completion
  965. with space and question mark.  The same functionality is available in
  966. the typescript window, but it is better to bind it to other keys.  The
  967. following in you .atkinit:
  968.     addkey fcomp-complete-filename "\t" typescript
  969.     addkey fcomp-possible-completions "\e\t" typescript
  970. will bind TAB so it completes the currently entered file name as far as
  971. it can and will bind ESC-TAB so it offers a list of all possible
  972. completions (as a list in the typescript).
  973.  
  974. Can I perform incremental search as in gnuemacs?
  975.     help search
  976.     help gsearch
  977. Yes, three different alternative search packages are available.  Dynamic
  978. search is described in the help file for search and a gnuemacs clone is
  979. described in the gsearch helpfile.  (Unfortunately, when you ask for
  980. help on 'search', you get the gsearch helpfile;  you have to select
  981. twice the menu option Show More Documentation.)  
  982.  
  983. A simplified incremental search package with no documentation can be bound with
  984.     addkey incsearch-forward ^S textview
  985.     addkey incsearch-backward ^R textview
  986. Note that incsearch-forward MUST be bound to ^S or it will do backward
  987. searches.
  988.  
  989. How can I convert paragraphs that have hard newlines within them to ATK
  990. paragraphs with newlines only at the ends?
  991.     read $ANDREWDIR/lib/ness/format.n
  992. To convert text in messages or DOS files to ATK format, you need to wrap
  993. the lines.  This can be done with a query replace changing newlines to
  994. spaces, but this is not always satisfactory because multiple spaces are
  995. needed after sentence ending punctuation.  When you have a binding for
  996. ness-dostmt you can use a Ness function.  Select the text to be wrapped,
  997. type ESC-ESC or your binding for ness-dostmt, and then answer the prompt
  998. with 
  999.     format_wrap()
  1000. The selected text will be wrapped appropriately.
  1001.  
  1002.  
  1003. U7. Programming in Ness and C
  1004.  
  1005. Is there a way to bind a keystroke or menu to a simple combination of
  1006. other operations?
  1007.     You could write a "package" following the model of incremental
  1008.     search, but it's lots easier just to write a short Ness function.  
  1009.         help ness
  1010.     A simple approach is to create a directory ~/nesslib and put in it
  1011.     the files--say f.n and g.n--with the Ness functions.  Then in your
  1012.     .atkinit or other .XXXinit file, add the lines
  1013.         load ness
  1014.         call ness-load /usr/you/nesslib/f.n
  1015.         call ness-load /usr/you/nesslib/g.n
  1016.     Substitute the full path to your nesslib directory.  Do the "load
  1017.     ness" line only once.
  1018.  
  1019.     Example 1:  Provide a menu operation to start up a typescript. 
  1020.     (This was written for a user whose window manager and typescripts
  1021.     died often;  if any window was left the user could start a
  1022.     typescript.)  The Ness code is:
  1023.  
  1024.         extend "view:frame"
  1025.                 on menu "File,Typescript~85"
  1026.                         system("typescript"     -- launch typescript
  1027.                                         -- and don't wait:
  1028.                                 ~ " >/dev/null </dev/null  2>&1 &")
  1029.                 end menu
  1030.         end extend
  1031.  
  1032.     Example 2: Add to messages a menu option "FollowUp-To" which sets up
  1033.     a reply to the sender of the current message, excerpts the body of
  1034.     the message into the reply, and warps the mouse to the sendmessage
  1035.     window.  This code was the subject of a "call ness-load" in
  1036.     ~/.messagesinit.
  1037.  
  1038.         extend "view:messwind"
  1039.                 on menu "This Message,Followup-To"
  1040.                         messages_reply_to_sender(currentwindow)
  1041.                         messages_sendmessage_compound(currentwindow,
  1042.                                 "sendmessage-excerpt-body;"
  1043.                                 ~ "sendmessage-focus-on-body")
  1044.                         frame_next_window(currentwindow)
  1045.                         textview_end_of_text(currentinputfocus)
  1046.                 end menu
  1047.         end extend
  1048.  
  1049. How can I create the C code for a new inset?
  1050.         help createinset
  1051.     This program creates a directory and puts seven files in it which
  1052.     constitute a working, though not useful, inset.  You need only
  1053.     modify the appropriate portions to make an inset which does what you
  1054.     want.
  1055.  
  1056. _______________________
  1057.