home *** CD-ROM | disk | FTP | other *** search
/ Danny Amor's Online Library / Danny Amor's Online Library - Volume 1.iso / html / faqs / faq / sgi / faq.graphics < prev    next >
Encoding:
Text File  |  1995-07-25  |  72.2 KB  |  1,984 lines

  1. Subject: SGI graphics Frequently Asked Questions (FAQ)
  2. Newsgroups: comp.sys.sgi.misc,comp.answers,news.answers
  3. From: sgi-faq@viz.tamu.edu (The SGI FAQ group)
  4. Date: 20 Nov 1994 07:00:30 GMT
  5.  
  6. Archive-name: sgi/faq/graphics
  7. Last-modified: Tue Nov 15 14:55:31 CST 1994
  8.  
  9.     SGI graphics Frequently Asked Questions (FAQ)
  10.  
  11. This is one of the Silicon Graphics FAQ series, which consists of:
  12.  
  13.     SGI admin FAQ - IRIX system administration
  14.     SGI apps FAQ - Applications and miscellaneous programming
  15.     SGI audio FAQ - Audio applications and programming
  16.     SGI graphics FAQ - Graphics and user environment customization
  17.     SGI hardware FAQ - Hardware
  18.     SGI Impressario FAQ - IRIS Impressario
  19.     SGI Inventor FAQ - IRIS Inventor
  20.     SGI misc FAQ - Introduction & miscellaneous information
  21.     SGI movie FAQ - Movies
  22.     SGI Performer FAQ - IRIS Performer
  23.     SGI pointer FAQ - Pointer to the other FAQs
  24.  
  25. Read the misc FAQ for information about the FAQs themselves.  Each FAQ
  26. is posted to comp.sys.sgi.misc and to the news.answers and comp.answers
  27. newsgroups (whose purpose is to store FAQs) twice per month.  If you
  28. can't find one of the FAQs with your news program, you can get it by
  29. anonymous FTP from one of these sites:
  30.  
  31.     rtfm.mit.edu:/pub/usenet/comp.sys.sgi.misc/
  32.     rtfm.mit.edu:/pub/usenet/news.answers/sgi/faq/
  33.     rtfm.mit.edu:/pub/usenet/comp.answers/sgi/faq/
  34.     viz.tamu.edu:/pub/sgi/faq/
  35.  
  36. Note that rtfm.mit.edu is home to many other FAQs and informational
  37. documents, and is a good place to look if you can't find an answer
  38. here. If you can't use FTP, send mail to mail-server@rtfm.mit.edu with
  39. the command 'send usenet/news.answers/ftp-list/faq' on a line by itself
  40. in the text, and it will send you a document describing how to FTP by
  41. mail. You can also read a hypertext version of the FAQs at
  42.  
  43.     http://www.cis.ohio-state.edu/hypertext/faq/usenet/sgi/top.html
  44.  
  45. The SGI FAQs are freely distributable and we encourage wide circulation.
  46. The contents are accurate as far as we know, but the usual disclaimers
  47. apply. Please send additions and changes to sgi-faq@viz.tamu.edu.
  48.  
  49. Topics covered in this FAQ:
  50. ---------------------------
  51.    -1- DISPLAYS AND DGL
  52.    -2- How can I run a program on one machine and display it on another?
  53.    -3- Does the DISPLAY environment variable work for GL applications?
  54.    -4- Why doesn't the DISPLAY environment variable seem to work?
  55.    -5- Why do I get DGL errors when I try to run a GL program?
  56.    -6- CUSTOMIZING
  57.    -7- What tools does SGI provide to help with the customization
  58.        process?
  59.    -8- What are the important login and resource files for IRIX 4.0.x?
  60.    -9- What is the sequence of events that occur at login time in IRIX
  61.        4.0.x?
  62.   -10- What is the difference between .xsession and .sgisession in IRIX
  63.        4.0.x?
  64.   -11- Why do 4Dwm, toolchest, Workspace, etc. not recognize an
  65.        environment variable I set in my shell's startup files in IRIX
  66.        4.0.x?
  67.   -12- How can I save my screen layout in IRIX 4.0.x?
  68.   -13- How can I turn off the IRIX 5.2 Magic user environment?
  69.   -14- Where is the default value of PATH set?
  70.   -15- Why can't I log in after copying /usr/lib/X11/xdm/Xsession to
  71.        .xsession?
  72.   -16- How can I find out what fonts are available?
  73.   -17- How can I use the Alt key as a Meta key in an xwsh window?
  74.   -18- How can I configure my keyboard like a VT100?
  75.   -19- RESOURCES
  76.   -20- What are resources?
  77.   -21- How can I set resources?
  78.   -22- How can I use resources to run the same program twice with
  79.        different attributes?
  80.   -23- Does the GL recognize resources?
  81.   -24- How can I know what resources I can set for an application?
  82.   -25- What is a good approach to take in looking for resources?
  83.   -26- What is the precedence for resource files?
  84. ! -27- Why do long resources cause X to crash mysteriously in IRIX 5.2?
  85.   -28- 4DWM
  86.   -29- Where can I learn more about the Window Manager?
  87.   -30- What files affect the window manager and what is their
  88.        relationship to each other?
  89.   -31- Do I need my own .4Dwmrc file?
  90.   -32- Can I run a different window manager?
  91.   -33- How can I choose a different window manager as the default?
  92.   -34- How can I recover from a failed window manager customization
  93.        attempt?
  94.   -35- Why is an extra 4Dwm burning CPU in IRIX 4.0.x?
  95.   -36- Why doesn't the window manager's "Log Out" routine work in IRIX
  96.        4.0.5?
  97.   -37- ADMINISTRATION
  98.   -38- How can I log into pandora/clogin without bringing up graphics?
  99.   -39- How can I restart the console?
  100.   -40- How can I start and stop the graphics system?
  101.   -41- How can I kill the X server without logging in or rebooting?
  102.   -42- How can I run 'xinit' manually, rather than automatically from
  103.        'xdm'?
  104.   -43- How can I start X on a remote host with no users logged in?
  105.   -44- IMAGE FILES
  106.   -45- How can I convert images to and from other formats?
  107.   -46- What is the format of SGI's RGB files?
  108.   -47- How can I compress RGB bitmaps?
  109. ! -48- How can I make a screen dump?
  110. ! -49- PROGRAMMING
  111.   -50- Can I use 4Dgifts code in my application?
  112.   -51- What does ERR_WMANIPC mean?
  113.   -52- How can I translate screen (x,y) coords into world (x,y,z)
  114.        coords?
  115.   -53- How can I translate world (x,y,z) coords into screen (x,y)
  116.        coords?
  117.   -54- Why does nothing happen when I call mapcolor(index, R, G, B)?
  118.   -55- What's wrong with blink() in IRIX 4.0.x?
  119.   -56- Why can't 'cc' find some standard Xwindows functions?
  120.   -57- Where is the library /usr/lib/libgl_s.a for my R4000 Indigo
  121.        running IRIX 4.0.5F?
  122.   -58- What is a GL widget?
  123.   -59- I'm using the GlxMDraw widget and it doesn't seem that colors are
  124.        being installed correctly.  Overlays in the GlxMDraw widget are
  125.        displayed in red and gray instead of the colors I specify.
  126.        What's wrong?
  127.   -60- Is there a way to switch between single and double buffering
  128.        within a GL widget on the fly?
  129.   -61- Why doesn't my X server use backing store? How can I turn it on?
  130.   -62- What is "/dev/tport" used for?
  131.   -63- BUGS AND PROBLEMS
  132.   -64- Why do I get a "Broken Pipe" error when I close an X client
  133.        window?
  134.   -65- What do the errors in my 'xdm-errors' file mean?
  135.   -66- Why doesn't SGI's xlock lock my screen?
  136.   -67- Sun XView applications like "mailtool" hang my X server in IRIX
  137.        4.0.5.  They come up fine, but when I click on them the server
  138.        freezes.
  139.   -68- Why can't I log into Pandora in IRIX 4.0.1?
  140.   -69- Pandora won't come up, and /usr/adm/SYSLOG says "helvetica font
  141.        missing"
  142.   -70- Why does the X server sometimes abort when I log out in IRIX
  143.        5.0.1 and IRIX 5.1?
  144.   -71- After running a few programs, the colors change as the cursor
  145.        moves. The colors are usually all wrong in other windows.
  146.   -72- How can I make my X Server use a 12-bit PseudoColor, 12-bit
  147.        TrueColor or 24-bit TrueColor visual by default?
  148.   -73- When I try to run UIM/X uxserverd, I get an error message saying,
  149.        "license file has been modified, cannot start the UIM/X license
  150.        server".
  151.   -74- MISCELLANEOUS
  152.   -75- What books about the X Window System and OSF/Motif do you
  153.        recommend?
  154.   -76- Does the IRIX 5.2 Magic user environment display on an X
  155.        terminal?
  156.   -77- What about OpenGL?
  157.   -78- Which SGI machines can run OpenGL now? Which will in the future?
  158.  
  159. ----------------------------------------------------------------------
  160.  
  161. Subject:    -1- DISPLAYS AND DGL
  162. Date: + 15 May 94 00:00:01 EST
  163.  
  164.   This section discusses how to use remote displays.
  165.  
  166. ------------------------------
  167.  
  168. Subject:    -2- How can I run a program on one machine and display it on
  169.                 another?
  170. Date: 07 May 93 00:00:01 EST
  171.  
  172.   Use the DISPLAY environment variable to specify the remote host on
  173.   which you want the X client to be displayed, then run the
  174.   application.
  175.  
  176.   To specify the remote host,
  177.  
  178.       setenv DISPLAY <destination>:0
  179.  
  180.   where <destination> is the name or IP address of the remote host.  To
  181.   specify the local host (console),
  182.  
  183.       setenv DISPLAY :0
  184.  
  185. ------------------------------
  186.  
  187. Subject:    -3- Does the DISPLAY environment variable work for GL
  188.                 applications?
  189. Date: 07 May 93 00:00:01 EST
  190.  
  191.   Yes: IRIX 4.0.x and later uses the Distributed Graphics Library (DGL)
  192.   by default. DGL applications use the DISPLAY environment variable
  193.   just as do ordinary X applications.
  194.  
  195. ------------------------------
  196.  
  197. Subject:    -4- Why doesn't the DISPLAY environment variable seem to
  198.                 work?
  199. Date: 07 May 93 00:00:01 EST
  200.  
  201.   First, make sure your DISPLAY variable is syntactically correct.  For
  202.   example, to display applications on a machine named "enterprise",
  203.   whose IP address is 123.45.678.90, DISPLAY should be set to
  204.   "enterprise:0" or "123.45.678.90:0".
  205.  
  206.   Next, try to "ping" the machine to which your DISPLAY variable is
  207.   set.  If this does not work, you have either specified an invalid
  208.   hostname, the host is down, or you are having network problems.
  209.  
  210.   If you see messages like "permission denied" or "can't connect to
  211.   server", you have a permission problem.   Do 'xhost +yourmachine' on
  212.   the remote machine to give 'yourmachine' access to the remote
  213.   machine's display. (Note that 'xhost' is inactive by default on
  214.   SGIs.)
  215.  
  216.   If you're using NIS (YP), make sure the client is linked with
  217.   "-lsun".
  218.  
  219.   For more information see Chapter 3 of the X Window System User's
  220.   Guide.
  221.  
  222. ------------------------------
  223.  
  224. Subject:    -5- Why do I get DGL errors when I try to run a GL program?
  225. Date: 20 Feb 94 00:00:01 EST
  226.  
  227.   - There may be a problem with the DISPLAY variable or Xwindows
  228.     permissions. See the previous question.
  229.  
  230.   - You may be trying to display on a non-SGI machine which doesn't
  231.     have GL/DGL. (Most don't, yet.) Presently the only way around this
  232.     is to buy a third-party GL emulator for the non-SGI machine.
  233.  
  234.   - DGL may be disabled in /etc/services and/or /etc/inetd.conf. The
  235.     former file should have a line reading
  236.  
  237.       sgi-dgl         5232/tcp
  238.  
  239.     and the latter should have a line reading
  240.  
  241.       sgi-dgl stream  tcp   nowait  root   /usr/etc/dgld  dgld -IM -tDGLTSOCKET
  242.  
  243.     If either is commented out, remove the comment.
  244.  
  245.   - You may be trying to display on a machine with a much older version
  246.     of IRIX. Try another machine with a newer IRIX.
  247.  
  248.   An article in the Jan/Feb 93 Pipeline describes the above in great
  249.   detail.
  250.  
  251. ------------------------------
  252.  
  253. Subject:    -6- CUSTOMIZING
  254. Date: 15 May 94 00:00:01 EST
  255.  
  256.   This section discusses ways to customize your environment, both with
  257.   and without graphics. The next two sections go into depth on
  258.   customizing Xwindows resources and the 4Dwm.
  259.  
  260. ------------------------------
  261.  
  262. Subject:    -7- What tools does SGI provide to help with the
  263.                 customization process?
  264. Date: 05 Jul 94 00:00:01 EST
  265.  
  266.   Here are some good places to look in IRIX 4.0.x:
  267.  
  268.   - The Customization rollover menu in the Toolchest.
  269.   - The manpages for xfontsel, xlsfonts, xwininfo, xdpyinfo, xprop,
  270.     appres, listres, and xrdb.
  271.   - The "WorkSpace User's Guide".
  272.   - The example files in /usr/tutor/Customize.
  273.  
  274.   In IRIX 5.x, take the systemtour and keep your eyes open.
  275.  
  276. ------------------------------
  277.  
  278. Subject:    -8- What are the important login and resource files for IRIX
  279.                 4.0.x?
  280. Date: 07 May 93 00:00:01 EST
  281.  
  282.   The following three file groupings indicate where files that affect
  283.   your login session reside.
  284.  
  285.   1) /usr/lib/X11/* - This is THE starting place. Here you find the
  286.   system default bindings for Motif, 4Dwm, and the Toolchest. The xdm
  287.   directory lives here as well as the app-defaults directory. xdm
  288.   controls the session management. Many application defaults are set in
  289.   the app-defaults directory.
  290.  
  291.   2) $HOME/[.Xdefaults, .4Dwmrc, .chestrc, .xsession, .sgisession] Here
  292.   you find the files that control your system set-up.  You create these
  293.   files; they don't exist when you first log in.
  294.  
  295.   3) /usr/bin/X11 - This is where the binaries live. It makes life nice
  296.   to include this directory in your path.
  297.  
  298. ------------------------------
  299.  
  300. Subject:    -9- What is the sequence of events that occur at login time
  301.                 in IRIX 4.0.x?
  302. Date: 10 Dec 93 00:00:01 EST
  303.  
  304.   This is a bare bones synopsis of the events that occur when you log
  305.   in to the console via xdm (the default method of logging in) under
  306.   IRIX 4.0.x and, with the desktop *disabled*, IRIX 5.x.
  307.  
  308.    1) Provide a "failsafe" (nographics) login if required/requested.
  309.    2) Exec $HOME/.xsession if it exists. If it exists, the remaining
  310.       steps should normally be included in the users .xsession file
  311.       as well.
  312.    3) Load $HOME/.Xresources if it exists.
  313.    4) Set XUSERFILESEARCHPATH.
  314.    5) Incorporate a "shell" environment into the "session".
  315.       (man userenv)
  316.    6) Set the root background and cursor.
  317.    7) Disable display access control (xhost +).  (man xhost)
  318.    8) Start 4Dwm.
  319.    9) Wait for 4Dwm to come up.
  320.   10) Start the console.
  321.   11) Execute $HOME/.sgisession if it exists.
  322.   12) Start WorkSpace if the user wants it.
  323.   13) Put a Toolchest on each screen.
  324.   14) Exec the "reaper". (man reaper / endsession)
  325.  
  326. ------------------------------
  327.  
  328. Subject:   -10- What is the difference between .xsession and .sgisession
  329.                 in IRIX 4.0.x?
  330. Date: 07 May 93 00:00:01 EST
  331.  
  332.   The system Xsession file (/usr/lib/X11/xdm/Xsession or
  333.   Xsession-remote) starts up a number of important things when you log
  334.   in, eg. 4Dwm, toolchest, loads resources, sets your
  335.   XUSERFILESEARCHPATH, sets your root background, etc.
  336.  
  337.   One of the last things it does is look in your home directory for a
  338.   .sgisession file.  This allows you to start additional programs at
  339.   login time. This is the file that you would use to start a mailbox,
  340.   additional window, a calendar, etc.
  341.  
  342.   ADVANTAGES OF $HOME/.sgisession :
  343.  
  344.       1) You don't need to read through yet another system file to see
  345.      what you need or don't need.
  346.  
  347.   DISADVANTAGES OF $HOME/.sgisession :
  348.  
  349.       1) You cannot override ALL of the defaults set for you. Some
  350.          things you can't change from a .sgisession file:
  351.  
  352.          A) You can't start a different window manager.
  353.          B) You can't change the way the console starts.
  354.          C) You can't change toolchest output redirection to
  355.         the console.
  356.  
  357.       2) Users of other vendors' equipment are used to seeing a
  358.      .xsession file.
  359.  
  360.   After checking for a "failsafe" (ie. no graphics) login, one of the
  361.   first things that /usr/lib/X11/xdm/Xsession does is check for
  362.   $HOME/.xsession.  If it exists, Xsession execs your .xsession file.
  363.   This means that if you are REALLY sure you know what you are doing,
  364.   you can log in with a different window manager, xterm as a console,
  365.   or xwsh not already iconified, etc.  You can also turn off the
  366.   toolchest output redirection, and start anything else you might have
  367.   done in $HOME/.sgisession. There is a discussion on xsession files in
  368.   volume 3 of the O'Reilly series.
  369.  
  370. ------------------------------
  371.  
  372. Subject:   -11- Why do 4Dwm, toolchest, Workspace, etc. not recognize an
  373.                 environment variable I set in my shell's startup files
  374.                 in IRIX 4.0.x?
  375. Date: 30 Apr 94 00:00:01 EST
  376.  
  377.   The script /usr/lib/X11/xdm/Xsession (or, if you have one, your own
  378.   ~/.xsession) runs when you log in and starts your window manager
  379.   (4Dwm), Workspace, etc. To give these programs a copy of the
  380.   environment you define in your shell's startup files, Xsession first
  381.   runs 'userenv', which runs your shell just to see what environment
  382.   variables your shell's startup files set and puts them into
  383.   Xsession's environment.  Later on Xsession runs 4Dwm, Workspace, etc.
  384.   and they inherit Xsession's environment including the environment
  385.   variables which 'userenv' got from your shell's startup files.
  386.  
  387.   However, 'userenv' objects to 1) errors in your shell startup files,
  388.   2) commands which print output to the terminal and 3) commands like
  389.   'stty' and 'tset', which expect to be connected to a terminal.  Any
  390.   of these may cause 'userenv' to give up completely, so that Xsession,
  391.   4Dwm, Workspace, etc. do not get any of your shell's enviroment.
  392.  
  393.   To get 'userenv' to work, you must 1) make sure that your shell
  394.   startup files are error-free and 2) protect 'userenv' from commands
  395.   which print output or expect to be connected to a terminal by testing
  396.   for the ENVONLY environment variable before running them. (See the
  397.   userenv(1) manpage.) You might try disabling your shell startup files
  398.   (or parts thereof) one by one to narrow down which is causing the
  399.   problem.  Be sure to check both personal and system-wide shell
  400.   startup files! See your shell's manpage for a complete list.
  401.  
  402.   Note that each terminal window (aka 'winterm', 'xwsh' or 'xterm')
  403.   runs a fresh copy of your shell, so it has a second chance to set
  404.   your environment variables. Your shell is now connected to a terminal
  405.   and 'userenv' isn't involved, so none of the above problems apply.
  406.   The environment in a terminal window will appear correct, and
  407.   programs started from a window (e.g. by typing 'workspace' to start
  408.   Workspace) will inherit the environment properly.  Furthermore,
  409.   'userenv' often appears to work when run inside a terminal window,
  410.   even when it does not work when run from Xsession.  This is all fine,
  411.   but it doesn't help when you log in. One right way to see if
  412.   'userenv' is working when it should is to add the line 'env >
  413.   $HOME/test-userenv' to Xsession after the line that runs 'userenv',
  414.   log in and examine the file it creates.
  415.  
  416.   'bash' users take note: 'bash' has particular problems with
  417.   'userenv', and there is a special version of 'userenv' which works
  418.   with 'bash' at
  419.   viz.tamu.edu:/pub/sgi/software/userenv/userenv.tar.gz.
  420.  
  421. ------------------------------
  422.  
  423. Subject:   -12- How can I save my screen layout in IRIX 4.0.x?
  424. Date: 07 May 93 00:00:01 EST
  425.  
  426.   Not very easily.  You must run "xwininfo" to find the X and Y
  427.   position of each window, then use that information to customize your
  428.   .sgisession or .xsession files.
  429.  
  430.   For more information see Chapter 3 of the X Window System User's
  431.   Guide, (Vol. 3 of the O'Reilly series)
  432.  
  433.   There are two tools that may help: 'xtoolplaces', which was posted to
  434.   volume 14 of comp.sources.x
  435.   (ftp.uu.net:/usenet/comp.sources.x/volume14/xtoolplaces/), and David
  436.   Hinds' 'xscript', which is at cb-iris.stanford.edu:/pub/.
  437.  
  438. ------------------------------
  439.  
  440. Subject:   -13- How can I turn off the IRIX 5.2 Magic user environment?
  441. Date: 18 Aug 94 00:00:01 EST
  442.  
  443.   Mark Andrews <mark@alias.com> says:
  444.   You can disable the Indigo Magic environment in two ways:
  445.  
  446.   1) If you wish to disable it for all users on the machine:
  447.  
  448.          chkconfig desktop off
  449.  
  450.   2) If you wish to disable it for a specific user, do
  451.  
  452.          touch ~<username>/.disableDesktop
  453.  
  454.      You may also have to remove the ~/.desktop-<hostname> directory as
  455.      well as 4Dwm looks in there for a 4Dwmsession file which it uses
  456.      for a guide to redisplay windows left open from the last session.
  457.  
  458.      Method 2 works ONLY if you have the original IRIX 5.2 xdm Xsession
  459.      file, which contains the following code chunk:
  460.  
  461.      if /etc/chkconfig desktop ;
  462.      then
  463.              if [ -x $0.dt -a \! -f $HOME/.disableDesktop ]
  464.              then
  465.                      exec $0.dt $*
  466.              fi
  467.      fi
  468.  
  469.   If you only want to turn off the file manager, create the file
  470.   ~/.desktop-<hostname>/nodesktop.
  471.  
  472.   Whether you disable the entire desktop or just the file manager, you
  473.   may also want to set one or more of these resources
  474.  
  475.      4DWm*SG_autoSave:       false
  476.      4Dwm*SG_manageSession:  false
  477.      4Dwm*SG_useBackgrounds: false
  478.  
  479.   which are explained in the 4Dwm(1) manpage. See also the desktop_eoe
  480.   release notes.
  481.  
  482. ------------------------------
  483.  
  484. Subject:   -14- Where is the default value of PATH set?
  485. Date: 10 Dec 93 00:00:01 EST
  486.  
  487.   Every program which allows a user to log in (telnet, rlogin, pandora,
  488.   etc.) can specify PATH. Shells may as well if it isn't already set.
  489.   There are many slightly different default values, and relying on them
  490.   is a good way to get confused. The only reliable method is to set
  491.   PATH in your shell's startup files. These are different for each
  492.   shell, and are described in each shell's manpage. Beware of 'ksh',
  493.   which has an internal, invisible default path ('/bin:/usr/bin') which
  494.   it uses when PATH is not set.
  495.  
  496. ------------------------------
  497.  
  498. Subject:   -15- Why can't I log in after copying
  499.                 /usr/lib/X11/xdm/Xsession to .xsession?
  500. Date: 07 May 93 00:00:01 EST
  501.  
  502.   After copying this file to your home directory, you need to remove
  503.   all references to "xsession". References to xsession cause the system
  504.   to try to execute $HOME/.xsession, which will create an infinite
  505.   loop.
  506.  
  507.   Remove the lines in ~/.xsession that say:
  508.  
  509.   if [ -r $xsession -a "$0" != $xsession ]; then
  510.          if [ -x $xsession ]; then
  511.              exec $xsession
  512.          else
  513.              exec /bin/sh $xsession
  514.          fi
  515.   fi
  516.  
  517. ------------------------------
  518.  
  519. Subject:   -16- How can I find out what fonts are available?
  520. Date: 07 May 93 00:00:01 EST
  521.  
  522.   The xfontsel and xlsfonts utilities help you find appropriate fonts.
  523.   xlsfonts lists the fonts; xfontsel provides an interface for
  524.   selecting a desired font. To use xfontsel, choose "Font Names" from
  525.   the Customization rollover menu in the Toolchest.  Please see the man
  526.   pages and the IRIS Utilities Guide for further information.
  527.  
  528. ------------------------------
  529.  
  530. Subject:   -17- How can I use the Alt key as a Meta key in an xwsh
  531.                 window?
  532. Date: 23 Jun 94 00:00:01 EST
  533.  
  534.   First, put the following X resources wherever you put X resources:
  535.  
  536.   --- beginning of resources ---
  537.   ! This turns Alt-key into Meta-key.
  538.  
  539.   XWsh*metaKeyMask:    8
  540.  
  541.   ! This allows multiple key modifiers in keybindings (so we can do
  542.   ! meta-shift, meta-control, etc. and incidentally a) turns vt100
  543.   ! cursor key mode off and b) changes the cursor key bindings.
  544.  
  545.   XWsh*keyboardType:    xlib
  546.  
  547.   ! This turns vt100 cursor key mode back on. Running 'tset' at login
  548.   ! resets the terminal and turns the cursor keys back off, so don't
  549.   ! run it.
  550.  
  551.   XWsh*initSequence:    \233?1h
  552.  
  553.   ! The iris-ansi terminfo entry has arrow key sequences for the ibmrt
  554.   ! keyboard, not the xlib keyboard; for curses applications to work,
  555.   ! the arrow keys must be bound to the sequences in the terminfo
  556.   ! entry. Rebinding the arrow keys to match the terminfo entry is more
  557.   ! convenient than changing the terminfo entry.
  558.  
  559.   XWsh*ckmeKeyMap:            \
  560.       Left(any): send("\033[D");        \
  561.       Right(any): send("\033[C");        \
  562.       Up(any): send("\033[A");        \
  563.       Down(any): send("\033[B");
  564.   --- end of resources ---
  565.  
  566.   'tset' resets your terminal, so running it will undo the initSequence
  567.   resource setting. There is a 'tset' command in the default csh/tcsh
  568.   ~/.login file; replace the line
  569.  
  570.       eval `tset -s -Q`
  571.  
  572.   with
  573.  
  574.       if (! $?TERM) then
  575.           eval `tset -s -Q`
  576.       endif
  577.  
  578.   so 'tset' will run only if the TERM environment variable isn't
  579.   already set. (You can't say 'if (! $?TERM) eval `tset -sQ`', because
  580.   csh/tcsh evaluates the backquotes *before* the if.)
  581.  
  582.   Finally, if you use GNU Emacs, put the following in your .emacs:
  583.  
  584.       (set-input-mode nil nil t)
  585.  
  586.   This tells Emacs to allow Meta key usage even though the iris-ansi
  587.   (xwsh) terminal description doesn't specify a Meta key.
  588.  
  589. ------------------------------
  590.  
  591. Subject:   -18- How can I configure my keyboard like a VT100?
  592. Date: 14 Jun 94 00:00:01 EST
  593.  
  594.   'xwsh -vt100' may be close enough; try it and see. (The PF keys are
  595.   mapped to F9-F12.) If not, use 'xterm' and put the following (from
  596.   Hemant Shah <shah@fnal.fnal.gov>) wherever you put the rest of your X
  597.   resources:
  598.  
  599.   === snip ===
  600.   XTerm*VT100.Translations: #override \
  601.       <Key>BackSpace:        string(0x7f) \n\
  602.       <Key>Num_Lock:        string(0x1b) string("OP") \n\
  603.       <Key>KP_Divide:        string(0x1b) string("OQ") \n\
  604.       <Key>KP_Multiply:    string(0x1b) string("OR") \n\
  605.       <Key>KP_Subtract:    string(0x1b) string("OS") \n\
  606.       <Key>KP_Add:        string(0x1b) string("Om") \n\
  607.       <Key>Pause:        string(0x1b) string("[34~") \n\
  608.       <Key>Print:        string(0x1b) string("[32~") \n\
  609.       <Key>Scroll_Lock:       string(0x1b) string("[33~") \n\
  610.       <Key>KP_0:        string(0x1b) string("Op") \n\
  611.       <Key>KP_1:        string(0x1b) string("Oq") \n\
  612.       <Key>KP_2:        string(0x1b) string("Or") \n\
  613.       <Key>KP_3:        string(0x1b) string("Os") \n\
  614.       <Key>KP_4:        string(0x1b) string("Ot") \n\
  615.       <Key>KP_5:        string(0x1b) string("Ou") \n\
  616.       <Key>KP_6:        string(0x1b) string("Ov") \n\
  617.       <Key>KP_7:        string(0x1b) string("Ow") \n\
  618.       <Key>KP_8:        string(0x1b) string("Ox") \n\
  619.       <Key>KP_9:        string(0x1b) string("Oy") \n\
  620.       <Key>KP_Decimal:    string(0x1b) string("On") \n\
  621.       <Key>Insert:        string(0x1b) string("[1~") \n\
  622.       <Key>Home:        string(0x1b) string("[2~") \n\
  623.       <Key>Prior:        string(0x1b) string("[3~") \n\
  624.       <Key>Delete:        string(0x1b) string("[4~") \n\
  625.       <Key>End:        string(0x1b) string("[5~") \n\
  626.       <Key>Next:        string(0x1b) string("[6~") \n\
  627.       <Key>F1:        string(0x1b) string("[17~") \n\
  628.       <Key>F2:        string(0x1b) string("[18~") \n\
  629.       <Key>F3:        string(0x1b) string("[19~") \n\
  630.       <Key>F4:        string(0x1b) string("[20~") \n\
  631.       <Key>F5:        string(0x1b) string("[21~") \n\
  632.       <Key>F6:        string(0x1b) string("[23~") \n\
  633.       <Key>F7:        string(0x1b) string("[24~") \n\
  634.       <Key>F8:        string(0x1b) string("[25~") \n\
  635.       <Key>F9:        string(0x1b) string("[26~") \n\
  636.       <Key>F10:        string(0x1b) string("[28~") \n\
  637.       <Key>F11:        string(0x1b) string("[29~") \n\
  638.       <Key>F12:        string(0x1b) string("[31~") \n\
  639.   === snip ===
  640.  
  641.   This remaps the keys as follows:
  642.  
  643. ----------------------------------------------------
  644.      SGI Key              |   Emulated VT100 key
  645. ----------------------------------------------------
  646.     Num Lock              |   PF1
  647.       /                   |   PF2
  648.       *                   |   PF3
  649.       -                   |   PF4
  650.       7                   |   7
  651.       8                   |   8
  652.       9                   |   9
  653.       +                   |   -
  654.       4                   |   4
  655.       5                   |   5
  656.       6                   |   6
  657.       1                   |   1
  658.       2                   |   2
  659.       3                   |   3
  660.     Enter                 |   Enter
  661.       0                   |   0
  662.       .                   |   .
  663.     Insert                |   Find
  664.     Home                  |   Insert Here
  665.     Page Up               |   Remove
  666.     Delete                |   Select
  667.     End                   |   Prev Screen
  668.     Page Down             |   Next Screen
  669.       F1                  |   F6
  670.       F2                  |   F7
  671.       F3                  |   F8
  672.       F4                  |   F9
  673.       F5                  |   F10
  674.       F6                  |   F11
  675.       F7                  |   F12
  676.       F8                  |   F13
  677.       F9                  |   F14
  678.       F10                 |   Help
  679.       F11                 |   Do
  680.       F12                 |   F17
  681.     Print Screen          |   F18
  682.     Scroll Lock           |   F19
  683.     Pause                 |   F20
  684.  
  685.   Any volunteers to work out similar bindings for xwsh?
  686.  
  687. ------------------------------
  688.  
  689. Subject:   -19- RESOURCES
  690. Date: + 15 May 94 00:00:01 EST
  691.  
  692.   This section discusses Xwindows resources.
  693.  
  694. ------------------------------
  695.  
  696. Subject:   -20- What are resources?
  697. Date: 07 May 93 00:00:01 EST
  698.  
  699.   Resources are "attributes" that control the look and feel of an
  700.   application. Resources include color, fonts, size, location, and
  701.   more.  Resources can have a complex format for binding strengths.
  702.  
  703.   For a complete description of resources, including a description of
  704.   "loose" and "tight" bindings, consult a book listed in the
  705.   bibliography question above.
  706.  
  707. ------------------------------
  708.  
  709. Subject:   -21- How can I set resources?
  710. Date: 07 May 93 00:00:01 EST
  711.  
  712.   There are many ways to set resources. Resources may be listed in
  713.   files or contained in a data base. Consult a book on X as well as the
  714.   xrdb(1) manpage for detailed descriptions.  Generally speaking, if
  715.   xrdb is not used, resource files are specified through environment
  716.   variables.  "What is a good approach to take in looking for
  717.   resources?" addresses the precedence of these files and variables.
  718.  
  719.   For some examples in IRIX 4.0.x, see the file
  720.   /usr/tutor/Customize/example.Xdefaults.
  721.  
  722. ------------------------------
  723.  
  724. Subject:   -22- How can I use resources to run the same program twice
  725.                 with different attributes?
  726. Date: 07 May 93 00:00:01 EST
  727.  
  728.   To accomplish this task, you need to take advantage of the "instance
  729.   vs class" concept. This concept is explained further in most books on
  730.   Xt.
  731.  
  732.   Many applications have a resource that lets you to give it a unique
  733.   name.  For example, from the xwsh man page :
  734.  
  735.   -name instance-name
  736.     Provide a unique name for an xwsh window.  This name becomes
  737.     the instance name of the specific xwsh, with the class name
  738.     always being "XWsh".
  739.  
  740.   Using the -name option allows you to give "names" to different
  741.   instances of xwsh and assign different resources to each one.  So if
  742.   you want two different xwsh's with different resource sets, give them
  743.   two different names, say howdymom and howdydoody, for example.  Add
  744.   the following to your ~/.Xdefaults file (if you use .Xdefaults) :
  745.  
  746.     howdymom*foreground:       SeaGreen
  747.     howdydoody*foreground:     SGIBeet
  748.  
  749.   Now all you have to do is start them up :
  750.  
  751.     xwsh -name howdymom&
  752.     xwsh -name howdydoody&
  753.  
  754. ------------------------------
  755.  
  756. Subject:   -23- Does the GL recognize resources?
  757. Date: 07 May 93 00:00:01 EST
  758.  
  759.   Yes. In IRIX 4.0 and later, the GL responds to several X resources,
  760.   allowing run-time control over some aspects of GL programs.
  761.  
  762.   The man page assumes you are somewhat familiar with X resources, if
  763.   you are not, you should read some X documentation such as Volume 3 of
  764.   the O'Reily X books.
  765.  
  766.   The GL uses resources names with the prefixes
  767.  
  768.     appname.gl.                (instance prefix)
  769.     Appname.GL.                (class prefix)
  770.  
  771.   where appname and Appname are derived from the argument to the GL
  772.   program's first call to winopen(3G) upper case.
  773.  
  774.   For complete information see the man page for GLRESOURCES.
  775.  
  776. ------------------------------
  777.  
  778. Subject:   -24- How can I know what resources I can set for an
  779.                 application?
  780. Date: 07 May 93 00:00:01 EST
  781.  
  782.   The most common place to find resource variables for a particular
  783.   application is in the man page for that application.
  784.  
  785.   For example, take a look at the man page for `xwsh'.  Look for the
  786.   section heading called `RESOURCES'.  This section lists each resource
  787.   for `xwsh', and in some cases, the valid values for that resource.
  788.  
  789.   Also, many major applications are built on top of the Xt toolkit.
  790.   There are standard resources that these applications recognize. For a
  791.   more complete description, see one of the books on Xt listed in the
  792.   bibliography.
  793.  
  794. ------------------------------
  795.  
  796. Subject:   -25- What is a good approach to take in looking for
  797.                 resources?
  798. Date: 07 May 93 00:00:01 EST
  799.  
  800.   The following is a recommended list  of steps to take when searching
  801.   for a resource, binding, behavior, etc.
  802.  
  803.    1) Look in the 4.0 Transition Guide.
  804.    2) Look in /usr/tutor/Customize.
  805.    3) Look in /usr/demos.
  806.    4) Look in ~4Dgifts.  (Available with the development option.)
  807.    5) If the client you are interested in is a GL client, see the
  808.       man page for GLRESOURCES.
  809.    6) Look in /usr/lib/X11/app-defaults/ClientName.
  810.    7) Look in /usr/lib/X11/system.* .
  811.    8) Look through the man page for the client you are interested in.
  812.    9) Look in O'Reilly & Associates Vol. III. It has many gems
  813.       pertaining to standard X clients.
  814.   10) Look in the documentation that came with your application.
  815.   11) Look in the OSF Motif manuals.
  816.   12) Post to comp.windows.x if you can not find
  817.       an answer using steps 1 through 11.
  818.  
  819. ------------------------------
  820.  
  821. Subject:   -26- What is the precedence for resource files?
  822. Date: 07 May 93 00:00:01 EST
  823.  
  824.   The following list indicates the weight of set resources.
  825.   Items at the top have the greatest weight.
  826.  
  827.   1) Hard coded values for resources.
  828.   2) Command line arguments.
  829.   3) Resources pointed to by $XENVIRONMENT.
  830.   4) Resource values loaded into the Resource Data Base via xrdb.
  831.   5) Resources pointed to by other environment variables :
  832.  
  833.      IF $XUSERFILESEARCHPATH is set
  834.  
  835.        then it contains a list of directories to search.
  836.  
  837.      ELSE IF $XAPPLRESDIR is set
  838.  
  839.        it contains a single directory, and a short list of related
  840.        directories (e.g. adjusted for language) is where resource files
  841.        must be found.
  842.  
  843.      ELSE
  844.  
  845.        Look in a short list of places related to $HOME (e.g. language
  846.        adjusted). This includes files in $HOME that have the name of
  847.        the class of the application.
  848.  
  849.   6) Resource values set in $HOME/.Xdefaults, provided that the
  850.      RESOURCE_MANAGER property hasn't been set via the xrdb command.
  851.      (see the third paragraph in the xrdb man page)
  852.   7) Values set in /usr/lib/X11/app-defaults/*.
  853.   8) Values set through through the application's fall back mechanism.
  854.  
  855. ------------------------------
  856.  
  857. Subject: ! -27- Why do long resources cause X to crash mysteriously in
  858.                 IRIX 5.2?
  859. Date: 13 Nov 94 00:00:01 EST
  860.  
  861.   Get patch 36 from the TAC.
  862.  
  863. ------------------------------
  864.  
  865. Subject:   -28- 4DWM
  866. Date: 15 May 94 00:00:01 EST
  867.  
  868.   This section discusses the 4D Window Manager.
  869.  
  870. ------------------------------
  871.  
  872. Subject:   -29- Where can I learn more about the Window Manager?
  873. Date: 07 May 93 00:00:01 EST
  874.  
  875.   The man pages for 4Dwm and mwm contain a wealth of information on the
  876.   window manager. There are also online files. You may want to read
  877.   /usr/tutor/Customize/example.4Dwmrc (IRIX 4.0.x only) as well as
  878.   /usr/people/4Dgifts/.4Dwmrc (if you have the IDO option).  The
  879.   OSF/Motif manuals listed in the bibliography are also good places to
  880.   find information. (4Dwm is based on mwm).
  881.  
  882. ------------------------------
  883.  
  884. Subject:   -30- What files affect the window manager and what is their
  885.                 relationship to each other?
  886. Date: 07 May 93 00:00:01 EST
  887.  
  888.   1) ~/.4Dwmrc, if you have one
  889.   2) /usr/lib/X11/system.4Dwmrc
  890.   3) /usr/bin/X11/4Dwm
  891.   4) /usr/lib/X11/app-defaults/4Dwm
  892.   5) ~/.Xdefaults (or wherever you set resources)
  893.  
  894.   When 4Dwm is started, it looks for ~/.4Dwmrc. If it does not exist,
  895.   it looks at /usr/lib/X11/system.4Dwmrc. The definitions for button
  896.   bindings, menus, etc are contained in these files. For a better
  897.   description of bindings, look in /usr/tutor/Customize/example.4Dwmrc
  898.   and /usr/people/ 4Dgifts/.4Dwmrc. Also see the man pages for 4Dwm.
  899.  
  900.   The resource set for the bindings will actually "choose" which
  901.   binding definition is set.
  902.  
  903. ------------------------------
  904.  
  905. Subject:   -31- Do I need my own .4Dwmrc file?
  906. Date: 07 May 93 00:00:01 EST
  907.  
  908.   Not necessarily. As mentioned in the previous question, actual
  909.   bindings are determined by resource names. If there is a binding
  910.   definition in /usr/lib/X11/system.4Dwmrc that you like, you may
  911.   choose it by setting the appropriate resource.
  912.  
  913. ------------------------------
  914.  
  915. Subject:   -32- Can I run a different window manager?
  916. Date: 07 May 93 00:00:01 EST
  917.  
  918.   IRIX has 4Dwm, mwm, twm, and uwm. However, GL programs are guaranteed
  919.   to work only under 4Dwm.
  920.  
  921. ------------------------------
  922.  
  923. Subject:   -33- How can I choose a different window manager as the
  924.                 default?
  925. Date: 07 May 93 00:00:01 EST
  926.  
  927.   You must use a .xsession file and explicitly invoke the window
  928.   manager and any other applications you want to use, such as
  929.   'toolchest' and 'xwsh'.
  930.  
  931.   After making this change, you may only be able to log out by using
  932.   the "Log Out" selection in the toolchest, or by executing
  933.   /usr/bin/X11/endsession.
  934.  
  935.   Here are the contents of a sample .xsession file:
  936.  
  937.       xhost + &
  938.       toolchest -name ToolChest > /dev/console 2&>1 &
  939.       winterm -bg red &
  940.       winterm -bg blue &
  941.       mwm > /dev/console 2&>1 &
  942.       /usr/bin/X11/reaper
  943.  
  944.   Note that 'reaper' is not put into the background.  When 'reaper'
  945.   exits you will be logged out.
  946.  
  947.   Alternatively, you can do the following steps:
  948.  
  949.   1. cp /usr/lib/X11/xdm/Xsession ~/.xsession
  950.  
  951.   2. Remove the lines in ~/.xsession that say:
  952.  
  953.      if [ -r $xsession -a "$0" != $xsession ]; then
  954.       if [ -x $xsession ]; then
  955.           exec $xsession
  956.       else
  957.           exec /bin/sh $xsession
  958.       fi
  959.      fi
  960.  
  961.   3. Change the line that says
  962.  
  963.      /usr/bin/X11/4Dwm >/dev/console 2>&1 &
  964.  
  965.      to
  966.  
  967.      /usr/bin/X11/mwm > /dev/console 2>&1 &
  968.  
  969. ------------------------------
  970.  
  971. Subject:   -34- How can I recover from a failed window manager
  972.                 customization attempt?
  973. Date: 07 May 93 00:00:01 EST
  974.  
  975.   If your attempt at customization leaves you in a state where buttons
  976.   and menus are no longer recognized, you can recover by pressing the
  977.   <Alt><CTRL><Shift><!>keys simultaneously. A menu appears that will
  978.   let you choose Motif, Iris, or user defaults. Choose either Motif or
  979.   Iris defaults and then push OK. This restarts the window manager to a
  980.   usable state.
  981.  
  982. ------------------------------
  983.  
  984. Subject:   -35- Why is an extra 4Dwm burning CPU in IRIX 4.0.x?
  985. Date: 07 May 93 00:00:01 EST
  986.  
  987.   This multiple window manager problem is usually triggered by the
  988.   "kill" feedback of the window manager when a user logs out.  The
  989.   workaround for the problem is to remove the "kill" feedback.
  990.  
  991.   The "kill" feedback is controlled by the resource "showFeedback."
  992.   For 4Dwm, this resource is defined in /usr/lib/X11/app-defaults/4DWm
  993.   as:
  994.  
  995.     *showFeedback:       behavior restart quit kill
  996.  
  997.   Modify the resource to read:
  998.  
  999.     *showFeedback:       behavior restart quit
  1000.  
  1001.   For mwm, set a "showFeedback" resource that does not include the
  1002.   "kill" feedback in /usr/lib/X11/app-defaults/Mwm.  A sample setting
  1003.   is:
  1004.  
  1005.     Mwm*showFeedback:  move placement resize behavior restart quit
  1006.  
  1007. ------------------------------
  1008.  
  1009. Subject:   -36- Why doesn't the window manager's "Log Out" routine work
  1010.                 in IRIX 4.0.5?
  1011. Date: 09 Jan 94 00:00:01 CST
  1012.  
  1013.   "Log Out" runs 'endsession', which under some versions of IRIX 4.0.5
  1014.   does not work if your hostname contains a number. Fortunately,
  1015.   'endsession' is a script, and you can fix it by changing the line
  1016.  
  1017.       PROP_DISPLAY=`expr $DISPLAY : '\(.*\).[1-9]' \| $DISPLAY`
  1018.  
  1019.   to
  1020.  
  1021.       PROP_DISPLAY=`expr $DISPLAY : '\(.*\)\.[1-9]' \| $DISPLAY`
  1022.  
  1023.   i.e. just add a backslash before the second period.
  1024.  
  1025. ------------------------------
  1026.  
  1027. Subject:   -37- ADMINISTRATION
  1028. Date: 15 May 94 00:00:01 EST
  1029.  
  1030.   This section describes how to start and stop parts of the graphics
  1031.   system in various funky ways.
  1032.  
  1033. ------------------------------
  1034.  
  1035. Subject:   -38- How can I log into pandora/clogin without bringing up
  1036.                 graphics?
  1037. Date: 07 May 93 00:00:01 EST
  1038.  
  1039.   Add the magic word 'failsafe' after your username. E.g. to log in as
  1040.   root without graphics, you'd type 'root failsafe', whack Enter, and
  1041.   type your password.
  1042.  
  1043. ------------------------------
  1044.  
  1045. Subject:   -39- How can I restart the console?
  1046. Date: 07 May 93 00:00:01 EST
  1047.  
  1048.   Use /usr/sbin/startconsole. 'startconsole' and 'winterm' (which
  1049.   'startconsole' calls) are scripts, so you can see how they do it.
  1050.  
  1051. ------------------------------
  1052.  
  1053. Subject:   -40- How can I start and stop the graphics system?
  1054. Date: 07 May 93 00:00:01 EST
  1055.  
  1056.   Use /usr/gfx/startgfx and /usr/gfx/stopgfx.  Be aware that stopgfx
  1057.   will kill any active windows and log you out.
  1058.  
  1059. ------------------------------
  1060.  
  1061. Subject:   -41- How can I kill the X server without logging in or
  1062.                 rebooting?
  1063. Date: 22 Jan 94 00:00:01 EST
  1064.  
  1065.   Hold down the left-Control, left-Shift, F12 and keypad slash keys.
  1066.   This is fondly known as the "Vulcan Death Grip".
  1067.  
  1068. ------------------------------
  1069.  
  1070. Subject:   -42- How can I run 'xinit' manually, rather than
  1071.                 automatically from 'xdm'?
  1072. Date: 07 May 93 00:00:01 EST
  1073.  
  1074.   By doing the following, which will affect all users:
  1075.  
  1076.   1) log in as root
  1077.   2) Type:
  1078.      /usr/gfx/stopgfx
  1079.      chkconfig xdm off.
  1080.  
  1081.   3) all users need to copy /usr/bin/X11/X to their home directory
  1082.      (renaming the file to .xserverrc), removing the if test for
  1083.      windowsystem, OR be familiar enough with xinit to have an
  1084.      alternate command line.
  1085.   4) transfer all startup programs from .xsession/.sgisession to
  1086.      .xinitrc.
  1087.   5) the last program to start from .xinitrc must not exit.  When this
  1088.      one exits, the session terminates.
  1089.  
  1090. ------------------------------
  1091.  
  1092. Subject:   -43- How can I start X on a remote host with no users logged
  1093.                 in?
  1094. Date: 07 May 93 00:00:01 EST
  1095.  
  1096.   This example starts up an xclock on the remote system.  The easy way
  1097.   to test this for now is to rlogin to the system and type the
  1098.   commands.  Once something works you can write some shell scripts and
  1099.   use rsh to run them:
  1100.  
  1101.   hydra is being used to login to oscar and start graphics on oscar.
  1102.   oscar is displaying the pandora login when this is done:
  1103.  
  1104.   hydra 2% rlogin oscar -l root
  1105.   oscar 1# /usr/gfx/stopgfx     (screen blanks)
  1106.   oscar 2# chkconfig windowsystem on
  1107.   oscar 3# setenv DISPLAY :0.0  (display on local screen)
  1108.   oscar 4# /usr/bin/X11/X &  (start Xsgi)
  1109.   oscar 5# xclock &  (clock is displayed)
  1110.  
  1111.   To clean up:
  1112.  
  1113.   oscar 6# /usr/gfx/stopgfx     (screen blanks)
  1114.   oscar 7# /usr/gfx/startgfx  (re-start pandora)
  1115.  
  1116. ------------------------------
  1117.  
  1118. Subject:   -44- IMAGE FILES
  1119. Date: 15 May 94 00:00:01 EST
  1120.  
  1121.   This section discusses image files and formats.
  1122.  
  1123. ------------------------------
  1124.  
  1125. Subject:   -45- How can I convert images to and from other formats?
  1126. Date: 20 May 94 00:00:01 EST
  1127.  
  1128.   IRIX comes with several tools which convert images to or from SGI's
  1129.   RGB format.  The executables are part of the eoe2.sw.imagetools
  1130.   subsystem, and include:
  1131.  
  1132.   fromalias - convert an Alias image to an IRIS image
  1133.   frombin - create an RGB IRIS image file from a binary dump of image data
  1134.   fromcmap - convert a color map into an image with one scanline
  1135.   fromcube - convert a Cubicomp/Vertigo image file to IRIS format
  1136.   fromdi - convert an old .di dithered image into an IRIS image
  1137.   fromface - convert a UNIX faceserver image into an IRIS image
  1138.   fromgif - convert a GIF image into an IRIS image
  1139.   frommac - convert a MacPaint image into an IRIS image
  1140.   frompic - convert a MOVIE BYU .PIC image to an IRIS image
  1141.   fromppm - convert an image in Jef Poskanzer's format into an IRIS image
  1142.   fromrla - convert a Wavefront image to an IRIS image
  1143.   fromsun - convert a sun image into an IRIS image
  1144.   fromtarga - convert a targa image into an IRIS image
  1145.   fromxbm - convert an X Bitmap image into an IRIS image
  1146.   fromxud - convert an xwd file into an IRIS image
  1147.   fromxwd - convert an xwd file into an IRIS image
  1148.   fromyuv - convert an Abekas yuv image into an IRIS image
  1149.   toalias - convert an IRIS image to an Alias image
  1150.   toascii - convert an IRIS image to text characters
  1151.   tobin - convert an IRIS image to binary dump of pixel data
  1152.   tobw - convert an IRIS image to black and white
  1153.   togif - convert an IRIS image to a Compuserve GIF image
  1154.   tomac - convert an IRIS image to MacPaint format
  1155.   tonews - convert an IRIS image into NeWS format
  1156.   topict - convert an IRIS image to Macintosh PICT format
  1157.   toppm - convert an IRIS image file into Jef Poskanzer's ppm image format
  1158.   tops - convert an IRIS image to PostScript
  1159.   toscitex - Convert IRIS images into Scitex CT2T images
  1160.   tosun - convert an IRIS image to a sun raster file
  1161.   totarga - convert an IRIS image to a type 2 targa image
  1162.   toyuv - convert an IRIS image to yuv format
  1163.  
  1164.   The source for each of these tools is in the 4Dgifts
  1165.   dev.dev_sw.giftsfull subsystem and placed in the directory
  1166.   /usr/people/4Dgifts/iristools/imgtools.  Each also has a manpage.
  1167.  
  1168.   Similar tools for more formats ('frompict', 'frompixar', 'fromtiff',
  1169.   'fromutah', 'totiff', 'toutah' and 'toxbm' at last count), as well as
  1170.   some which come with IRIX and a few miscellaneous cool image editing
  1171.   tools, are in ftp.sgi.com:/graphics/bin/. 'fromjpeg' and 'tojpeg' can
  1172.   be found in explorer.dgp.toronto.edu:/pub/sgi/sgijpeg/.
  1173.   swedishchef.lerc.nasa.gov:/ has 'fromvicar' in
  1174.   /image/conversion/from/, 'tocolps' and 'topcl' in
  1175.   /image/conversion/to/ and many other image- related tools in nearby
  1176.   directories.
  1177.  
  1178.   Finally, 'imgworks' (in the imgtools.sw.tools subsystem) understands
  1179.   RGB, TIFF and FIT formats, and several freeware programs including
  1180.   SDSC's 'imtools' (in
  1181.   ftp.sdsc.edu:/pub/sdsc/graphics/imtools/sgi_4d/), 'xv' (in
  1182.   ftp.cis.upenn.edu:/pub/xv/) and ImageMagick (in
  1183.   ftp.x.org:/contrib/applications/ImageMagick/) work on SGIs and
  1184.   understand SGI's RGB format as well as many other formats.
  1185.  
  1186. ------------------------------
  1187.  
  1188. Subject:   -46- What is the format of SGI's RGB files?
  1189. Date: 30 Apr 94 00:00:01 EST
  1190.  
  1191.   Read ftp.sgi.com:/graphics/SGIIMAGESPEC.
  1192.  
  1193. ------------------------------
  1194.  
  1195. Subject:   -47- How can I compress RGB bitmaps?
  1196. Date: 07 May 93 00:00:01 EST
  1197.  
  1198.   Use /usr/sbin/rle, which is part of eoe2.sw.imagetools.
  1199.  
  1200. ------------------------------
  1201.  
  1202. Subject: ! -48- How can I make a screen dump?
  1203. Date: 13 Nov 94 00:00:01 EST
  1204.  
  1205.   Use the utilities 'imgsnap' (IRIX 4.0.x only), 'scrsave', 'snapshot'
  1206.   or 'xwd'. All have manpages. 'imgsnap' is in the imgtools.sw.tools
  1207.   subsystem, 'scrsave' and 'snapshot' are in the eoe2.sw.gltools
  1208.   subsystem, 'xwd' is in x_eoe.sw.Xapps and their manpages are in the
  1209.   respective *.man.* subsystems.
  1210.  
  1211.   From within a GL program, you should call readdisplay().  For an
  1212.   example look at ~4Dgifts/iristools/imgtools/scrsave.c.
  1213.  
  1214. ------------------------------
  1215.  
  1216. Subject: ! -49- PROGRAMMING
  1217. Date: 15 May 94 00:00:01 EST
  1218.  
  1219.   This section discusses graphics programming. See the apps, audio and
  1220.   movie FAQs for general, audio and movie programming issues and the
  1221.   Impressario, Inventor and Performer FAQs for discussions of those
  1222.   packages.
  1223.  
  1224. ------------------------------
  1225.  
  1226. Subject:   -50- Can I use 4Dgifts code in my application?
  1227. Date: 07 May 93 00:00:01 EST
  1228.  
  1229.   Yes.  The 4Dgifts are a "gift" and developers are welcome to use the
  1230.   code.  However, SGI does not support the code in 4Dgifts.  Note that
  1231.   certain restrictions apply.  Please read the copyright statement in
  1232.   ~4Dgifts/README.Copyright.
  1233.  
  1234. ------------------------------
  1235.  
  1236. Subject:   -51- What does ERR_WMANIPC mean?
  1237. Date: 07 May 93 00:00:01 EST
  1238.  
  1239.   The "WMAN" in that message means "window manager."  However, this no
  1240.   longer means "window manager" such as 4Dwm, but rather the entire X
  1241.   Window system.  The error means that the GL program triggered a fatal
  1242.   X error.
  1243.  
  1244.   A GL program can get an X error, because all GL programs are actually
  1245.   X clients.  When a GL program does a winopen(), libgl actually calls
  1246.   XCreateWindow, etc.)
  1247.  
  1248.   When a GL program gets an X error, libgl prints out these X errors
  1249.   using this error message:
  1250.  
  1251.       GL: X request = maj.min,  error code = ercode
  1252.  
  1253.   where
  1254.  
  1255.       maj = major request code that caused the error
  1256.       min = minor request code
  1257.       ercode = X error code
  1258.  
  1259.   This turns out to be easy to interpret, so long as the request was a
  1260.   core X protocol request (e.g., a CreateWindow request).  In that
  1261.   case:
  1262.  
  1263.       1. You can look up the major code in /usr/include/X11/Xproto.h.
  1264.       2. The minor code is not used.
  1265.       3. The X error code can be found in /usr/include/X11/X.h.
  1266.  
  1267.   As you can see in Xproto.h, the core X protocol requests have request
  1268.   codes <= 127.
  1269.  
  1270.   However, if maj > 127, then the request is an X extension request.
  1271.   Unfortunately, it can be difficult to interpret this unless you built
  1272.   your program with a debugging libgl.a (compiled with -g).  The reason
  1273.   is that for an X extension, the major request code and the starting
  1274.   error code are copied from the X server during client startup, and
  1275.   these codes are saved in variables inside libgl.  With a debugging
  1276.   libgl, these variables can be printed out from within a debugger,
  1277.   such as dbx.
  1278.  
  1279.   If the major code indicates an X Input extension request, then the
  1280.   minor numbers then tell the X input request type, and these are found
  1281.   in /usr/include/X11/extensions/XIproto.h.
  1282.  
  1283.   Finally, the X Input Extension uses 132 as its "starting error code."
  1284.   The possible errors are found in /usr/include/X11/extensions/XI.h,
  1285.   where they're defined like this:
  1286.  
  1287.       #define XI_BadDevice   0
  1288.       #define XI_BadEvent    1
  1289.       #define XI_BadMode     2
  1290.       #define XI_DeviceBusy  3
  1291.       #define XI_BadClass    4
  1292.  
  1293.   If you add 132 to these numbers, you get the error that's reported by
  1294.   the libgl error message.
  1295.  
  1296. ------------------------------
  1297.  
  1298. Subject:   -52- How can I translate screen (x,y) coords into world
  1299.                 (x,y,z) coords?
  1300. Date: 07 May 93 00:00:01 EST
  1301.  
  1302.   Check the manual page for mapw(3G) or mapw2(3G). mapw() returns a
  1303.   line into (x,y,z) space.
  1304.  
  1305. ------------------------------
  1306.  
  1307. Subject:   -53- How can I translate world (x,y,z) coords into screen
  1308.                 (x,y) coords?
  1309. Date: 07 May 93 00:00:01 EST
  1310.  
  1311.   There are two methods.  The first method is detailed in
  1312.   ~4Dgifts/examples/grafix/world2scrn.c, which is part of the
  1313.   dev.dev_sw.giftsfull package.  It multiplies the (x,y,z) vector into
  1314.   the current modeling and projection matrixes, and uses the result to
  1315.   interpolate based on the window size and position.
  1316.  
  1317.   The second method uses the current cursor position as a trick and is
  1318.   much simpler.  Use cmov() to set the cursor position to the point of
  1319.   interest in world space, then call getcpos() to return the cursor
  1320.   position in screen coordinates.  Note that if your entire viewport is
  1321.   off-screen, the results are undefined and you'll have to use the
  1322.   first method.
  1323.  
  1324.       float x,y,z;
  1325.       short x1, y1;
  1326.       
  1327.       cmov (x,y,z);
  1328.       getcpos (&x1, &y1);
  1329.  
  1330. ------------------------------
  1331.  
  1332. Subject:   -54- Why does nothing happen when I call mapcolor(index, R,
  1333.                 G, B)?
  1334. Date: 07 May 93 00:00:01 EST
  1335.  
  1336.   You either need to call glcompat(GLC_SLOWMAPCOLORS, TRUE) at the
  1337.   beginning of your program, or call gflush() after calling mapcolor.
  1338.  
  1339.   See the NOTES section in "man mapcolors" and also "man glcompat" for
  1340.   further info. (This may also be in the GL release notes)
  1341.  
  1342. ------------------------------
  1343.  
  1344. Subject:   -55- What's wrong with blink() in IRIX 4.0.x?
  1345. Date: 10 Jun 93 00:00:01 EST
  1346.  
  1347.   - blink() is broken all the way up through 4.0.5F, where blink() only
  1348.     blinks to black.
  1349.  
  1350.   - you can work-around this blink() problem by doing the following:
  1351.  
  1352.       blink(rate, index, red<<8, green<<8, blue<<8)
  1353.  
  1354.   - ~4Dgifts/examples/glpg/ch04/blinker.c has three main problems:
  1355.  
  1356.       - it doesn't do the above work-around.
  1357.       - it doesn't do a gflush after mapping colors.
  1358.       - it doesn't turn blinking off initially.
  1359.  
  1360.   - what happens is that if a program starts anything blinking and
  1361.     exits without ever turning blinking off with blink(-1, 0, 0, 0, 0)
  1362.     then the next program to attempt blinking will not be able to
  1363.     blink.  this happens if for instance you close the blinker window
  1364.     before its 10 second sleep() has completed.
  1365.  
  1366.   - a simple idea for a work-around for this problem: programs which do
  1367.     blinking should turn their blinking on when they have focus; they
  1368.     should turn all blinking off when they lose focus.  This is not
  1369.     perfect but is a plausible attempt at sharing the 20 blinking
  1370.     system-wide colormap entries.
  1371.  
  1372.   Here is a copy of ~4Dgifts/examples/glpg/ch04/blinker.c that contains
  1373.   the above workarounds, except for input-focus:
  1374.  
  1375.   #include <gl/gl.h>
  1376.  
  1377.   #define MAXBLINKS       20    /* maximum number of blinking entries */
  1378.   #define FIRSTBLINKCI    64    /* avoid the first 64 colors */
  1379.  
  1380.   main()
  1381.   {
  1382.       int i;
  1383.  
  1384.       prefsize(400, 400);
  1385.       winopen("blinker");
  1386.       ortho2(-0.5, 20.0*MAXBLINKS + 9.5, -0.5, 500.5);
  1387.       color(BLACK);
  1388.       clear();
  1389.  
  1390.       /* always turn blinking off before calling 'blink' */
  1391.       blink (-1, 0, 0, 0, 0);
  1392.  
  1393.       for (i = MAXBLINKS - 1; i >= 0 ; i--) {
  1394.       mapcolor(i + FIRSTBLINKCI, 255, 255, 255);
  1395.       /* always call gflush() after mapcolors() */
  1396.       gflush();
  1397.       color(i + FIRSTBLINKCI);
  1398.       sboxfi(i*20 + 10, 10, i*20 + 20, 490);
  1399.       /* GL bug in blink -- must left-shift r,g,b values */
  1400.       blink(i + 1, i + FIRSTBLINKCI, 255 << 8, 0 << 8, 0 << 8);
  1401.       }
  1402.       sleep(10);
  1403.       blink(-1, 0, 0, 0, 0);      /* stop all blinking */
  1404.       gexit();
  1405.       return 0;
  1406.   }
  1407.  
  1408. ------------------------------
  1409.  
  1410. Subject:   -56- Why can't 'cc' find some standard Xwindows functions?
  1411. Date: 14 May 94 00:00:01 EST
  1412.  
  1413.   You may be linking X libraries, which have complex interdependencies,
  1414.   in the wrong order. Mark Kilgard <mjk@hoot.asd.sgi.com> provided this
  1415.   handy chart:
  1416.  
  1417.   libXm--libXirisw
  1418.                   \
  1419.                    libXt--libXmu--libgl--libXi--libXext--libX11
  1420.                   /
  1421.             libXaw
  1422.  
  1423.   Libraries should be listed in the same order on the cc or ld command
  1424.   line, left to right, as they appear above. If you don't use routines
  1425.   from a library, of course, you don't need it.
  1426.  
  1427. ------------------------------
  1428.  
  1429. Subject:   -57- Where is the library /usr/lib/libgl_s.a for my R4000
  1430.                 Indigo running IRIX 4.0.5F?
  1431. Date: 07 May 93 00:00:01 EST
  1432.  
  1433.   It's in the "maint" software, in the maint_gl_x_dev package.
  1434.  
  1435. ------------------------------
  1436.  
  1437. Subject:   -58- What is a GL widget?
  1438. Date: 10 Jun 93 00:00:01 EST
  1439.  
  1440.   GL widget refers to the GlxDraw (generic) and GlxMDraw (Motif)
  1441.   widgets that allow you to embed GL windows in Xt-based programs.  To
  1442.   embed a GL windows in X-based programs is frequently called
  1443.   "Mixed-model" or "GLX" programming.
  1444.  
  1445.   There are several examples of mixed-model programming in the
  1446.   directory /usr/people/4Dgifts/examples/GLX.
  1447.  
  1448. ------------------------------
  1449.  
  1450. Subject:   -59- I'm using the GlxMDraw widget and it doesn't seem that
  1451.                 colors are being installed correctly.  Overlays in the
  1452.                 GlxMDraw widget are displayed in red and gray instead of
  1453.                 the colors I specify.  What's wrong?
  1454. Date: 10 Jun 93 00:00:01 EST
  1455.  
  1456.   The window manager must be directed to install all appropriate
  1457.   colormaps.  Use the XSetWMColormapWindows() call to do this -- list
  1458.   one window for each colormap to be installed plus the top level
  1459.   window.  If using overlays, include the overlay window as well as the
  1460.   normal GL window.
  1461.  
  1462.   If your window is TrueColor, you should still install the appropriate
  1463.   colormap, as Indigo TrueColor is simulated using a colormap.
  1464.  
  1465. ------------------------------
  1466.  
  1467. Subject:   -60- Is there a way to switch between single and double
  1468.                 buffering within a GL widget on the fly?
  1469. Date: 10 Jun 93 00:00:01 EST
  1470.  
  1471.   There is no way to switch between single and double buffered mode
  1472.   within the same window. (In X, this would mean changing the depth,
  1473.   which is not allowed.)
  1474.  
  1475.   To simulate this, you can create two GL widgets: a double buffered GL
  1476.   widget and a single buffered GL widget.  When it is time to change
  1477.   the buffering mode, restack the windows so that the appropriate one
  1478.   is on top. If the two windows are created with a common parent, they
  1479.   move together when the parent is moved.
  1480.  
  1481.   For non-mixed mode applications, the GL performs this switching when
  1482.   you call gconfig().
  1483.  
  1484. ------------------------------
  1485.  
  1486. Subject:   -61- Why doesn't my X server use backing store? How can I
  1487.                 turn it on?
  1488. Date: 12 Feb 94 00:00:01 EST
  1489.  
  1490.   Mark Kilgard of SGI <mjk@hoot.asd.sgi.com> writes,
  1491.   SGI ships its X server with backing store disabled.  If you edit
  1492.   /usr/lib/X11/xdm/Xservers and remove the -bs option, then restart the
  1493.   X server, backing store will be available.
  1494.  
  1495.   The reason for not turning on backing store by default is two-fold.
  1496.  
  1497.   1) In IRIX 4.0.X the code for managing overlay planes didn't properly
  1498.      take overlays into account so backing store doesn't work if you
  1499.      have overlay windows on the screen. This is fixed in IRIX 5.x.
  1500.  
  1501.   2) In most cases, backing store hurts your performance.  It cases ALL
  1502.      X rendering operations to make an extra (small) traversal through
  1503.      backing store code even if backing store isn't in use.  Also when
  1504.      backing store is in use, it tends to grow the X server since a
  1505.      large amount of memory can easily be used to maintain backing
  1506.      store.
  1507.  
  1508.   One alternative to backing store is to render your image to a pixmap
  1509.   and then blit from the pixmap to the screen in response to expose
  1510.   events.  This will stress the X server a great deal less than using
  1511.   backing store.  Additionally, make sure you are compressing expose
  1512.   events when you redraw.
  1513.  
  1514. ------------------------------
  1515.  
  1516. Subject:   -62- What is "/dev/tport" used for?
  1517. Date: 26 May 93 00:00:01 CST
  1518.  
  1519.   Mark Stadler (mds@sgi.com) says:
  1520.   /dev/tport is a streams-based tty device driver which can be in one
  1521.   of 2 modes:
  1522.  
  1523.   - when X is not running, /dev/tport gets its input from the graphics
  1524.     keyboard and images in the frame buffer (textport mode).  This mode
  1525.     is only intended to be used in single-user mode or during
  1526.     transitional periods when the X server is not running.
  1527.  
  1528.   - when X is running, /dev/tport doesn't get any input and generates
  1529.     no output.  Any programs or shells using /dev/tport hang on reads
  1530.     and toss writes.
  1531.  
  1532.   Kind of a strange device.  But it makes more sense with a clear
  1533.   understanding of how /dev/console works.
  1534.  
  1535.   /dev/console is kind of like a terminal switch box.  Rather than
  1536.   switching physical rs232 cables, we direct console output onto the
  1537.   output stream of other streams-based devices who request such
  1538.   behavior with TIOCCONS ioctl.
  1539.  
  1540.   By default, /dev/console directs its output to /dev/tport.  In the
  1541.   absence of a windowing system this causes console output (including
  1542.   kernel prints) to show up on the textport in front of you.
  1543.  
  1544.   Once the window system is started, the /dev/tport is no longer
  1545.   visible.  Thus the console is no longer visible.  At this point, a
  1546.   terminal emulation window (using streams based ttys) can issue the
  1547.   TIOCCONS ioctl to cause console output (including kernel printfs) to
  1548.   show up in the emulation in the window in front of you.
  1549.  
  1550.   Note that when you bring the window system down, /dev/tport is still
  1551.   there with the same session it started with and the console output
  1552.   redirected back to it again.
  1553.  
  1554. ------------------------------
  1555.  
  1556. Subject:   -63- BUGS AND PROBLEMS
  1557. Date: 15 May 94 00:00:01 EST
  1558.  
  1559.   This section discusses real and apparent bugs and problems we haven't
  1560.   covered already.
  1561.  
  1562. ------------------------------
  1563.  
  1564. Subject:   -64- Why do I get a "Broken Pipe" error when I close an X
  1565.                 client window?
  1566. Date: 10 Jun 93 00:00:01 EST
  1567.  
  1568.   Typically the error message looks like:  XIO: fatal IO error 32
  1569.   (Broken pipe) on X server ":0.0" after 214 requests (214 known
  1570.   processed) with 0 events remaining.  The connection was probably
  1571.   broken by a server shutdown or KillClient.
  1572.  
  1573.   The Window Manager is reporting that the pipe for your X client has
  1574.   been broken.  This is normal when an X client exits.  There is
  1575.   nothing wrong with your system. This message will also occur when the
  1576.   system is shut down.  This is not an error condition and no core
  1577.   files are produced.
  1578.  
  1579. ------------------------------
  1580.  
  1581. Subject:   -65- What do the errors in my 'xdm-errors' file mean?
  1582. Date: 07 May 93 00:00:01 EST
  1583.  
  1584.   It depends on the error message, obviously.  Some are:
  1585.  
  1586.     unable to load display mode, rnid = 196614, errno = 22
  1587.     Failed to unbind rn from clip, rnid = 3,errno = 22
  1588.     bogus window id in rrm request type(2)
  1589.  
  1590.   These are messages related to the communication between the rrm layer
  1591.   in the kernel and the X server.  The messages usually occur when a GL
  1592.   window is being destroyed in a sequence that the X server did not
  1593.   expect.  They are quite benign.
  1594.  
  1595. ------------------------------
  1596.  
  1597. Subject:   -66- Why doesn't SGI's xlock lock my screen?
  1598. Date: 10 Jun 93 00:00:01 EST
  1599.  
  1600.   If you or the super-user don't have a password, xlock will not lock.
  1601.  
  1602.   Under IRIX 4.0.x, xlock is set up by default to act as if invoked
  1603.   with the "-nolock" option, which tells it not to lock the screen.  If
  1604.   you want force xlock to lock, do either of the following:
  1605.  
  1606.   a) Use the "+nolock" option when invoking xlock.  This means
  1607.      "not nolock" (the opposite of "-nolock").  For example:
  1608.  
  1609.      % xlock +nolock
  1610.  
  1611.   b) Add the following line to your ~/.Xdefaults file:
  1612.  
  1613.      XLock.nolock:    False
  1614.  
  1615.   In IRIX 5.x, the default behavior of xlock has been reversed, so
  1616.   xlock does indeed lock by default.  If you wish to keep the IRIX 4.x
  1617.   behavior, invoke xlock with the -nolock option.
  1618.  
  1619. ------------------------------
  1620.  
  1621. Subject:   -67- Sun XView applications like "mailtool" hang my X server
  1622.                 in IRIX 4.0.5.  They come up fine, but when I click on
  1623.                 them the server freezes.
  1624. Date: 07 May 93 00:00:01 EST
  1625.  
  1626.   Any XView application run under the Xsgi X11-server shipped in IRIX
  1627.   versions 4.0.5A through 4.0.5G will lock the X Server on the first
  1628.   mouse click and will not release it until killed from somewhere
  1629.   else.  Fortunately there is a workaround:
  1630.  
  1631.   a) Run the application with '-Wfsdb' on the command line.
  1632.      Alternatively you could use '-fullscreendebug'.  For example:
  1633.  
  1634.      % mailtool -Wfsdb
  1635.  
  1636.   b) If you have the sources, add
  1637.  
  1638.        extern int fullscreendebug;
  1639.  
  1640.      before main() and
  1641.  
  1642.        fullscreendebug = 1;
  1643.  
  1644.      after the xv_init() call.  This forces the program to set this
  1645.      flag in any case - even when run with non-SGI X servers.  It
  1646.      releases you of the danger of omitting -Wfsdb and locking your
  1647.      screen.
  1648.  
  1649.   c) if the program uses the 'fullscreen' package, you might add
  1650.  
  1651.          Fullscreen.Debug: True
  1652.  
  1653.      in $HOME/.Xresources or specify this resource on the command
  1654.      line.  This flag currently disables grabs in both the 'window' and
  1655.      the 'fullscreen' package, but is only set from resources in the
  1656.      'fullscreen' package.
  1657.  
  1658. ------------------------------
  1659.  
  1660. Subject:   -68- Why can't I log into Pandora in IRIX 4.0.1?
  1661. Date: 07 May 93 00:00:01 EST
  1662.  
  1663.   The problem is caused by an incorrect shutdown.  When you log out,
  1664.   xdm runs /usr/sbin/gamma and writes the current value to
  1665.   /etc/config/system.glGammaVal.  IRIX buffers this data in main memory
  1666.   in the buffer cache.  If the system is powered off right after
  1667.   logout, the data is not written to the file.
  1668.  
  1669.   a) Login to your system as root, either via the network or
  1670.      by taking the machine down to single-user mode.
  1671.  
  1672.   b) enter these commands at the # prompt:
  1673.  
  1674.      # cd /etc/config
  1675.      # cat system.glGammaVal
  1676.  
  1677.   If the cat command returns a value of 1.7000, contact your technical
  1678.   support provider for additional troubleshooting.  If the command
  1679.   returns nothing (empty file) or "0", it means the problem can be
  1680.   fixed by entering the following command:
  1681.  
  1682.     # /bin/rm system.glGammaVal
  1683.     # /bin/echo "1.7" > system.glGammaVal
  1684.  
  1685.   Check your work:
  1686.  
  1687.     # cat system.glGammaVal
  1688.  
  1689.   The command above should now return 1.7.
  1690.  
  1691.   Your login should now be successful. If you edited the file while
  1692.   Pandora was running, you'll find the first login attempt will fail,
  1693.   but any later attempts will be successful. After the first login
  1694.   attempt, Pandora will read in the correct gamma value.
  1695.  
  1696. ------------------------------
  1697.  
  1698. Subject:   -69- Pandora won't come up, and /usr/adm/SYSLOG says
  1699.                 "helvetica font missing"
  1700. Date: 07 May 93 00:00:01 EST
  1701.  
  1702.   It appears that the subsystem "eoe2.sw.fonts" did not get loaded.
  1703.   Re-install the subsystem using the following sequence from 'inst':
  1704.  
  1705.   1) type "inst" or boot the mini-root, as documented in Section 4.5
  1706.      of the "IRIS Software Installation Guide"
  1707.   2) keep *
  1708.   3) set neweroverride on
  1709.   4) install eoe2.sw.fonts
  1710.   5) exit
  1711.  
  1712. ------------------------------
  1713.  
  1714. Subject:   -70- Why does the X server sometimes abort when I log out in
  1715.                 IRIX 5.0.1 and IRIX 5.1?
  1716. Date: 01 Oct 93 00:00:01 EST
  1717.  
  1718.   BACKGROUND:  Both problems are related to resetting of the X server.
  1719.   Normally the X server process is spawned by xdm (the X Display
  1720.   Manger).  The X server process continues to run after every login and
  1721.   logout of the graphics head; the server simply resets to its initial
  1722.   state every time someone logs out.  In X server terminology, the X
  1723.   server goes through multiple generations.
  1724.  
  1725.   PROBLEM 1:  The dynamically loadable Display PostScript extension has
  1726.   a bug where it does not properly reset the X server state on server
  1727.   reset (ie, generations other than the first).
  1728.  
  1729.   The problem only occurs if you have dps_eoe.sw.xserver_ext (which
  1730.   contains /usr/lib/X11/dyDDX/xdps.so which is the dynamically loadable
  1731.   Display PostScript extension).  dps_eoe is installed by default.
  1732.  
  1733.   This problem affects all CPUs and graphics hardware.
  1734.  
  1735.   PROBLEM 2:  If the user logs out while any GL-based application (such
  1736.   as buttonfly, WorkSpace, jot, etc) is running, the server will not
  1737.   reset.
  1738.  
  1739.   Typically you will find errors in /usr/adm/SYSLOG similar to the
  1740.   following:
  1741.  
  1742.       date host xdm[pid]: IO Error in XOpenDisplay
  1743.       date host xdm[pid]: Display :0 cannot be opened
  1744.       date host xdm[pid]: Display :0 is being disabled
  1745.       date host xdm[pid]: Rescanning both config and servers files
  1746.  
  1747.   WORKAROUND:  As root, edit /usr/lib/X11/xdm/xdm-config and change the
  1748.   line
  1749.  
  1750.       DisplayManager._0.terminateServer:      False
  1751.  
  1752.   to
  1753.  
  1754.       DisplayManager._0.terminateServer:      True
  1755.  
  1756.   (Please note that the contents of xdm-config are case-sensitive.)
  1757.   Then restart the window system (/usr/gfx/stopgfx; /usr/gfx/startgfx)
  1758.  
  1759.   If the above workaround doesn't work, try setting
  1760.  
  1761.       DisplayManager._0.startAttempts:        1
  1762.  
  1763.   to
  1764.  
  1765.       DisplayManager._0.startAttempts:        4
  1766.  
  1767.   This change forces xdm to try to start the X server up to four times,
  1768.   if the first three fail.
  1769.  
  1770. ------------------------------
  1771.  
  1772. Subject:   -71- After running a few programs, the colors change as the
  1773.                 cursor moves. The colors are usually all wrong in other
  1774.                 windows.
  1775. Date: 07 May 93 00:00:01 EST
  1776.  
  1777.   This is known as colormap flashing. It is caused by the server
  1778.   maintaining 2 separate colormaps, one for GL windows and one for X
  1779.   windows.  As the cursor moves around, the window manager will install
  1780.   the correct colormap for each window.  This will cause colors to be
  1781.   wrong in other windows.  For more information on colormaps and
  1782.   installation please see the Xlib Programming manual, chapter 7 (Vol I
  1783.   of the O'Reilly series).
  1784.  
  1785.   You can sometimes avoid colormap flashing by configuring your X
  1786.   Server to use a 12-bit or 24-bit visual by default.
  1787.  
  1788. ------------------------------
  1789.  
  1790. Subject:   -72- How can I make my X Server use a 12-bit PseudoColor, 12-
  1791.                 bit TrueColor or 24-bit TrueColor visual by default?
  1792. Date: 07 May 93 00:00:01 EST
  1793.  
  1794.   By default, the SGI X Server is configured to use an 8-bit
  1795.   PseudoColor visual.  X-based applications can request other visuals
  1796.   directly if they are available.  Alternatively, you can change the
  1797.   default visual by performing the following steps:
  1798.  
  1799.   a) Run "/usr/bin/X11/xdpyinfo" and check that your server is
  1800.      capable of using a 12-bit or 24-bit visual.  If it is,
  1801.      you will see lines similar to the following:
  1802.  
  1803.      visual id, max buffers, depth:    0x28, 0, 12
  1804.      visual id, max buffers, depth:    0x29, 0, 12
  1805.      visual id, max buffers, depth:    0x2a, 0, 24
  1806.  
  1807.      The last number on each line represents the number of bits
  1808.      available for that visual.
  1809.  
  1810.   b) Log in as root
  1811.  
  1812.   c) Edit the file /usr/lib/X11/xdm/Xservers.  By default it
  1813.      will contain the string:
  1814.        :0 secure /usr/bin/X11/X -bs -c -pseudomap 4sight
  1815.      for a 24-bit TrueColor visual change it to:
  1816.        :0 secure /usr/bin/X11/X -bs -c -class TrueColor -depth 24
  1817.      for a 12-bit PseudoColor visual change it to:
  1818.        :0 secure /usr/bin/X11/X -bs -c -class PseudoColor -depth 12
  1819.  
  1820.   d) Restart your X server.  You can do this by invoking either
  1821.      of the following commands:
  1822.  
  1823.      % killall -TERM Xsgi
  1824.  
  1825.      % /usr/gfx/stopgfx; /usr/gfx/startgfx
  1826.  
  1827.   Note:  X Server visuals are an advanced topic; before making the
  1828.   above changes you should be aware that some 3rd-party and freeware
  1829.   applications might not gracefully adapt to an X Server which supplies
  1830.   anything but an 8-bit PseudoColor visual by default.
  1831.  
  1832. ------------------------------
  1833.  
  1834. Subject:   -73- When I try to run UIM/X uxserverd, I get an error
  1835.                 message saying, "license file has been modified, cannot
  1836.                 start the UIM/X license server".
  1837. Date: 07 May 93 00:00:01 EST
  1838.  
  1839.   You probably have been given a bad key.  The most frequent causes of
  1840.   incorrect keys have been incorrect capitalization and incorrect IP
  1841.   addresses.
  1842.  
  1843.   The program that generates the UIM/X key requires that the "host ID"
  1844.   (or IP address) be in hexadecimal format.  If you feed it the
  1845.   standard form of IP address (i.e., 123.45.678.90) it will generate
  1846.   the wrong key and will not complain.
  1847.  
  1848.   To ensure that you are is giving the correct information when
  1849.   requesting a UIM/X key, please do the following:
  1850.  
  1851.   Hostname:  Type in 'hostname' at the prompt, and be sure to say
  1852.   exactly what it says (including capitalization, if any).
  1853.  
  1854.   Host ID:  Type in 'hostid' at the prompt, and be sure to say exactly
  1855.   what it says.  You will be reading back a series of numbers of the
  1856.   form 0xc030c844.  The leading 0x indicates that the following number
  1857.   is hexadecimal.
  1858.  
  1859.   The key generating script is highly sensitive to capital letters.
  1860.   Make sure you confirm the case of the letters, both when getting the
  1861.   hostname/hostid and when having your key read back to you.
  1862.  
  1863.   If this still doesn't fix the problem, you may have mixed files
  1864.   between UIM/X 1.0 and 2.0.  Completely remove UIM/X, re-install it,
  1865.   and reproduce a Uimx2_0.license file with the correct information.
  1866.  
  1867. ------------------------------
  1868.  
  1869. Subject:   -74- MISCELLANEOUS
  1870. Date: 15 May 94 00:00:01 EST
  1871.  
  1872.   Everything else.
  1873.  
  1874. ------------------------------
  1875.  
  1876. Subject:   -75- What books about the X Window System and OSF/Motif do
  1877.                 you recommend?
  1878. Date: 07 May 93 00:00:01 EST
  1879.  
  1880.   Introductory Texts on the X Window System
  1881.  
  1882.   - O'Reilly and Associates Inc., "The Definitive Guides to the X
  1883.     Window System", by Valerie Quercia and Tim O'Reilly. Vol.  3, "X
  1884.     Window System User's Guide", Sebastopol, CA., 1988, 1989.
  1885.  
  1886.     Discusses being an end user of the X window system.  Covers topics
  1887.     like window manages, font specifications, standard X clients and
  1888.     resources.
  1889.  
  1890.   Texts on X Window System Programming
  1891.  
  1892.   - O'Reilly and Associates, Inc. "The Definitive Guides to the X
  1893.     Window System", by Adrian Nye. Vol. 1, "Xlib Programming Manual",
  1894.     Sebastopol, CA, 1990.
  1895.  
  1896.     Contains the introductory elements for programming with the Xlib,
  1897.     the lowest level of the X window system.  Discusses concepts such
  1898.     as X color capacities, windows, events, drawing primitives.
  1899.  
  1900.   - Young, Douglas A., "X Window Systems Programming and Applications
  1901.     with Xt" (OSF/Motif Edition). Prentice Hall. Englewood Cliffs, NJ.
  1902.     1990.
  1903.  
  1904.     A thorough book starting with the basics of programming with a
  1905.     toolkit though advanced topics.  Contains source code for several
  1906.     small complete applications.  (Source code for this book is also
  1907.     available on line in the /usr/src directory of the Motif
  1908.     Development option.)
  1909.  
  1910.   - O'Reilly and Associates Inc., "The Definitive Guides to the X
  1911.     Window System", by Adrian Nye and Tim O'Reilly. Vol. 4, "X Toolkit
  1912.     Intrinsics Programming Manual", Sebastopol, CA., 1990.
  1913.  
  1914.     Another reference for programming with the OSF/Motif toolkit.
  1915.     Covers topics including basic programming, widgets, resources, and
  1916.     more advanced topics.
  1917.  
  1918.   Reference Texts for the X Window System :
  1919.  
  1920.   - O'Reilly and Associates Inc., "The Definitive Guides to the X
  1921.     Window System", by Adrian Nye. Vol. 2, "Xlib Reference Manual",
  1922.     Sebastopol, CA., 1988.
  1923.  
  1924.     Complete reference for Xlib library routines.
  1925.  
  1926.   - Scheifler, Robert and James Gettys, X Window System, Second
  1927.     Edition, Digital Press, 1990.  ISBN 1-55558-050-5.
  1928.  
  1929.     Referred to as "the Bible" of Xlib and X Protocol reference.
  1930.  
  1931.   Reference Texts for the OSF/Motif Toolkit :
  1932.  
  1933.   - Open Software Foundation, "OSF/Motif Programmer's Guide". Release
  1934.     1.1, Prentice Hall. Englewood Cliffs, NJ. 1990.
  1935.  
  1936.     Exhaustive reference of every widget in the OSF/Motif library.
  1937.  
  1938.   - Asente, Paul J. and Ralph R. Swick. "X Window System Toolkit".
  1939.     X Version 11, Release 4. Digital Press. 1990.
  1940.  
  1941.     Very in-depth reference to the structure and operation of an X
  1942.     window system toolkit.
  1943.  
  1944. ------------------------------
  1945.  
  1946. Subject:   -76- Does the IRIX 5.2 Magic user environment display on an X
  1947.                 terminal?
  1948. Date: 30 Apr 94 00:00:01 EST
  1949.  
  1950.   Joel Tesler <joel@jellotrees.esd.sgi.com> says:  Although it is not
  1951.   officially supported, it should work in IRIX 5.2 MR (but not in the
  1952.   beta release).  There are some glitches.  You probably don't have to
  1953.   set the environment variable _NO_DESKTOP_IMAGES, but try it if you
  1954.   have problems.  There should be no reason to set _SGI_NO_REMOTE_GL.
  1955.  
  1956. ------------------------------
  1957.  
  1958. Subject:   -77- What about OpenGL?
  1959. Date: 22 Oct 94 00:00:01 EST
  1960.  
  1961.   It has its own newsgroup, comp.graphics.opengl, which has an FAQ,
  1962.   which is listed in the misc FAQ. The misc FAQ also points to an
  1963.   OpenGL WWW page.
  1964.  
  1965. ------------------------------
  1966.  
  1967. Subject:   -78- Which SGI machines can run OpenGL now? Which will in the
  1968.                 future?
  1969. Date: 12 Jun 94 00:00:01 EST
  1970.  
  1971.   OpenGL comes with IRIX 5.x. It supports Entry, XS, XS24, XZ, XL,
  1972.   Elan, Extreme, VTX, Reality Engine, and Reality Engine 2 graphics. A
  1973.   later version of OpenGL (sometime this year?) will support G, GT,
  1974.   GTX, VGX, and VGXT graphics.
  1975.  
  1976. ------------------------------
  1977.  
  1978. End of sgi/faq/graphics Digest
  1979. ******************************
  1980. -- 
  1981. The SGI FAQ group                                sgi-faq@viz.tamu.edu
  1982. Finger us for info on the SGI FAQs, or look in viz.tamu.edu:/pub/sgi.
  1983.  
  1984.