Subject: 1.500: Which release of X11 do I have? AIX 4.x includes X11 R5 and Motif 1.2. On AIX 3, Run 'lslpp -h X11rte.obj'. If your output has a line similar to: 01.02.0000.0000 COMPLETE COMMIT 03/04/93 02:05:11 root you have X11 R4. If your output has a line similar to: U491068 01.02.0003.0000 COMPLETE COMMIT 07/28/93 12:50:42 root you have X11 R5. Some people also call these AIXwindows 1.2.0 and 1.2.3. 'lslpp -h X11rte.motif1.2.obj' should tell you if you are running Motif 1.2. From: Jan Just Keijser AIX 4.1 and AIX 4.2 come with X11R5 and Motif 1.2.4 AIX 4.3.1 (and perhaps 4.3.0) comes with X11R6.1 and Motif 2.1 Some executables which run fine using the X11R5 libraries may not run when using the X11R6.1 libraries; you can specify which X11 libraries to use by setting LIBPATH=/usr/lpp/X11/lib/R5:/usr/lib:... for X11R5 and LIBPATH=/usr/lpp/X11/lib/R6:/usr/lib:... for X11R6.1; by default, /usr/lib/libX11.a -> /usr/lpp/X11/lib/R6/libX11.a and also for the other libraries on AIX 4.3.1. On most of the AIX 4.1.x and 4.2.1 boxes I have seen the default is /usr/lib/libX11.a -> /usr/lpp/X11/lib/R4/libX11.a ie the default libraries are the X11R4 libraries and _NOT_ the R5 libraries; this may also be due to the setup at my site. ------------------------------ Subject: 1.501: How to prevent ctrl-alt-backspace from killing the X session Start X with 'xinit -T' to disable ctrl-alt-backspace from stopping X. ------------------------------ Subject: 1.502: Who has a termcap/terminfo source for the HFT console? The console used on the RISC System/6000, PS/2 and RT can be used as a terminal on another system with the termcap below. You can find this and other termcaps in /lib/libtermcap/termcap.src, including IBM specific ones. The terminfo sources are stored in /usr/lib/terminfo/*.ti. This termcap can also be used from an aixterm window. hf|hft|hft-c|ibm8512|ibm8513|IBM_High_Function_Terminal:\ :co#80:li#25:am:ht:\ :cm=\E[%i%d;%dH:ti=\E[25;1H:te=\E[20h:\ :nd=\E[C:up=\E[A:do=^J:ho=\E[H:\ :bs:sf=\E[S:ec=\E[%dX:\ :cl=\E[H\E[J:cd=\E[J:ce=\E[K:\ :AL=\E[%dL:DL=\E[%dM:al=\E[L:dl=\E[M:\ :im=\E[4h:ei=\E[4l:mi:\ :dm=\E[4h:ed=\E[4l:\ :so=\E[7m:se=\E[m:ul=\E[4m:ue=\E[m:\ :md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:\ :as=^N:ae=^O:sc=\E[s:rc=\E[u:\ :kl=\E[D:kb=^H:kr=\E[C:ku=\E[A:kd=\E[B:kh=\E[H:\ :kn#10:k1=\E[001q:k2=\E[002q:k3=\E[003q:k4=\E[004q:k5=\E[005q:\ :k6=\E[006q:k7=\E[007q:k8=\E[008q:k9=\E[009q:k0=\E[010q:\ :is=\Eb\E[m^O\E[?7h:rs=\Eb\E[m^O\E[?7h\E[H\E[J: ------------------------------ Subject: 1.503: How can I look at PostScript files? Why is "dpsexec" so lousy? From: Marc Pawliger showps comes with the 1.2.3 (X11R5) version of the X11rte.ext.obj LPP. Very nice PS file previewer from Adobe. Replaces xpsview which came with pre-1.2.3 Installed as /usr/lpp/DPS/showps/showps From: VRBASS@ATLVMIC1 (Vance R. Bass) You can look at PostScript files using either "xpreview" (in the optionally installable text formatting services) or you can get Ghostscript and Ghostview from a comp.sources.x server and build it yourself. From the "xpreview" man page: The xpreview command is an AIXwindows 1.2- and Motif 1.1-based application that displays output from the troff command on an AIXwindows display. The troff command output file must be prepared for any one of the devX100, devX100K or devpsc devices. The xpreview command also displays PostScript language files that begin with %!. "dpsexec" is NOT intended to be a full-service document browser, but rather a simple DPS code debugger. If you insist on using it, you can edit your PS code to remove the "showpage" (which will reset dpsexec and clear the window) to view single-page files. It does not handle multi-page files gracefully. ------------------------------ Subject: 1.504: unix:0 vs `hostname`:0 1.) Is there any way to get the machine to check its local host table first without renaming resolv.conf? [AIX 3.2 only] PTF U412845 implements an environment variable to set the resolver time out in AIX 3.2. This allows you to set RES_TIMEOUT to the number of seconds before it times out, a failing a DNS query the machine will consult /etc/hosts. 2.) How do you tell X applications where you are if the console display is unix:0? From: David L. Crow I would suggest that if you have R5, use ":.". I do not believe that R4 clients will understand :0, so I would suggest unix:0 for them. Without specifying unix or the hostname, you will get the fastest transport mechanism. While currently there are only two transport methods in the AIXwindows X server (Unix sockets and TCP sockets), many vendors are looking at using shared memory as a transport method. If you use :0 (or :0.0 or :1, etc.), then you should get the best performance regardless of the available transport methods. From: Marc Pawliger Using "unix:0" or "hostname:0" when the X11 Shared Memory Transport (SMT) is installed as part of the 1.2.3 X11rte.obj (X11R5) will incur a penalty vs. using ":0" See /usr/lpp/X11/README.SMT 3.) Is there a significant performance penalty incurred by using `hostname`:0 as DISPLAY? Yes! Using unix:0, you are using Unix sockets. These are much faster than their TCP socket counterparts. ------------------------------ Subject: 1.505: VT100 key bindings for aixterm From: haedener@iac.unibe.ch Add this to your .Xdefaults file and start your VAX session with 'aixterm -v -name vt100 -e telnet MYVAXHOST' ----- vt100.vt102: true vt100.fullcursor: false vt100.translations: F1: string(0x1b) string("OP") \n\ F2: string(0x1b) string("OQ") \n\ F3: string(0x1b) string("OR") \n\ F4: string(0x1b) string("OS") \n\ KP_0: string(0x1b) string("Op") \n\ KP_1: string(0x1b) string("Oq") \n\ KP_2: string(0x1b) string("Or") \n\ KP_3: string(0x1b) string("Os") \n\ KP_4: string(0x1b) string("Ot") \n\ KP_5: string(0x1b) string("Ou") \n\ KP_6: string(0x1b) string("Ov") \n\ KP_7: string(0x1b) string("Ow") \n\ KP_8: string(0x1b) string("Ox") \n\ KP_9: string(0x1b) string("Oy") \n\ KP_Divide: string(0x1b) string("OQ") \n\ KP_Multiply: string(0x1b) string("OR") \n\ KP_Subtract: string(0x1b) string("OS") \n\ KP_Add: string(0x1b) string("Om") \n\ KP_Enter: string(0x1b) string("OM") \n\ KP_Decimal: string(0x1b) string("On") \n\ Next: string(0x1b) string("Ol") \n\ Left: string(0x1b) string("OD") \n\ Up: string(0x1b) string("OA") \n\ Right: string(0x1b) string("OC") \n\ BackSpace : string(0x7f) \n\ Down: string(0x1b) string("OB") You should also add XENVIRONMENT=$HOME/.Xdefaults export XENVIRONMENT to your .profile. ------------------------------ Subject: 1.506: Is there a screen saver that does not use excessive CPU? From: Don Buchholz Try using xlock with these options: xlock -mode life -count 1500 -nice 20 -root From: pranav@evolving.com (Pranav Vakil) Use mlock -hide to hide the background. You can also modify the mlock (/usr/local/tools/mlock) code to allow the standard X screen saver to take effect. The timeout value is originally set to 0 which means the screen saver is off. Modify this to be 120 (2 minutes) and set the interval time to be 60 (1 minute). Using these intervals, I have found that over a 24 hour period, it uses only .3 cpu minutes. ------------------------------ Subject: 1.507: Where are the colors, available for an X session, listed. /usr/lpp/x_st_mgr/bin/rgb.txt and on AIX 4.2, the file is /usr/lpp/X11/lib/X11/rgb.txt ------------------------------ Subject: 1.508: Why does my app hang the X server but not an X station? From: Bjorn P. Brox /usr/lpp/X11/README.SMT X client/server communication uses a 64k buffer by default. The size of this buffer is controled by the X_SHM_SIZE environment variable increasing the size of the buffer has been used to prevent some applications from hanging the X server :) ------------------------------ Subject: 1.509: How do I switch the control and caps lock key bindings? If you are running the X window system, you can put the following into .xmodmaprc remove Lock = Caps_Lock remove Control = Control_L keysym Control_L = Caps_Lock keysym Caps_Lock = Control_L add Lock = Caps_Lock add Control = Control_L Hidden Hint: Use (xmodmap -e "pointer = 3 2 1") to make the mouse lefty friendly. ------------------------------ Subject: 1.510: Missing fonts? If your Xserver supports X11R5 try running a font server (edit /usr/lib/X11/fs/config and run fsconf && startsrc -s fs) Consult your Xserver instructions on how to include a font server in your font path. ------------------------------ Subject: 1.511: What's the termcap entry for an IBM 3151 look like? # # Written by Aleksandar Milivojevic, alex@srce.hr # 24.09.1994 # I2|ibm3151|3151|IBM 3151 terminal:\ :am:mi:cr=^M:sf=^J:co#80:li#24:cd=\EJ:ce=\EI:cm=\EY%+\040%+\040:\ :cl=\EH\EJ:dc=\EQ:dl=\EO:do=\EB:le=\ED:mb=\E4$a:md=\E4(a:\ :me=\E4@\E>B:mr=\E4!a:nd=\EC:se=\E4>b:so=\E4!a:ue=\E4=b:up=\EA:\ :us=\E4"a:kb=^H:kd=\EB:kh=\EH:kl=\ED:kr=\EC:ku=\EA:\ :k1=\Ea\r:k2=\Eb\r:k3=\Ec\r:k4=\Ed\r:k5=\Ee\r:\ :k6=\Ef\r:k7=\Eg\r:k8=\Eh\r:k9=\Ei\r:k0=\Ej\r:\ :ti=\E>B:te=\E>B:ms:ho=\EH:bl=^G:al=\EN:ta=^I: ------------------------------ Subject: 1.512: Errors starting X11 application binaries from aixpdslib. From: We have been aware of the problem people have with dynamic links when running the prebuilt of X-stuffs from this library. The typical error messages will be: Could not load program [program_name] Member shr4.o not found or file not an archive Member shr4.o not found or file not an archive Could not load library libXt.a[shr4.o] Error was: No such file or directory It's because that we built the programs using X11 libraries of MIT which are not compatible with those of IBM. If this is the case, then please get the compressed tarred file of the source code instead, and recompile them on your system using your libraries. ------------------------------ Subject: 1.513: .XShm*, .sm* (Shared memory) Link errors building Xwindows applications. Link errors that refer to .XShm* often times are a result of compiling applications to take advantage of the Shared Memory extension of the X server. You may either compile without shared memory or load the shared memory extensions. (see /usr/lpp/X11/README and README.SMT) A script for rebuilding your X server with the shared memory can be found in /usr/lpp/X11/Xamples/server. ------------------------------ Subject: 1.514: How do I set my DISPLAY when I login to another machine? Though this is not a question specific to AIX, it appears often enough to warrant an answer here. There are lots of approaches, some of which are described in the X Windows FAQ. Most involve a little login shell programing to parse the output of `who` or `who am i`. by e-siebert@uchicago.edu will help if you are willing/able to install it suid. See the X Windows FAQ and newsgroup for more information. Hostwhence is also availabile in the "lsof" smit-installable package on www-frec.bull.com. The installation scripts use ACLs to allow hostwhence to read /dev/kmem without being set-uid-root. ------------------------------ Subject: 1.515: Why doesn't Netscape work? From: "Gary R. Hook" The problem is that Netscape has statically linked libc into Mozilla. When the AIX 3 libc code (setlocale()) tries to load an AIX 4 locale, the two are incompatible and a core dump ensues. AIX 4 locales have to be loaded by AIX 4 libc. Using LANG=C causes a lot of locale code to be bypassed, allowing the application to avoid loading a non-C locale, and to continue execution. From: Colin Here is a shell script that works around Netscape's problems by setting the LANG and CLASSPATH environment variables. #!/bin/sh LANG=C CLASSPATH=/path/to/java_30 export LANG CLASSPATH if [ $# -eq 0 ]; then /path/to/netscape http://your.home.page & else /path/to/netscape $* & fi ------------------------------