home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1994 June / NEBULA_SE.ISO / Documents / FAQ / SGI-faq / faq / graphics < prev    next >
Encoding:
Internet Message Format  |  1993-07-15  |  57.1 KB

  1. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!usc!elroy.jpl.nasa.gov!ames!sgi!fido.asd.sgi.com!holodeck.csd.sgi.com!aschaffe
  2. From: aschaffe@holodeck.csd.sgi.com (Allan Schaffer)
  3. Newsgroups: comp.sys.sgi.misc,comp.sys.sgi.admin,comp.sys.sgi.apps,comp.sys.sgi.bugs,comp.sys.sgi.graphics,comp.sys.sgi.hardware,comp.answers,news.answers
  4. Subject: SGI graphics Frequently Asked Questions (FAQ)
  5. Supersedes: <graphics_742714517@fido.asd.sgi.com>
  6. Followup-To: comp.sys.sgi.misc
  7. Date: 15 Jul 1993 07:00:55 GMT
  8. Organization: Silicon Graphics, Inc., Mountain View, CA
  9. Lines: 1503
  10. Approved: news-answers-request@MIT.Edu
  11. Expires: 13 Aug 1993 07:01:01 GMT
  12. Message-ID: <graphics_742719661@fido.asd.sgi.com>
  13. References: <misc_742719661@fido.asd.sgi.com>
  14. Reply-To: sgi-faq@archone.tamu.edu
  15. NNTP-Posting-Host: holodeck.csd.sgi.com
  16. Originator: aschaffe@holodeck.csd.sgi.com
  17. Xref: senator-bedfellow.mit.edu comp.sys.sgi.misc:3346 comp.sys.sgi.admin:2206 comp.sys.sgi.apps:1068 comp.sys.sgi.bugs:1107 comp.sys.sgi.graphics:1590 comp.sys.sgi.hardware:1772 comp.answers:1306 news.answers:10353
  18.  
  19.  
  20. Archive-name: sgi/faq/graphics
  21.  
  22.            SGI graphics Frequently Asked Questions (FAQ)
  23.  
  24.  
  25. This information is freely distributable and wide circulation is encouraged.
  26. The contents are accurate as far as we know, but the usual disclaimers apply.
  27. This FAQ contains errors! Finding them is an exercise for alert readers.
  28.  
  29. Please send additions and changes to sgi-faq@archone.tamu.edu.
  30.  
  31. This FAQ is one of the SGI FAQ series, which consists of:
  32.  
  33.      SGI Admin FAQ - IRIX System Administration
  34.      SGI Apps FAQ - Applications & Compilers
  35.      SGI Graphics FAQ - Graphics & Windowing
  36.      SGI Hardware FAQ - Hardware issues
  37.      SGI Misc FAQ - Introduction & Miscellaneous Information
  38.  
  39. Each FAQ is posted to each comp.sys.sgi.* group as well as the news.answers
  40. and comp.answers newsgroups (whose purpose is to store FAQs) every two weeks.
  41. If you can't find one of the FAQs with your news program, you can get it by
  42. anonymous FTP from one of these sites:
  43.  
  44.  rtfm.mit.edu:pub/usenet/news.answers/sgi/faq/graphics
  45.  rtfm.mit.edu:pub/usenet/comp.sys.sgi.misc/SGI_graphics_Frequently_Asked_Questions
  46.  archone.tamu.edu:ftp/pub/sgi/faq/graphics
  47.  rtfm.mit.edu:pub/usenet/comp.answers/sgi/faq/graphics
  48.  
  49. Note that rtfm.mit.edu is home to many other FAQs and informational documents,
  50. and is a good place to look if you can't find an answer here.
  51.  
  52. Topics covered in this FAQ:
  53. --------------------------
  54.   -1- How can I quickly find the question I want in this FAQ?
  55.   -2- What books about the X Window System and OSF/Motif
  56.       do you recommend?
  57.   -3- Sun XView applications like "mailtool" are hanging
  58.       my X server in 4.0.5.  They come up fine, but as soon
  59.       as I click on them the server freezes.
  60. ! -4- Why do I get DGL errors when trying to run Jot,
  61.       Workspace, or other IRIS GL applications on an
  62.       X terminal or other non-SGI workstation?
  63.   -5- After running a few programs, the colors change as
  64.       the cursor moves. The colors are usually all wrong
  65.       in other windows.
  66.   -6- How can I change my X Server to use a 12-bit PseudoColor, 
  67.       12-bit TrueColor, or 24-bit TrueColor visual by default?
  68.   -7- The library /usr/lib/libgl_s.a isn't on my R4000 Indigo.
  69.       Where is it?
  70.   -8- How do I run a program on one machine and display
  71.       it on another?
  72.   -9- Does the DISPLAY environment variable work for
  73.       GL applications?
  74.   -10- The DISPLAY variable doesn't seem to work.  Why?
  75.   -11- I'm getting DGL errors when I display an Iris GL
  76.        application to another SGI machine.
  77.   -12- Can I save my screen layout?
  78.   -13- Sometimes an extra 4Dwm is running, using a lot of
  79.        the CPU.  Is this necessary?
  80.   -14- I'm running IRIX 4.0.1, and can't log in correctly.
  81.        After logging in the screen turns blue then goes back
  82.        to Pandora.
  83.   -15- How do I run 'xinit' manually, (not automatically
  84.        from 'xdm')?
  85.   -16- How do I start X on a remote host with no users logged in?
  86.   -17- What do the errors in my 'xdm-errors' file mean?
  87.   -18- How do I log into pandora without bringing up graphics?
  88.   -19- How do I start and stop the graphics system?
  89.   -20- Pandora won't come up, and /usr/adm/SYSLOG says
  90.        "helvetica font missing"
  91.   -21- How do I restart the console?
  92.   -22- What are resources?
  93.   -23- How do I set resources?
  94.   -24- How do I know what resources I can set for an application?
  95.   -25- How do I run the same program twice with different attributes?
  96.   -26- Does the GL recognize resources?
  97.   -27- How do I find out what fonts are available?
  98.   -28- Does SGI provide any tools to help with the
  99.        customization process?
  100.   -29- What is a good approach to take in looking for resources?
  101.   -30- What is the precedence for resource files?
  102.   -31- What files affect the window manager and what is
  103.        their relationship to each other?
  104.   -32- Do I need my own .4Dwmrc file?
  105.   -33- Can I run different window managers?
  106.   -34- How do I choose a different window manager as the default?
  107.   -35- Where can I learn more about the Window Manager behavior?
  108.   -36- How do I recover from a failed customization attempt?
  109.   -37- What is the difference between .xsession and .sgisession?
  110.   -38- After copying /usr/lib/X11/xdm/Xsession to .xsession,
  111.        I can't login.
  112.   -39- What are the important login and resource files
  113.        for IRIX 4D1-4.0?
  114.   -40- What is the sequence of events that occur at login time?
  115.   -41- How can I convert RGB Bitmaps to & from other formats?
  116.   -42- Can I compress RGB bitmaps?
  117.   -43- How can I look at a Postscript file?
  118.   -44- How do I make a screen dump?
  119.   -45- Can I use 4Dgifts code in my application?
  120.   -46- What does ERR_WMANIPC mean?
  121.   -47- How can I translate screen (x,y) coords into world
  122.        (x,y,z) coords?
  123.   -48- How can I translate world (x,y,z) coords into
  124.        screen (x,y) coords?
  125.   -49- I call mapcolor(index, R, G, B) but nothing happens.  Why?
  126. ! -50- What's wrong with blink()?
  127.   -51- When I try to run UIM/X uxserverd, I get an
  128.        error message saying, "license file has been
  129.        modified, cannot start the UIM/X license server".
  130. + -52- What is a GL widget?
  131. + -53- I'm using the GlxMDraw widget and it doesn't seem
  132.        that colors are being installed correctly.  Overlays
  133.        in the GlxMDraw widget are displayed in red and gray
  134.        instead of the colors I specify.  What is the problem?
  135. + -54- I get a "Broken Pipe" error when I close the window
  136.        of an X client, such as xman or xterm.  What does
  137.        this error mean?  Is there something wrong with my system?
  138. + -55- Is there a way to switch on the fly between single
  139.        and double buffering within a GL widget?
  140. + -56- Why doesn't SGI's xlock lock my screen?
  141. + -57- Why do I get compilation errors when compiling the 
  142.        Inventor C++ examples, using C++ 3.0?
  143.   -58- Credits
  144.  
  145. ----------------------------------------------------------------------
  146.  
  147. Subject:   -1- How can I quickly find the question I want in this FAQ?
  148. Date: 27 May 93 00:00:01 EST
  149.  
  150. - This FAQ follows the RFC1153 recommendations for message digests and thus
  151.   can be viewed easily with newsreaders that understand message digests.
  152. - Each question has a Subject: line, so you can easily step through the answers
  153.   with rn's ^G command.
  154. - Each question is marked with a "dash number dash" so that you can find any
  155.   answer with a simple search pattern.
  156. - Questions marked with a '+' are new this posting; those marked with a '!'
  157.   have significant new content since the last edition.
  158.  
  159. ------------------------------
  160.  
  161.  
  162. Subject:   -2- What books about the X Window System and OSF/Motif
  163.                do you recommend?
  164. Date: 07 May 93 00:00:01 EST
  165.  
  166.      Introductory Texts on the X Window System
  167.  
  168.      - O'Reilly and Associates Inc., "The Definitive Guides to
  169.        the X Window System", by Valerie Quercia and Tim O'Reilly. Vol.  3,
  170.        "X Window System User's Guide", Sebastopol, CA., 1988, 1989.
  171.  
  172.        Discusses being an end user of the X window system.  Covers
  173.        topics like window manages, font specifications, standard X
  174.        clients and resources.
  175.  
  176.      Texts on X Window System Programming
  177.  
  178.      - O'Reilly and Associates, Inc. "The Definitive Guides to the
  179.        X Window System", by Adrian Nye. Vol. 1, "Xlib Programming
  180.        Manual",  Sebastopol, CA., 1990.
  181.  
  182.        Contains the introductory elements for programming with the
  183.        Xlib, the lowest level of the X window system.  Discusses
  184.        concepts such as X color capacities, windows, events,
  185.        drawing primitives.
  186.  
  187.      - Young, Douglas A., "X Window Systems Programming and Applications
  188.        with Xt" (OSF/Motif Edition). Prentice Hall. Englewood
  189.        Cliffs, NJ. 1990.
  190.  
  191.        A thorough book starting with the basics of programming with
  192.        a toolkit though advanced topics.  Contains source code for
  193.        several small complete applications.  (Source code for this
  194.        book is also available on line in the /usr/src directory of
  195.        the Motif Development option.)
  196.  
  197.      - O'Reilly and Associates Inc., "The Definitive Guides to
  198.        the X Window System", by Adrian Nye and Tim O'Reilly. Vol. 4,
  199.        "X Toolkit Intrinsics Programming Manual", Sebastopol, CA., 1990.
  200.  
  201.        Another reference for programming with the OSF/Motif
  202.        toolkit.  Covers topics including basic programming,
  203.        widgets, resources, and more advanced topics.
  204.  
  205.      Reference Texts for the X Window System :
  206.  
  207.      - O'Reilly and Associates Inc., "The Definitive Guides to
  208.        the X Window System", by Adrian Nye. Vol. 2,
  209.        "Xlib Reference Manual", Sebastopol, CA., 1988.
  210.  
  211.        Complete reference for Xlib library routines.
  212.  
  213.      - Scheifler, Robert and James Gettys, X Window System, Second Edition,
  214.        Digital Press, 1990.  ISBN 1-55558-050-5.
  215.  
  216.        Referred to as "the Bible" of Xlib and X Protocol reference.
  217.  
  218.      Reference Texts for the OSF/Motif Toolkit :
  219.  
  220.      - Open Software Foundation, "OSF/Motif Programmer's Guide".
  221.        Release 1.1, Prentice Hall. Englewood Cliffs, NJ. 1990.
  222.  
  223.        Exhaustive reference of every widget in the OSF/Motif library.
  224.  
  225.      - Asente, Paul J. and Ralph R. Swick. "X Window System Toolkit".
  226.        X Version 11, Release 4. Digital Press. 1990.
  227.  
  228.        Very in-depth reference to the structure and operation of
  229.        an X window system toolkit.
  230.  
  231.  
  232. ------------------------------
  233.  
  234. Subject:   -3- Sun XView applications like "mailtool" are hanging
  235.                my X server in 4.0.5.  They come up fine, but as soon
  236.                as I click on them the server freezes.
  237. Date: 07 May 93 00:00:01 EST
  238.  
  239.      Any XView application run under the Xsgi X11-server shipped in
  240.      IRIX versions 4.0.5A through 4.0.5G will lock the X Server on 
  241.      the first mouse click and will not release it until killed from 
  242.      somewhere else.  Fortunately there is a workaround:
  243.  
  244.      a) Run the application with '-Wfsdb' on the command line.
  245.         Alternatively you could use '-fullscreendebug'.  For example:
  246.  
  247.     % mailtool -Wfsdb
  248.  
  249.      b) If you have the sources, add
  250.             extern int fullscreendebug;
  251.         before main() and
  252.             fullscreendebug = 1;
  253.         after the xv_init() call.  This forces the program to set this
  254.         flag in any case - even when run with non-SGI X servers.  It 
  255.     releases you of the danger of omitting -Wfsdb and locking
  256.     your screen.
  257.  
  258.      c) if the program uses the 'fullscreen' package, you might add
  259.            Fullscreen.Debug: True
  260.         in $HOME/.Xresources or specify this resource on the command
  261.         line.  This flag currently disables grabs in both the 'window'
  262.         and the 'fullscreen' package, but is only set from resources
  263.         in the 'fullscreen' package.
  264.  
  265. ------------------------------
  266.  
  267. Subject: ! -4- Why do I get DGL errors when trying to run Jot,
  268.                Workspace, or other IRIS GL applications on an
  269.                X terminal or other non-SGI workstation?
  270. Date: 07 May 93 00:00:01 EST
  271.  
  272.      This occurs because X Terminals and other vendors X servers
  273.      only understand X protocols.  The above applications use Iris GL,
  274.      which is not an X server extension.
  275.  
  276.      It is not currently possible to display IRIS GL-based applications
  277.      on X terminals or other non-SGI workstations.
  278.  
  279.      Typically the error message resembles the following:
  280.  
  281.      dgl error (TCP connect): Connection refused
  282.      dgl error (default init): default dglopen(host:0,4) returned -127
  283.  
  284.      When OpenGL is available from other vendors, then you will be able
  285.      to do OpenGL rendering to those servers that export the GLX extension.
  286.      OpenGL is a normal X extension and the transport happens automatically
  287.      via the X transport stream.
  288.  
  289.  
  290. ------------------------------
  291.  
  292. Subject:   -5- After running a few programs, the colors change as
  293.                the cursor moves. The colors are usually all wrong
  294.                in other windows.
  295. Date: 07 May 93 00:00:01 EST
  296.  
  297.      This is known as colormap flashing. It is caused by the server
  298.      maintaining 2 seperate colormaps, one for GL windows and one for
  299.      X windows.  As the cursor moves around, the window manager will
  300.      install the correct colormap for each window.  This will cause
  301.      colors to be wrong in other windows.  For more information on
  302.      colormaps and installation please see the Xlib Programming manual,
  303.      chapter 7 (Vol I of the O'Reilly series).
  304.  
  305.      You can sometimes avoid colormap flasing by configuring your
  306.      X Server to use a 12-bit or 24-bit visual by default.
  307.  
  308. ------------------------------
  309.  
  310. Subject:   -6- How can I change my X Server to use a 12-bit PseudoColor, 
  311.                12-bit TrueColor, or 24-bit TrueColor visual by default?
  312. Date: 07 May 93 00:00:01 EST
  313.  
  314.      By default, the SGI X Server is configured to use an 8-bit
  315.      PseudoColor visual.  X-based applications can request other
  316.      visuals directly if they are available.  Alternatively, you 
  317.      can change the default visual by performing the following steps:
  318.  
  319.      a) Run "/usr/bin/X11/xdpyinfo" and check that your server is
  320.         capable of using a 12-bit or 24-bit visual.  If it is,
  321.     you will see lines similar to the following:
  322.  
  323.         visual id, max buffers, depth:    0x28, 0, 12
  324.         visual id, max buffers, depth:    0x29, 0, 12
  325.         visual id, max buffers, depth:    0x2a, 0, 24
  326.  
  327.     The last number on each line represents the number of
  328.     bits available for that visual.
  329.     
  330.      b) Log in as root
  331.  
  332.      c) Edit the file /usr/lib/X11/xdm/Xservers.  By default it
  333.     will contain the string:
  334.           :0 secure /usr/bin/X11/X -bs -c -pseudomap 4sight
  335.         for a 24-bit TrueColor visual change it to:
  336.       :0 secure /usr/bin/X11/X -bs -c -class TrueColor -depth 24
  337.         for a 12-bit PseudoColor visual change it to:
  338.       :0 secure /usr/bin/X11/X -bs -c -class PseudoColor -depth 12
  339.  
  340.      d) Restart your X server.  You can do this by invoking either
  341.     of the following commands:
  342.  
  343.     % killall -TERM Xsgi
  344.  
  345.     % /usr/gfx/stopgfx; /usr/gfx/startgfx
  346.  
  347.      Note:  X Server visuals are an advanced topic; before making 
  348.      the above changes you should be aware that some 3rd-party and 
  349.      freeware applications might not gracefully adapt to an X Server
  350.      which supplies anything but an 8-bit PseudoColor visual by default.
  351.  
  352. ------------------------------
  353.  
  354. Subject:   -7- The library /usr/lib/libgl_s.a isn't on my R4000 Indigo.
  355.                Where is it?
  356. Date: 07 May 93 00:00:01 EST
  357.  
  358.      It's in the "maint" software, in the maint_gl_x_dev package.
  359.  
  360.  
  361. ------------------------------
  362.  
  363. Subject:   -8- How do I run a program on one machine and display
  364.                it on another?
  365. Date: 07 May 93 00:00:01 EST
  366.  
  367.      Use the DISPLAY environment variable to specify the remote host
  368.      on which you want the X client to be displayed; then invoke the
  369.      appplication.
  370.  
  371.      To specify the remote host:
  372.  
  373.      setenv DISPLAY <destination>:0
  374.  
  375.      where <destination> is the name or IP address of the remote host.
  376.  
  377.      To specify the local host (console):
  378.  
  379.      setenv DISPLAY :0
  380.  
  381.  
  382. ------------------------------
  383.  
  384. Subject:   -9- Does the DISPLAY environment variable work for
  385.                GL applications?
  386. Date: 07 May 93 00:00:01 EST
  387.  
  388.      Yes.  Iris GL programs display on the machine specified by the
  389.      DISPLAY environment variable.  This occurs because the GL now uses
  390.      the Distributed Graphics Library (DGL) capabilities by default.  It
  391.      is important to remember that only Silicon Graphics' machines can
  392.      display GL.  For networks running NIS (formerly yellow pages),
  393.      it is sometimes necessary to add the flag "-lsun" when compiling.
  394.  
  395.  
  396. ------------------------------
  397.  
  398. Subject:   -10- The DISPLAY variable doesn't seem to work.  Why?
  399. Date: 07 May 93 00:00:01 EST
  400.  
  401.      There are several possibilities.  First, check your DISPLAY
  402.      variable to make sure it is syntactically correct.  For example,
  403.      to display applications on a machine named "enterprise" whose
  404.      IP address is 123.45.678.90, it should be set to "enterprise:0"
  405.      or "123.45.678.90:0".
  406.  
  407.      Also, try to "ping" the machine to which your DISPLAY variable
  408.      is set.  If this does not work, you have either specified an
  409.      invalid hostname, the host is down, or you are having network
  410.      problems.
  411.  
  412.      Sometimes, when trying to display to a remote server, you see
  413.      messages like "permission denied" or "can't connect to server".
  414.      To solve permission problems, you need to disable access control
  415.      on the remote server using the xhost command.  By default, access
  416.      control is disabled on Silicon Graphics' machines.
  417.  
  418.      For more information see Chapter 3 of the X Window System
  419.      User's Guide, (Vol. 3 of the O'Reilly series)
  420.  
  421.      If NIS is used, make sure the client is linked with "-lsun".
  422.  
  423.  
  424. ------------------------------
  425.  
  426. Subject:   -11- I'm getting DGL errors when I display an Iris GL
  427.                 application to another SGI machine.
  428. Date: 07 May 93 00:00:01 EST
  429.  
  430.      Commonly the errors will look like:
  431.  
  432.      dgl error (TCP connect): Connection refused
  433.      dgl error (default init): default dglopen(enterprise:0) returned -127
  434.  
  435.      If this is the case, check the files /etc/services and
  436.      /usr/etc/inetd.conf on both machines.  Make sure neither
  437.      of the lines below have been commented out.  The services
  438.      file should contain a line which reads:
  439.  
  440.      sgi-dgl         5232/tcp
  441.  
  442.      inetd.conf should contain a line which reads:
  443.  
  444.      sgi-dgl stream  tcp   nowait  root   /usr/etc/dgld  dgld -IM -tDGLTSOCKET
  445.  
  446.  
  447. ------------------------------
  448.  
  449. Subject:   -12- Can I save my screen layout?
  450. Date: 07 May 93 00:00:01 EST
  451.  
  452.      Not very easily.  You must run "xwininfo" to find the X and Y
  453.      position of each window, then use that information to customize
  454.      your .sgisession or .xsession files.
  455.  
  456.      There is also a tool called "xtoolplaces" that was posted to
  457.      comp.sources.x in volume14.
  458.  
  459.      For more information see Chapter 3 of the X Window System
  460.      User's Guide, (Vol. 3 of the O'Reilly series)
  461.  
  462.  
  463. ------------------------------
  464.  
  465. Subject:   -13- Sometimes an extra 4Dwm is running, using a lot of
  466.                 the CPU.  Is this necessary?
  467. Date: 07 May 93 00:00:01 EST
  468.  
  469.      No, there should only be one.  This multiple window manager
  470.      problem usually is triggered by the "kill" feedback of the
  471.      window manager when a user logs out.  The workaround for the
  472.      problem is to remove the "kill" feedback.
  473.  
  474.      The "kill" feedback is controlled by the resource "showFeedback."  For
  475.      4Dwm, this resource is defined in /usr/lib/X11/app-defaults/4DWm as:
  476.  
  477.           *showFeedback:       behavior restart quit kill
  478.  
  479.      Modify the resource to read:
  480.  
  481.           *showFeedback:       behavior restart quit
  482.  
  483.      For mwm, set a "showFeedback" resource that does not include the
  484.      "kill" feedback in /usr/lib/X11/app-defaults/Mwm.  A sample setting is:
  485.  
  486.           Mwm*showFeedback:  move placement resize behavior restart quit
  487.  
  488.  
  489. ------------------------------
  490.  
  491. Subject:   -14- I'm running IRIX 4.0.1, and can't log in correctly.
  492.                 After logging in the screen turns blue then goes back
  493.                 to Pandora.
  494. Date: 07 May 93 00:00:01 EST
  495.  
  496.      The problem is caused by an incorrect shutdown.  When you log
  497.      out, xdm runs /usr/sbin/gamma and writes the current value to
  498.      /etc/config/system.glGammaVal.  IRIX buffers this data in main
  499.      memory in the buffer cache.  If the system is powered off right
  500.      after logout, the data is not written to the file.
  501.  
  502.      a) Login to your system as root, either via the network or
  503.         by taking the machine down to single-user mode.
  504.  
  505.      b) enter these commands at the # prompt:
  506.  
  507.         # cd /etc/config
  508.         # cat system.glGammaVal
  509.  
  510.      If the cat command returns a value of 1.7000, contact your technical
  511.      support provider for additional troubleshooting.  If the command
  512.      returns nothing (empty file) or "0", it means the problem can be
  513.      fixed by entering the following command:
  514.  
  515.     # /bin/rm system.glGammaVal
  516.         # /bin/echo "1.7" > system.glGammaVal
  517.  
  518.      Check your work:
  519.         # cat system.glGammaVal
  520.  
  521.      The command above should now return 1.7.
  522.  
  523.      Your login should now be successful. If you edited the file while
  524.      Pandora was running, you'll find the first login attempt will fail,
  525.      but any later attempts will be successful. After the first login
  526.      attempt, Pandora will read in the correct gamma value.
  527.  
  528.  
  529. ------------------------------
  530.  
  531. Subject:   -15- How do I run 'xinit' manually, (not automatically
  532.                 from 'xdm')?
  533. Date: 07 May 93 00:00:01 EST
  534.  
  535.      Note that this change would affect all users.
  536.  
  537.      1) log in as root
  538.      2) Type:
  539.     /usr/gfx/stopgfx
  540.     chkconfig xdm off.
  541.      3) all users need to copy /usr/bin/X11/X to their home directory
  542.         (renaming the file to .xserverrc), removing the if test for
  543.         windowsystem, OR be familiar enough with xinit to have an
  544.         alternate command line.
  545.      4) transfer all startup programs from .xsession/.sgisession to .xinitrc.
  546.      5) the last program to start from .xinitrc must not exit.  When this
  547.         one exits, the session terminates.
  548.  
  549.  
  550. ------------------------------
  551.  
  552. Subject:   -16- How do I start X on a remote host with no users logged in?
  553. Date: 07 May 93 00:00:01 EST
  554.  
  555.      This example starts up an xclock on the remote system.  The easy
  556.      way to test this for now is to rlogin to the system and type the
  557.      commands.  Once something works you can write some shell scripts
  558.      and use rsh to run them:
  559.  
  560.      hydra is being used to login to oscar and start graphics on oscar.
  561.      oscar is displaying the pandora login when this is done:
  562.  
  563.      hydra 2% rlogin oscar -l root
  564.      oscar 1# /usr/gfx/stopgfx     (screen blanks)
  565.      oscar 2# chkconfig windowsystem on
  566.      oscar 3# setenv DISPLAY :0.0  (display on local screen)
  567.      oscar 4# /usr/bin/X11/X &  (start Xsgi)
  568.      oscar 5# xclock &  (clock is displayed)
  569.  
  570.      To clean up:
  571.  
  572.      oscar 6# /usr/gfx/stopgfx     (screen blanks)
  573.      oscar 7# /usr/gfx/startgfx  (re-start pandora)
  574.  
  575.  
  576. ------------------------------
  577.  
  578. Subject:   -17- What do the errors in my 'xdm-errors' file mean?
  579. Date: 07 May 93 00:00:01 EST
  580.  
  581.      It depends on the error message, obviously.  Some are:
  582.  
  583.        unable to load display mode, rnid = 196614, errno = 22
  584.        Failed to unbind rn from clip, rnid = 3,errno = 22
  585.        bogus window id in rrm request type(2)
  586.  
  587.      These are messages related to the communication between the rrm 
  588.      layer in the kernel and the X server.  The messages usually occur
  589.      when a GL window is being destroyed in a sequence that the X server
  590.      did not expect.  They are quite benign.
  591.  
  592. ------------------------------
  593.  
  594. Subject:   -18- How do I log into pandora without bringing up graphics?
  595. Date: 07 May 93 00:00:01 EST
  596.  
  597.      In IRIX 3.3 you could specify the "NOGRAPHICS" option on the
  598.      login screen.  The "NOGRAPHICS" option has been replaced with
  599.      the keyword "failsafe" that is typed after the users name on
  600.      the login screen.  However, this command no longer brings up
  601.      a "textport" window without graphics.  Instead, it now starts
  602.      a single xwsh on the center of the screen with no window manager.
  603.      Example login:
  604.  
  605.        login: root failsafe
  606.  
  607. ------------------------------
  608.  
  609. Subject:   -19- How do I start and stop the graphics system?
  610. Date: 07 May 93 00:00:01 EST
  611.  
  612.      Use /usr/gfx/startgfx and /usr/gfx/stopgfx.  Be aware that
  613.      stopgfx will kill any active windows and log you out.  Under
  614.      IRIX 3.* use /etc/gl/restartgl.
  615.  
  616. ------------------------------
  617.  
  618. Subject:   -20- Pandora won't come up, and /usr/adm/SYSLOG says
  619.                 "helvetica font missing"
  620. Date: 07 May 93 00:00:01 EST
  621.  
  622.      It appears that the subsystem, "eoe2.sw.fonts" did not get loaded.
  623.      Re-install the subsystem using the following sequence from 'inst':
  624.      1) type "inst" or boot the mini-root, as documented in Section 4.5
  625.         of the "IRIS Software Installation Guide"
  626.      2) keep *
  627.      3) set neweroverride on
  628.      4) install eoe2.sw.fonts
  629.      5) exit
  630.  
  631. ------------------------------
  632.  
  633. Subject:   -21- How do I restart the console?
  634. Date: 07 May 93 00:00:01 EST
  635.  
  636.      Use /usr/sbin/startconsole.  In IRIX 3.*, use /etc/gl/startconsole.
  637.  
  638. ------------------------------
  639.  
  640. Subject:   -22- What are resources?
  641. Date: 07 May 93 00:00:01 EST
  642.  
  643.      Basically, resources are "attributes" that control the
  644.      look and feel of an application. Resources include color, fonts,
  645.      size, location, and more.  Resources can have a complex format for
  646.      binding strengths.
  647.  
  648.      For a complete description of resources, including a description
  649.      of "loose" and "tight" bindings, consult a book listed in the
  650.      bibliography for question #25.
  651.  
  652.  
  653. ------------------------------
  654.  
  655. Subject:   -23- How do I set resources?
  656. Date: 07 May 93 00:00:01 EST
  657.  
  658.      There are many ways to set resources. Resources may be listed
  659.      in files or contained in a data base. It is recommended that
  660.      you consult a Book on X as well as the man page for "xrdb"
  661.      for detailed descriptions. Generally speaking, if xrdb is not
  662.      used, resource files are specified through environment
  663.      variables. Question #14 addresses the precedence of these
  664.      files and variables.
  665.  
  666.      For some examples, see the file /usr/tutor/Customize/example.Xdefaults.
  667.  
  668.  
  669. ------------------------------
  670.  
  671. Subject:   -24- How do I know what resources I can set for an application?
  672. Date: 07 May 93 00:00:01 EST
  673.  
  674.      The most common place to find resource variables for a particular
  675.      application is in the man page for that application.
  676.  
  677.      For example, take a look at the man page for `xwsh'.  Look for
  678.      the section heading called `RESOURCES'.  This section lists
  679.      each resource for `xwsh', and in some cases, the valid
  680.      values for that resource.
  681.  
  682.      Also, many major applications are built on top of the
  683.      Xt toolkit. There are standard resources that these
  684.      applications recognize. For a more complete description,
  685.      see one of the books on Xt listed in the bibliography.
  686.  
  687.  
  688. ------------------------------
  689.  
  690. Subject:   -25- How do I run the same program twice with different attributes?
  691. Date: 07 May 93 00:00:01 EST
  692.  
  693.      To accomplish this task, you need to take advantage of the
  694.      "instance vs class" concept. This concept is explained further
  695.      in most books on Xt.
  696.  
  697.      Many applications have a resource that lets you to give it a unique name.
  698.      For example, from the xwsh man page :
  699.  
  700.  
  701.      -name instance-name
  702.       Provide a unique name for an xwsh window.  This name becomes
  703.       the instance name of the specific xwsh, with the class name
  704.       always being "XWsh".
  705.  
  706.       Using the -name option allows you to give "names" to different
  707.       instances of xwsh and assign different resources to each one.
  708.       So if you want two different xwsh's with different resource sets,
  709.       give them two different names, say howdymom and howdydoody, for example.
  710.       Add the following to your ~/.Xdefaults file (if you use .Xdefaults) :
  711.  
  712.       howdymom*foreground:       SeaGreen
  713.       howdydoody*foreground:     SGIBeet
  714.  
  715.       Now all you have to do is start them up :
  716.       xwsh -name howdymom&
  717.       xwsh -name howdydoody&
  718.  
  719.  
  720. ------------------------------
  721.  
  722. Subject:   -26- Does the GL recognize resources?
  723. Date: 07 May 93 00:00:01 EST
  724.  
  725.      Yes. In IRIX 4.0 and later, the GL responds to several X resources,
  726.      allowing run-time control over some aspects of GL programs.
  727.  
  728.      The man page assumes you are somewhat familiar with X resources, if you
  729.      are not, you should read some X documentation such as Volume 3 of the
  730.      O'Reily X books.
  731.  
  732.      The GL uses resources names with the prefixes
  733.           appname.gl.                (instance prefix)
  734.           Appname.GL.                (class prefix)
  735.      where appname and Appname are derived from the argument to the GL
  736.      program's first call to winopen(3G) upper case.
  737.  
  738.      For complete information see the man page for GLRESOURCES.
  739.  
  740.  
  741. ------------------------------
  742.  
  743. Subject:   -27- How do I find out what fonts are available?
  744. Date: 07 May 93 00:00:01 EST
  745.  
  746.      The xfontsel and xlsfonts utilities help you find appropriate fonts.
  747.      xlsfonts lists the fonts; xfontsel provides an interface for selecting
  748.      a desired font. To use xfontsel, choose "Font Names" from the
  749.      Customization rollover menu in the Toolchest.  Please see the man
  750.      pages and the IRIS Utilities Guide for further information.
  751.  
  752.  
  753. ------------------------------
  754.  
  755. Subject:   -28- Does SGI provide any tools to help with the
  756.                 customization process?
  757. Date: 07 May 93 00:00:01 EST
  758.  
  759.      Yes. The Customization rollover menu in the Toolchest contains three
  760.      entries: Window Info, Color Names, and Font Names.  Please refer
  761.      to the man pages on these commands for details: xfontsel, xlsfonts,
  762.      xwininfo, xdpyinfo, xprop, appres, listres, and xrdb.
  763.  
  764.      Also, see the "WorkSpace User's Guide" and the example files in
  765.      /usr/tutor/Customize.
  766.  
  767.  
  768. ------------------------------
  769.  
  770. Subject:   -29- What is a good approach to take in looking for resources?
  771. Date: 07 May 93 00:00:01 EST
  772.  
  773.      The following is a recommended list  of steps
  774.      to take when searching for a resource, binding, behavior, etc.
  775.  
  776.      1)  Look in the 4.0 Transition Guide.
  777.      2)  Look in /usr/tutor/Customize.
  778.      3)  Look in /usr/demos.
  779.      4)  Look in ~4Dgifts.  (Available with the development option.)
  780.      5)  If the client you are interested in is a GL client, see the
  781.          man page for GLRESOURCES.
  782.      6)  Look in /usr/lib/X11/app-defaults/ClientName.
  783.      7)  Look in /usr/lib/X11/system.* .
  784.      8)  Look through the man page for the client you are interested in.
  785.      9)  Look in O'Reilly & Associates Vol. III. It has many gems
  786.          pertaining to standard X clients.
  787.      10) Look in the documentation that came with your application.
  788.      11) Look in the OSF Motif manuals.
  789.      12) Post to comp.windows.x if you can not find
  790.          an answer using steps 1 through 11.
  791.  
  792.  
  793. ------------------------------
  794.  
  795. Subject:   -30- What is the precedence for resource files?
  796. Date: 07 May 93 00:00:01 EST
  797.  
  798.      The following list indicates the weight of set resources.
  799.      Items at the top have the greatest weight.
  800.  
  801.      1) Hard coded values for resources.
  802.      2) Command line arguments.
  803.      3) Resources pointed to by $XENVIRONMENT.
  804.      4) Resource values loaded into the Resource Data Base via xrdb.
  805.      5) Resources pointed to by other environment variables :
  806.  
  807.      IF $XUSERFILESEARCHPATH is set
  808.          then it contains a list of directories to search.
  809.  
  810.      ELSE IF $XAPPLRESDIR is set
  811.          it contains a single directory, and a short list of related
  812.          directories (e.g. adjusted for language) is where resource
  813.          files must be found.
  814.  
  815.      ELSE
  816.          Look in a short list of places related to $HOME (e.g.
  817.          language adjusted). This includes files in $HOME that have
  818.          the
  819.                 name of the class of the application.
  820.  
  821.      6) Resource values set in $HOME/.Xdefaults, provided that the
  822.         RESOURCE_MANAGER property hasn't been set via the xrdb command.
  823.         (see the third paragraph in the xrdb man page)
  824.      7) Values set in /usr/lib/X11/app-defaults/*.
  825.      8) Values set through through the application's fall back mechanism.
  826.  
  827.  
  828. ------------------------------
  829.  
  830. Subject:   -31- What files affect the window manager and what is
  831.                 their relationship to each other?
  832. Date: 07 May 93 00:00:01 EST
  833.  
  834.      1)~/.4Dwmrc, if you have one
  835.      2)/usr/lib/X11/system.4Dwmrc
  836.      3)/usr/bin/X11/4Dwm
  837.      4)/usr/lib/X11/app-defaults/4Dwm
  838.      5)~/.Xdefaults (or wherever you set resources)
  839.  
  840.      When 4Dwm is started, it looks for ~/.4Dwmrc. If it does
  841.      not exist, it looks at /usr/lib/X11/system.4Dwmrc. The
  842.      definitions for button bindings, menus, etc are contained
  843.      in these files. For a better description of bindings,
  844.      look in /usr/tutor/Customize/example.4Dwmrc and /usr/people/
  845.      4Dgifts/.4Dwmrc. Also see the man pages for 4Dwm.
  846.  
  847.      The resource set for the bindings will actually "choose"
  848.      which binding definition is set.
  849.  
  850.  
  851. ------------------------------
  852.  
  853. Subject:   -32- Do I need my own .4Dwmrc file?
  854. Date: 07 May 93 00:00:01 EST
  855.  
  856.      Not necessarily. As mentioned in the previous question,
  857.      actual bindings are determined by resource names. If there
  858.      is a binding definition in /usr/lib/X11/system.4Dwmrc
  859.      that you like, you may choose it by setting the appropriate
  860.      resource.
  861.  
  862.  
  863. ------------------------------
  864.  
  865. Subject:   -33- Can I run different window managers?
  866. Date: 07 May 93 00:00:01 EST
  867.  
  868.      In Irix 4D1-4.0, you may choose 4Dwm, mwm, twm, or uwm. Note that GL
  869.      programs are guaranteed to work only under 4Dwm.
  870.  
  871.  
  872. ------------------------------
  873.  
  874. Subject:   -34- How do I choose a different window manager as the default?
  875. Date: 07 May 93 00:00:01 EST
  876.  
  877.      You must use a .xsession file and explicitly invoke the
  878.      window manager and any other applications you want to
  879.      use, such as 'toolchest' and 'xwsh'.
  880.  
  881.      After making this change, you may only be able to log out
  882.      by using the "Log Out" selection in the toolchest, or by
  883.      executing /usr/bin/X11/endsession.
  884.  
  885.      Here are the contents a sample .xsession file:
  886.  
  887.     xhost + &
  888.         toolchest -name ToolChest > /dev/console 2&>1 &
  889.         winterm -bg red &
  890.         winterm -bg blue &
  891.         mwm > /dev/console 2&>1 &
  892.     /usr/bin/X11/reaper
  893.  
  894.      Note that 'reaper' is not put into the background.
  895.      When 'reaper' exits you will be logged out.
  896.  
  897.      Alternatively, you can do the following steps:
  898.  
  899.      1.  cp /usr/lib/X11/xdm/Xsession ~/.xsession
  900.  
  901.      2.  Remove the lines in ~/.xsession that say:
  902.          if [ -r $xsession -a "$0" != $xsession ]; then
  903.                  if [ -x $xsession ]; then
  904.                          exec $xsession
  905.                  else
  906.                          exec /bin/sh $xsession
  907.                  fi
  908.          fi
  909.  
  910.      3.  Change the line that says:
  911.          /usr/bin/X11/4Dwm >/dev/console 2>&1 &
  912.          to:
  913.          /usr/bin/X11/mwm > /dev/console 2>&1 &
  914.  
  915.  
  916. ------------------------------
  917.  
  918. Subject:   -35- Where can I learn more about the Window Manager behavior?
  919. Date: 07 May 93 00:00:01 EST
  920.  
  921.      The man pages for 4Dwm and mwm contain a wealth of
  922.      information on the window manager. There are
  923.      also online files. You may want to read
  924.      /usr/tutor/Customize/example.4Dwmrc as well as
  925.      /usr/people/4Dgifts/.4Dwmrc (if you have the IDO option).
  926.      The OSF/Motif manuals listed in the bibliography are
  927.      also good places to find information. (4Dwm is based
  928.      on mwm).
  929.  
  930.  
  931. ------------------------------
  932.  
  933. Subject:   -36- How do I recover from a failed customization attempt?
  934. Date: 07 May 93 00:00:01 EST
  935.  
  936.      If your attempt at customization leaves you in a state
  937.      where buttons and menus are no longer recognized, you
  938.      can recover by pressing the <Alt><CTRL><Shift><!>keys
  939.      simultaneously. A menu appears that will let you
  940.      choose Motif, Iris, or user defaults. Choose either
  941.      Motif or Iris defaults and then push OK. This
  942.      restarts the window manager to a usable state.
  943.  
  944.  
  945. ------------------------------
  946.  
  947. Subject:   -37- What is the difference between .xsession and .sgisession?
  948. Date: 07 May 93 00:00:01 EST
  949.  
  950.      The system Xsession file (/usr/lib/X11/xdm/Xsession or Xsession-remote)
  951.      starts up a number of important things when you log in, eg. 4Dwm,
  952.      toolchest, loads resources, sets your XUSERFILESEARCHPATH, sets your
  953.      root background, etc.
  954.  
  955.      One of the last things it does is look in your home directory for
  956.      a .sgisession file.  This allows you to start additional programs
  957.      at login time. This is the file that you would use to start a mailbox,
  958.      additional window, a calendar, etc.
  959.  
  960.      ADVANTAGES OF $HOME/.sgisession :
  961.  
  962.      1) You don't need to read through yet another system file to see
  963.         what you need or don't need.
  964.  
  965.      2) You can override some of the defaults the system default has
  966.         given you.
  967.  
  968.      DISADVANTAGES OF $HOME/.sgisession :
  969.  
  970.      1) You cannot override ALL of the defaults set for you.
  971.  
  972.      2) Some things you can't change from a .sgisession file :
  973.         A) You can't start a different window manager.
  974.         B) You can't change the way the console starts.
  975.         C) You can't change toolchest output redirection to
  976.              the console.
  977.  
  978.      3) Users of other vendors equipment are used to seeing a .xsession file.
  979.  
  980.      After checking for a "failsafe" (ie. no graphics) login, one of
  981.      the first things that /usr/lib/X11/xdm/Xsession does is check for
  982.      $HOME/.xsession.  If it exists, Xsession will exec your .xsession
  983.      file.  This means that if you are REALLY sure you know what you are
  984.      doing, you can login with a different window manager, xterm as a
  985.      console, or xwsh not already iconified, etc.  You can also turn
  986.      off the toolchest output redirection, and start anything else you
  987.      might have done in $HOME/.sgisession. There is a discussion on
  988.      xsession files in volume 3 of the O'Reilly series.
  989.  
  990.      This next part might be redundant
  991.  
  992.      From the login event sequence mentioned earlier, you will note
  993.      that /usr/lib/X11/xdm/Xsession tries to exec $HOME/.xsession
  994.      if it exists. This is how you would go about changing
  995.      programs started by default. An example is the start of the
  996.      window manager. There is a discussion on xsession files in volume
  997.      3 of the O'Reilly series. For examples of alternate xsession files
  998.      look at /usr/people/4Dgifts/.xsession or /usr/demos/.xsession.
  999.  
  1000.      If you don't have a $HOME/.xsession file, /usr/lib/X11/xdm/Xsession
  1001.      starts things for you and eventually looks for $HOME/.sgisession.
  1002.      This is a good way to start additional programs without
  1003.      changing what is started by default.
  1004.  
  1005.  
  1006. ------------------------------
  1007.  
  1008. Subject:   -38- After copying /usr/lib/X11/xdm/Xsession to .xsession,
  1009.                 I can't login.
  1010. Date: 07 May 93 00:00:01 EST
  1011.  
  1012.      After copying this file to your home directory, you need
  1013.      to remove all references to "xsession". References to xsession
  1014.      cause the system to try to execute $HOME/.xsession, which will
  1015.      create an infinite loop.
  1016.  
  1017.      Remove the lines in ~/.xsession that say:
  1018.  
  1019.        if [ -r $xsession -a "$0" != $xsession ]; then
  1020.                if [ -x $xsession ]; then
  1021.                        exec $xsession
  1022.                else
  1023.                        exec /bin/sh $xsession
  1024.                fi
  1025.        fi
  1026.  
  1027.  
  1028. ------------------------------
  1029.  
  1030. Subject:   -39- What are the important login and resource files
  1031.                 for IRIX 4D1-4.0?
  1032. Date: 07 May 93 00:00:01 EST
  1033.  
  1034.      The following three file groupings indicate where files that
  1035.      affect your login session reside.
  1036.  
  1037.      1) /usr/lib/X11/* - This is THE starting place. Here you find
  1038.      the system default bindings for Motif, 4Dwm, and the
  1039.      Toolchest. The xdm directory lives here as well as the
  1040.      app-defaults directory. xdm controls the session management.Many
  1041.      application defaults are set in the app-defaults directory.
  1042.  
  1043.      2) $HOME/[.Xdefaults, .4Dwmrc, .chestrc, .xsession, .sgisession]
  1044.      Here you find the files that control your system set-up.
  1045.      You create these files; they don't exist when you first log in.
  1046.  
  1047.      3) /usr/bin/X11 - This is where the binaries live. It makes
  1048.      life nice to include this directory in your path.
  1049.  
  1050.  
  1051. ------------------------------
  1052.  
  1053. Subject:   -40- What is the sequence of events that occur at login time?
  1054. Date: 07 May 93 00:00:01 EST
  1055.  
  1056.      This is a bare bones synopsis of the events that occur when
  1057.      you log in to the console via xdm (xdm is the default method
  1058.      of logging in).
  1059.  
  1060.      1) Provide a "failsafe" (nographics) login if required/requested.
  1061.      2) Exec $HOME/.xsession if it exists. If it exists, the remaining
  1062.         steps should normally be included in the users .xsession file as
  1063.         well.
  1064.      3) Load $HOME/.Xresources if it exists.
  1065.      4) Set XUSERFILESEARCHPATH.
  1066.      5) Incorporate a "shell" environment
  1067.         into the "session". (man userenv)
  1068.      6) Set the root background and cursor.
  1069.      7) Start 4Dwm.
  1070.      8) Wait for 4Dwm to come up.
  1071.      9) Disable display access control (xhost +).  (man xhost)
  1072.      10) Execute $HOME/.sgisession if it exists.
  1073.      11) Start WorkSpace if the user wants it.
  1074.      12) Put a Toolchest on each screen.
  1075.      13) Start the console.
  1076.      14) Exec the "reaper". (man reaper / endsession)
  1077.  
  1078. ------------------------------
  1079.  
  1080. Subject:   -41- How can I convert RGB Bitmaps to & from other formats?
  1081. Date: 07 May 93 00:00:01 EST
  1082.  
  1083.      Several bitmap conversion tools are shipped with IRIX.  The
  1084.      executables are part of the eoe2.sw.imagetools subsystem,
  1085.      and include:
  1086.  
  1087.      fromalias - convert an Alias image to an IRIS image
  1088.      frombin - create an RGB IRIS image file from a binary dump of image data
  1089.      fromcmap - convert a color map into an image with one scanline
  1090.      fromcube - convert a Cubicomp/Vertigo image file to IRIS format
  1091.      fromdi - convert an old .di dithered image into an IRIS image
  1092.      fromface - convert a UNIX faceserver image into an IRIS image
  1093.      fromgif - convert a GIF image into an IRIS image
  1094.      frommac - convert a MacPaint image into an IRIS image
  1095.      frompic - convert a MOVIE BYU .PIC image to an IRIS image
  1096.      fromppm - convert an image in Jef Poskanzer's format into an IRIS image
  1097.      fromrla - convert a Wavefront image to an IRIS image
  1098.      fromsun - convert a sun image into an IRIS image
  1099.      fromtarga - convert a targa image into an IRIS image
  1100.      fromxbm - convert an X Bitmap image into an IRIS image
  1101.      fromxud - convert an xwd file into an IRIS image
  1102.      fromxwd - convert an xwd file into an IRIS image
  1103.      fromyuv - convert an Abekas yuv image into an IRIS image
  1104.      toalias - convert an IRIS image to an Alias image
  1105.      toascii - convert an IRIS image to text characters
  1106.      tobin - convert an IRIS image to binary dump of pixel data
  1107.      tobw - convert an IRIS image to black and white
  1108.      togif - convert an IRIS image to a Compuserve GIF image
  1109.      tomac - convert an IRIS image to MacPaint format
  1110.      tonews - convert an IRIS image into NeWS format
  1111.      topict - convert an IRIS image to Macintosh PICT format
  1112.      toppm - convert an IRIS image file into Jef Poskanzer's ppm image format
  1113.      tops - convert an IRIS image to PostScript
  1114.      toscitex - Convert IRIS images into Scitex CT2T images
  1115.      tosun - convert an IRIS image to a sun raster file
  1116.      totarga - convert an IRIS image to a type 2 targa image
  1117.      toyuv - convert an IRIS image to yuv format
  1118.  
  1119.      The source for each of these tools is shipped in the 4Dgifts
  1120.      dev.dev_sw.giftsfull package and placed in the directory
  1121.      /usr/people/4Dgifts/iristools/imgtools.  Each also has a man page.
  1122.  
  1123. ------------------------------
  1124.  
  1125. Subject:   -42- Can I compress RGB bitmaps?
  1126. Date: 07 May 93 00:00:01 EST
  1127.  
  1128.      Yes.  Use /usr/sbin/rle, which is part of eoe2.sw.imagetools
  1129.  
  1130.  
  1131. ------------------------------
  1132.  
  1133. Subject:   -43- How can I look at a Postscript file?
  1134. Date: 07 May 93 00:00:01 EST
  1135.  
  1136.      Use xpsview or Ghostscript.  xpsview is in dps_eoe.  If you have 
  1137.      upgraded from 3.3, you will need to purchase this product.
  1138.  
  1139.      Ghostscript, combined with Ghostview, allows you to preview PostScript 
  1140.      documents in an X window, without the need for Display PostScript (DPS).  
  1141.      This allows you to preview PostScript from your SGI machine on any device 
  1142.      that supports the X protocol (like X terminals, Suns, etc..)  
  1143.  
  1144.      There are ghostscript/ghostview inst'able images for IRIX 4.0.1+ 
  1145.      available via anonymous FTP to ftp.sgi.com in /sgi/ghost.  
  1146.  
  1147. ------------------------------
  1148.  
  1149. Subject:   -44- How do I make a screen dump?
  1150. Date: 07 May 93 00:00:01 EST
  1151.  
  1152.      Use the utilities /usr/sbin/snapshot or /usr/sbin/scrsave.  Both 
  1153.      have a man page.  You need to make sure that you have eoe2.sw.gltools 
  1154.      loaded to get the program and eoe2.man.gltools for the man page.
  1155.  
  1156.      From within a GL program, you should call readdisplay().  
  1157.      For an example look at ~4Dgifts/iristools/imgtools/scrsave.c
  1158.  
  1159. ------------------------------
  1160.  
  1161. Subject:   -45- Can I use 4Dgifts code in my application?
  1162. Date: 07 May 93 00:00:01 EST
  1163.  
  1164.      Yes.  The 4Dgifts are a "gift" and developers are welcome to use
  1165.      the code.  However, SGI does not support the code in 4Dgifts.
  1166.      Note that certain restrictions apply.  Please read the copyright
  1167.      statement in ~4Dgifts/README.Copyright.
  1168.  
  1169.  
  1170. ------------------------------
  1171.  
  1172. Subject:   -46- What does ERR_WMANIPC mean?
  1173. Date: 07 May 93 00:00:01 EST
  1174.  
  1175.      The "WMAN" in that message means "window manager."  However, this 
  1176.      no longer means "window manager" such as 4Dwm, but rather the entire 
  1177.      X Window system.  The error means that the GL program triggered a
  1178.      fatal X error.
  1179.  
  1180.      A GL program can get an X error, because all GL programs are actually
  1181.      X clients.  When a GL program does a winopen(), libgl actually calls
  1182.      XCreateWindow, etc.)
  1183.  
  1184.      When a GL program gets an X error, libgl prints out these X errors
  1185.      using this error message:
  1186.  
  1187.        GL: X request = maj.min,  error code = ercode
  1188.  
  1189.      where
  1190.        maj = major request code that caused the error
  1191.        min = minor request code
  1192.        ercode = X error code
  1193.  
  1194.      This turns out to be easy to interpret, so long as the request was a
  1195.      core X protocol request (e.g., a CreateWindow request).  In that case:
  1196.  
  1197.        1. You can look up the major code in /usr/include/X11/Xproto.h.
  1198.        2. The minor code is not used.
  1199.        3. The X error code can be found in /usr/include/X11/X.h.
  1200.  
  1201.      As you can see in Xproto.h, the core X protocol requests have request
  1202.      codes <= 127.
  1203.  
  1204.      However, ... if maj > 127, then the request is an X extension request.
  1205.      Unfortunately, it can be difficult to interpret this unless you built 
  1206.      your program with a debugging libgl.a (compiled with -g).  The reason 
  1207.      is that for an X extension, the major request code and the starting error 
  1208.      code are copied from the X server during client startup, and these codes 
  1209.      are saved in variables inside libgl.  With a debugging libgl, these 
  1210.      variables can be printed out from within a debugger, such as dbx.
  1211.  
  1212.      If the major code indicates an X Input extension request, then the
  1213.      minor numbers then tell the X input request type, and these are found
  1214.      in /usr/include/X11/extensions/XIproto.h.
  1215.  
  1216.      Finally, the X Input Extension uses 132 as its "starting error code."
  1217.      The possible errors are found in /usr/include/X11/extensions/XI.h,
  1218.      where they're defined like this:
  1219.  
  1220.          #define XI_BadDevice   0
  1221.          #define XI_BadEvent    1
  1222.          #define XI_BadMode     2
  1223.          #define XI_DeviceBusy  3
  1224.          #define XI_BadClass    4
  1225.  
  1226.      If you add 132 to these numbers, you get the error that's reported by
  1227.      the libgl error message.
  1228.  
  1229.  
  1230. ------------------------------
  1231.  
  1232. Subject:   -47- How can I translate screen (x,y) coords into world
  1233.                 (x,y,z) coords?
  1234. Date: 07 May 93 00:00:01 EST
  1235.  
  1236.      Check the manual page for mapw(3G) or mapw2(3G).  mapw() returns
  1237.      a line into (x,y,z) space.
  1238.  
  1239.  
  1240. ------------------------------
  1241.  
  1242. Subject:   -48- How can I translate world (x,y,z) coords into
  1243.                 screen (x,y) coords?
  1244. Date: 07 May 93 00:00:01 EST
  1245.  
  1246.      There are two methods.  The first method is detailed in
  1247.      ~4Dgifts/examples/grafix/world2scrn.c, which is part of
  1248.      the dev.dev_sw.giftsfull package.  It multiplies the (x,y,z)
  1249.      vector into the current modeling and projection matrixes, and
  1250.      uses the result to interpolate based on the window size and
  1251.      position.
  1252.  
  1253.      The second method uses the current cursor position as a trick and
  1254.      is much simpler.  Use cmov() to set the cursor position to the
  1255.      point of interest in world space, then call getcpos() to return the
  1256.      cursor position in screen coordinates.  Note that if your entire
  1257.      viewport is off-screen, the results are undefined and you'll have
  1258.      to use the first method.
  1259.  
  1260.      float x,y,z;
  1261.      short x1, y1;
  1262.  
  1263.      cmov (x,y,z);
  1264.      getcpos (&x1, &y1);
  1265.  
  1266.  
  1267. ------------------------------
  1268.  
  1269. Subject:   -49- I call mapcolor(index, R, G, B) but nothing happens.  Why?
  1270. Date: 07 May 93 00:00:01 EST
  1271.  
  1272.      You either need to call glcompat(GLC_SLOWMAPCOLORS, TRUE) at the
  1273.      beginning of your program, or call gflush() after calling mapcolor.
  1274.  
  1275.      See the NOTES section in "man mapcolors" and also "man glcompat" for
  1276.      further info. (This may also be in the GL release notes)
  1277.  
  1278.  
  1279. ------------------------------
  1280.  
  1281. Subject: ! -50- What's wrong with blink()?
  1282. Date: 10 Jun 93 00:00:01 EST
  1283.  
  1284.      - blink() is broken all the way up through 4.0.5F, where blink()
  1285.        only blinks to black.
  1286.  
  1287.      - you can work-around this blink() problem by doing the following:
  1288.  
  1289.        blink(rate, index, red<<8, green<<8, blue<<8)
  1290.  
  1291.      - ~4Dgifts/examples/glpg/ch04/blinker.c has three main problems:
  1292.         - it doesn't do the above work-around.
  1293.         - it doesn't do a gflush after mapping colors.
  1294.         - it doesn't turn blinking off initially.
  1295.  
  1296.      - what happens is that if a program starts anything blinking and
  1297.        exits without ever turning blinking off with blink(-1, 0, 0, 0, 0)
  1298.        then the next program to attempt blinking will not be able to blink.
  1299.        this happens if for instance you close the blinker window before its
  1300.        10 second sleep() has completed.
  1301.  
  1302.      - a simple idea for a work-around for this problem: programs which do
  1303.        blinking should turn their blinking on when they have focus; they
  1304.        should turn all blinking off when they lose focus.  This is not perfect
  1305.        but is a plausible attempt at sharing the 20 blinking system-wide
  1306.        colormap entries.
  1307.  
  1308.      Here is a copy of ~4Dgifts/examples/glpg/ch04/blinker.c that contains
  1309.      the above workarounds, except for input-focus:
  1310.  
  1311.     #include <gl/gl.h>
  1312.  
  1313.     #define MAXBLINKS       20    /* maximum number of blinking entries */
  1314.     #define FIRSTBLINKCI    64    /* avoid the first 64 colors */
  1315.  
  1316.     main()
  1317.     {
  1318.         int i;
  1319.  
  1320.         prefsize(400, 400);
  1321.         winopen("blinker");
  1322.         ortho2(-0.5, 20.0*MAXBLINKS + 9.5, -0.5, 500.5);
  1323.         color(BLACK);
  1324.         clear();
  1325.  
  1326.         /* always turn blinking off before calling 'blink' */
  1327.         blink (-1, 0, 0, 0, 0);
  1328.  
  1329.         for (i = MAXBLINKS - 1; i >= 0 ; i--) {
  1330.         mapcolor(i + FIRSTBLINKCI, 255, 255, 255);
  1331.         /* always call gflush() after mapcolors() */
  1332.         gflush();
  1333.         color(i + FIRSTBLINKCI);
  1334.         sboxfi(i*20 + 10, 10, i*20 + 20, 490);
  1335.         /* GL bug in blink -- must left-shift r,g,b values */
  1336.         blink(i + 1, i + FIRSTBLINKCI, 255 << 8, 0 << 8, 0 << 8);
  1337.         }
  1338.         sleep(10);
  1339.         blink(-1, 0, 0, 0, 0);      /* stop all blinking */
  1340.         gexit();
  1341.         return 0;
  1342.     }
  1343.  
  1344. ------------------------------
  1345.  
  1346. Subject:   -51- When I try to run UIM/X uxserverd, I get an
  1347.                 error message saying, "license file has been
  1348.                 modified, cannot start the UIM/X license server".
  1349. Date: 07 May 93 00:00:01 EST
  1350.  
  1351.  
  1352.      You probably have been given a bad key.  The most frequent
  1353.      causes of incorrect keys have been incorrect capitalization
  1354.      and incorrect IP addresses.
  1355.  
  1356.      The program that generates the UIM/X key requires that the
  1357.      "host ID" (or IP address) be in hexadecimal format.  If you
  1358.      feed it the standard form of IP address (i.e., 123.45.678.90)
  1359.      it will generate the wrong key and will not complain.
  1360.  
  1361.      To ensure that you are is giving the correct information when
  1362.      requesting a UIM/X key, please do the following:
  1363.  
  1364.      Hostname:  Type in 'hostname' at the prompt, and be sure to say
  1365.      exactly what it says (including capitalization, if any).
  1366.  
  1367.      Host ID:  Type in 'hostid' at the prompt, and be sure to say
  1368.      exactly what it says.  You will be reading back a series of
  1369.      numbers of the form 0xc030c844.  The leading 0x indicates
  1370.      that the following number is hexadecimal.
  1371.  
  1372.      The key generating script is highly sensitive to capital letters.
  1373.      Make sure you confirm the case of the letters, both when getting
  1374.      the hostname/hostid and when having your key read back to you.
  1375.  
  1376.      If this still doesn't fix the problem, you may have mixed files
  1377.      between UIM/X 1.0 and 2.0.  Completely remove UIM/X, re-install
  1378.      it, and reproduce a Uimx2_0.license file with the correct information.
  1379.  
  1380.  
  1381. ------------------------------
  1382.  
  1383. Subject: + -52- What is a GL widget?
  1384. Date: 10 Jun 93 00:00:01 EST
  1385.  
  1386.      GL widget refers to the GlxDraw (generic) and GlxMDraw (Motif)
  1387.      widgets that allow you to embed GL windows in Xt-based programs.
  1388.      To embed a GL windows in X-based programs is frequently called
  1389.      "Mixed-model" or "GLX" programming.
  1390.  
  1391.      There are several examples of mixed-model programming in the
  1392.      directory /usr/people/4Dgifts/examples/GLX.
  1393.  
  1394.  
  1395. ------------------------------
  1396.  
  1397. Subject: + -53- I'm using the GlxMDraw widget and it doesn't seem
  1398.                 that colors are being installed correctly.  Overlays
  1399.                 in the GlxMDraw widget are displayed in red and gray
  1400.                 instead of the colors I specify.  What is the problem?
  1401. Date: 10 Jun 93 00:00:01 EST
  1402.  
  1403.      The window manager must be directed to install all appropriate
  1404.      colormaps.  Use the XSetWMColormapWindows() call to do this --
  1405.      list one window for each colormap to be installed plus the top
  1406.      level window.  If using overlays, include the overlay window as
  1407.      well as the normal GL window.
  1408.  
  1409.      If your window is TrueColor, you should still install the appropriate
  1410.      colormap, as Indigo TrueColor is simulated using a colormap.
  1411.  
  1412.  
  1413. ------------------------------
  1414.  
  1415. Subject: + -54- I get a "Broken Pipe" error when I close the window
  1416.                 of an X client, such as xman or xterm.  What does
  1417.                 this error mean?  Is there something wrong with my system?
  1418. Date: 10 Jun 93 00:00:01 EST
  1419.  
  1420.  
  1421.      Typically the error message resembles the following:
  1422.  
  1423.      XIO: fatal IO error 32 (Broken pipe) on X server ":0.0"
  1424.      after 214 requests (214 known processed) with 0 events remaining.
  1425.      The connection was probably broken by a server shutdown or KillClient.
  1426.  
  1427.      The Window Manager is reporting that the pipe for your X client
  1428.      has been broken.  This is normal when an X client exits.  There
  1429.      is nothing wrong with your system. This message will also occur
  1430.      when the system is shut down.  This is not an error condition and
  1431.      no core files are produced.
  1432.  
  1433.  
  1434. ------------------------------
  1435.  
  1436. Subject: + -55- Is there a way to switch on the fly between single
  1437.                 and double buffering within a GL widget?
  1438. Date: 10 Jun 93 00:00:01 EST
  1439.  
  1440.      There is no way to switch between single and double buffered
  1441.      mode within the same window. (In X, this would mean changing
  1442.      the depth, which is not allowed.)
  1443.  
  1444.      To simulate this, you can create two GL widgets: a double
  1445.      buffered GL widget and a single buffered GL widget.  When it
  1446.      is time to change the buffering mode, restack the windows so
  1447.      that the appropriate one is on top. If the two windows are
  1448.      created with a common parent, they move together when the
  1449.      parent is moved.
  1450.  
  1451.      For non-mixed mode applications, the GL performs this switching
  1452.      when you call gconfig().
  1453.  
  1454. ------------------------------
  1455.  
  1456. Subject: + -56- Why doesn't SGI's xlock lock my screen?
  1457. Date: 10 Jun 93 00:00:01 EST
  1458.  
  1459.      If you or the super-user do not have a password, xlock will
  1460.      not lock.  Also, in IRIX 4.x, xlock is set up by default to
  1461.      act as if invoked with the "-nolock" option, which tells it 
  1462.      not to lock the screen.  If you want force xlock to lock, do 
  1463.      either of the following:
  1464.  
  1465.      a) Use the "+nolock" option when invoking xlock.  This means
  1466.     "not nolock" (the opposite of "-nolock").  For example:
  1467.  
  1468.         % xlock +nolock
  1469.  
  1470.      b) Add the following line to your ~/.Xdefaults file:
  1471.         
  1472.         XLock.nolock:    False
  1473.  
  1474.      In IRIX 5.x, the default behavior of xlock has been reversed,
  1475.      so xlock does indeed lock by default.  If you wish to keep the
  1476.      IRIX 4.x behavior, invoke xlock with the -nolock option.
  1477.  
  1478. ------------------------------
  1479.  
  1480. Subject: + -57- Why do I get compilation errors when compiling the 
  1481.                 Inventor C++ examples, using C++ 3.0?
  1482. Date: 10 Jun 93 00:00:01 EST
  1483.  
  1484.      Inventor 1.0 and 1.0.1 were built using the 2.1.1 version 
  1485.      of the C++ compiler.  If you are using C++ 3.0, you must 
  1486.      add the "-v2" switch to the Makefile's LC++OPTS line.  It
  1487.      would then look like the following:
  1488.  
  1489.      # Options to C++; see the CC manual page for what they do
  1490.      LC++OPTS = -v2 +p -Wf,-XNp10000
  1491.  
  1492.  
  1493. ------------------------------
  1494.  
  1495. Subject:   -58- Credits
  1496. Date: 6 May 93 00:00:01 EST
  1497.  
  1498. The comp.sys.sgi FAQs are the collective effort of
  1499.  
  1500.   Dale Chayes        dale@ldeo.columbia.edu
  1501.   Steve Rikli        steve@archone.tamu.edu
  1502.   Allan Schaffer    aschaffe@sgi.com
  1503.   Dave Schweisguth    dcs@neutron.chem.yale.edu
  1504.  
  1505. Special thanks are due to
  1506.  
  1507.   Tom Davis        Author of 'zip'
  1508.   Harry Mangalam    Maintainer of the comp.sys.sgi.* WAIS database
  1509.  
  1510. Finally, much thanks to all of the SGI employees on Usenet, all of whom have
  1511. provided gigabytes of help and information.
  1512.  
  1513. Credits for individual contributions are given in the answers.
  1514.  
  1515. ------------------------------
  1516. -- 
  1517. Allan Schaffer
  1518. aschaffe@sgi.com
  1519. -- 
  1520. Allan Schaffer
  1521. aschaffe@sgi.com
  1522.