home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk1.iso / answers / sgi / faq / graphics < prev    next >
Encoding:
Internet Message Format  |  1994-10-06  |  69.1 KB

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