From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,cf2be345010bad8f,start X-Google-Attributes: gid10d4db,public X-Google-Thread: 100062,cf2be345010bad8f,start X-Google-Attributes: gid100062,public X-Google-Thread: f7ded,cf2be345010bad8f,start X-Google-Attributes: gidf7ded,public X-Google-Thread: f9382,cf2be345010bad8f,start X-Google-Attributes: gidf9382,public X-Google-ArrivalTime: 1993-04-05 22:21:49 PST Xref: gmd.de comp.os.linux:35275 comp.os.linux.announce:517 news.answers:6930 comp.answers:398 Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!agate!ames!saimiri.primate.wisc.edu!caen!batcomputer!theory.TC.Cornell.EDU!mdw From: corsini@labri.greco-prog.fr Newsgroups: comp.os.linux,comp.os.linux.announce,news.answers,comp.answers Subject: Linux Frequently Asked Questions 4/4 [monthly posted] Followup-To: poster Date: 6 Apr 1993 05:17:24 GMT Organization: Greco Prog. CNRS & LaBRI, Bordeaux France Distribution: world Message-ID: <1pr3p4$qdj@fitz.TC.Cornell.EDU> Reply-To: linux@numero6.greco-prog.fr NNTP-Posting-Host: theory.tc.cornell.edu Summary: Linux, a small and free unix-like for 386-AT computers. Originator: mdw@theory.TC.Cornell.EDU Archive-name: linux-faq/part4 Last-Modified: 93/03/28 Version: 1.17 ********************************************************* * * * Answers to Frequently asked questions about Linux * * * ********************************************************* This post contains Part 4 of the Linux FAQ (4 parts). It must be read *after* the 3 first parts. ===================================8<====>8============================ CONTENTS (of this part) IX. GCC MISC INFORMATION (part4) X. SCSI SPECIAL (part4) XI. NETWORKING and LINUX (part4) XII. X11, THE MAXIMUM and MORE (part4) XIII. EMACS for LINUX (part4) ===================================8<====>8============================ IX. GCC MISC INFORMATION ======================== **** Last update 93/03/26 IX.A. HLU Information IX.B. OTHERS IX.A. HLU Information ~~~~~~~~~~~~~~~~~~~~~ The official release of GCC for Linux is 2.3.3. This section includes: README.gccdisk FAQ of gcc written by HLU IX.01) I don't know how to install gcc stuff, is there special places? ANSWER: This is the README.gccdisk Linux GNU C/C++ [HJ release] Introduction ------------ This is GNU C/C++ 2.3.3. It is linked with jump table 4.2. You should use it with the Linux C library disks since the C/C++ compiler has no shared images, which are required by all the binaries in it. It consists of 2 minix disks, which will fit on either 5.25" or 3.5" floppies. It is on tsx-11.mit.edu under pub/linux/GCC/gccdisk Distribution File Format ------------------------ There are two files, each of which goes on one disk A. Disk 1 (gcc233a.Z) This contains gcc, cpp, cc1 and crt0.o/gcrt0.o. There are also some header files in /usr/lib/gcc-lib/i386-linux/2.3.3/include. B. Disk 2 (gcc233b.Z) This disk contains cc1plus. Installing on the Hard Drive ---------------------------------------- 1. uncompress base[1|2].Z. 2. rawrite or dd each file to a formatted floppy disk. Now you have made a copy of gcc 2.3.3 on two floppies. To copy each floppy to your hd, you should mount the floppy and copy its contents to your hard drive. You can do this by: mount /dev/fd[0|1] /mnt cd /mnt for d in bin dev etc usr do if [ -d $d ]; then cp -av $d / fi done Note: This may overwrite some files on your hard disk. Thanks. H.J. hlu@eecs.wsu.edu 12/31/92 IX.02) What compiler should I use for Linux? ANSWER: You should only use the same version on tsx-11.mit.edu under /pub/linux/GCC. If you want to use the testing release, first join the GCC channel on the Linux mailing list, and then send a note to hlu@eecs.wsu.edu. Don't use gcc older than the one on tsx-11.mit.edu. IX.03) Where is the latest official gcc 2.xx for Linux? ANSWER: It's on tsx-11.mit.edu under /pub/Linux/GCC and under pub/linux/GCC. You may find it on the other sites. Since gcc 2.3.3, you can compile it yourself out of box from any gnu ftp sites. Just unpack the source code and do configure [i386-linux|i486-linux] You should follow the instructions in INSTALL. IX.04) Where is the latest official Linux C library? ANSWER: It's on tsx-11.mit.edu under /pub/Linux/GCC and under pub/linux/GCC. You may find it on the other sites. IX.05) What are the contents of them? ANSWER: Please read the current release note and ChangeLog for details. IX.06) How do I install them? ANSWER: Read README and release notes. IX.07) What are the main differences with the old release? ANSWER: Read README and release notes. IX.08) Can I use the old version of gcc? ANSWER: Please get rid of gcc older than gcc 2.2.2. Starting from gcc 2.2.2, you can do gcc -V xxxx where xxxx is the version number. Please read `release.xxxx' for detail. There is one catch in gcc 2.2.2d, setjmp/longjmp is changed, so the old header files is not compatible with gcc 2.2.2. Before you install gcc 2.2.2d, please do cp /usr/include/setjmp.h /usr/lib/gcc-lib/i386-linux/2.2.2/include where /usr/include/setjmp.h is come with gcc 2.2.2. IX.09) Can I delete the old shared image in /lib? ANSWER: Since the Linux C library version 4.3, we have introduced the dynamically linked library. There is no need to keep old shared images in /lib if none of your binaries are linked with the classic shared library which has been obsolete. You can just keep one version of the shared image in /lib which has the highest major and minor release numbers for each shared library. The name of the shared image is "xxxxxxxxxxxxxxx.so.major.minor". IX.10) Is stdio ANSI compatible? ANSWER: Yes, please test it. IX.11) Is g++ in 2.xx? ANSWER: Yes. IX.12) Where can I get the gcc manual? ANSWER: You can get man pages and manual come with the gcc source code on any gnu ftp sites. You should find gcc-man.tar.z on tsx-11 which has man pages for gcc. IX.13) What options can I use for gcc? ANSWER: Read the manual. There is one special flag for Linux, -static tells gcc to use the static libraries. The default is the jump table version of shared libraries. IX.14) How can I debug the C code? ANSWER: Read the gcc/gdb manuals. The simple way to do is gcc -g foo foo.c gdb foo IX.15) Where is the source code of the new libc.a? ANSWER: The same place you find this file. It is called libc-xx.yy.tar.z. IX.16) Why does g++ complain, even die? ANSWER: You need "expr", which is in GNU shell utilities 1.6, echo (?) and sed. IX.17) How do I generate code for 486? ANSWER: Add -m486 to CFLAGS. IX.18) I heard malloc (0) wouldn't work with Linux, what should I do? ANSWER: It *does* work in a manner which POSIX allows; unfortunately, pre-POSIX code frequently assumes that malloc(0) will not return 0 -- the standard version of malloc under Linux *does* return 0. By including , you get a definition of malloc which behaves more traditionally. If you define NO_FIX_MALLOC, then you will get the default (non-traditional) form. If you are trying to develop POSIX compliant code under Linux, you should probably define NO_FIX_MALLOC to ensure that your code doesn't make assumptions about malloc() which will not work on other systems. (Note: NO_FIX_MALLOC is specific to Linux.) (Provided by Phil.Richards@prg.oxford.ac.uk. Thanks.) IX.19) Why does gcc say "xxxxx..h not found"? ANSWER: see QUESTION: What are the contents of them? IX.20) I really followed every step in the documentation, but when I do "make", why does it say "don't how to make xxxxxx"? ANSWER: The dependency in Makefile is dated, you need to make a new one. Please get some guide on make and read Makefile. For the kernel sources, please do cd src/linux make dep IX.21) How do I compile programs under Linux? ANSWER: The Linux C library is trying to be ANSI/POSIX compliant. It is also very compatible with SYSV and BSD. The C library is loaded with SYSV and BSD functions. There are three exceptions: 1. signal in Linux is POSIX. 2. tty in Linux is POSIX. 3. time functions are POSIX, plus a few BSD and SYSV extensions. 4. setjmp/longjmp functions are POSIX. But you can use -D__FAVOR_BSD to make it BSD or use sigsigjmp/siglongjmp. When you compile a program under Linux, your best bet is include all the appropriate header files and use -Wall. All the usable functions and global variables are declared in the corresponding header files. YOU SHOULD NOT DEFINE ANY functions or global variables OF THE LINUX C LIBRARY IN YOUR CODE IF YOU WANT TO USE THE SHARED LIBRARIES. After saying all those, you now should know you can compile a program with -D_POSIX_SOURCE or -D_GNU_SOURCE (read for details). With a few modifications you can even use -DSYSV, -DUSG or -DBSD. Some codes need to define -DSTDC_HEADERS for ANSI C compiler like gcc here. To use malloc () and calloc () safely under Linux, please include and don't define NO_FIX_MALLOC. BTW, gcc -traditional should work with gcc 2.2.2d or above. Please also read ChangeLog for the latest enhancement. Please read the header files for details. Maybe you should get a book on POSIX. Any suggestion of the book list? >>From Steve Robbins -- steve@nyongwa.cam.org -------- I like "POSIX Programmer's Guide", by Donald Lewine. Its essentially a list of POSIX functions' man pages, with a very brief guide in the beginning of a few things. It's published by O'Reilly & Associates, Inc. -------- IX.22) How can I get bsd style signal? ANSWER: Use -D__USE_BSD_SIGNAL. IX.23) Why does a program that should only poll for input become a CPU hog? ANSWER: The select() system call. The timeout parameter was classically used read-only by the system. Some manual pages already notes three years ago: select() should probably return the time remaining from the original timeout, if any, by modifying the time value in place. This may be implemented in future versions of the system. Thus, it is unwise to assume that the timeout pointer will be unmodified by the select() call. If you do not take this advice seriously you get a zero timeout written back to your timeout structure, which means that future calls to select() using the same timeout structure will immediately return. Fix: Put the timeout value into that structure every time you call select(). Change code like struct timeval timeout; timeout.tv_sec = 1; timeout.tv_usec = 0; while (some_condition) { select(n,readfds,writefds,exceptfds,&timeout); } to struct timeval timeout; while (some_condition) { timeout.tv_sec = 1; timeout.tv_usec = 0; select(n,readfds,writefds,exceptfds,&timeout); } IX.24) When a program is stopped using Ctrl-Z and then restarted, or in other situations that generate signals: Ctrl-C interruption, termination of a child process etc. why does it complain about "interrupted system call" or "write: unknown error" or things like that. ANSWER: The system call the program was executing has been interrupted to process the signal, and then it returned -1 and set errno = EINTR. The program then was likely to draw bad conclusions from that. Explanation: Your program has signal handlers installed, using signal() or sigaction(). When the signal occurred, your signal handler was invoked. In other Unix systems, this usually happens asynchronously or in a few slow system calls: When a signal is caught during the execution of system calls such as read(2), write(2), open(2) or ioctl(2) on a slow device (such as a terminal, but not a file), during a pause(2) system call or a wait(2) system call that does not return immediately because a previously stopped or zombie process already exists, the signal-catching function is executed and the interrupted system call then returns a -1 to the calling process with errno set to EINTR. Linux (following POSIX) checks for signals and may execute signal handlers * asynchronously (at a timer tick), * on return from *any* system call, * during the execution of the following system calls: select(), pause(), connect(), accept(), read() on terminals or sockets or pipes or /proc files, write() on terminals or sockets or pipes or line printer, open() on FIFOs or PTYs or serial lines, ioctl() on terminals, fcntl() with command F_SETLKW, wait4(), syslog(), any TCP or NFS operations. [For other operating systems you may have to include the system calls creat(), close(), getmsg(), putmsg(), msgrcv(), msgsnd(), recv(), send(), wait(), waitpid(), wait3(), tcdrain(), sigpause(), semop() to this list.] In the last two cases and assuming the program's signal handler returns, the system call returns -1 and sets errno to EINTR. If the SA_INTERRUPT flag is not set for the corresponding signal, however, in most cases the system call is automatically restarted (continued) after execution of the signal handler, and your program won't see any EINTR. You may ask why this is not the default behavior when the default Linux signal () is used to install the signal handler. This is because POSIX adopted this. As for which one is better, it is a matter of opinion. Note that in some versions of BSD Unix the default behavior is to restart system calls. To get system calls interrupted you have to use the SA_INTERRUPT flag. Fix: Either add -D__USE_BSD_SIGNAL to your CFLAGS. Or for every signal handler that you install with signal(), use sigaction() instead, without setting SA_INTERRUPT. Note that while this applies to most system calls, you must still check for EINTR on read(), write(), ioctl(), select(), pause(), connect(). You may do it like this: int result; while (len > 0) { result = read(fd,buffer,len); if (result < 0) break; buffer += result; len -= result; } --> int result; while (len > 0) { result = read(fd,buffer,len); if (result < 0) { if (errno != EINTR) break; } else { buffer += result; len -= result; } } and int result; result = ioctl(fd,cmd,addr); --> int result; do { result = ioctl(fd,cmd,addr); } while ((result == -1) && (errno == EINTR)); IX.B. OTHERS ~~~~~~~~~~~~ IX.25) I seem to be unable to compile anything with gcc. Why? ANSWER: If you have only 2 MB RAM, gcc will die silently without compiling anything. You must have at least 4 MB to do compilations BTW Since swapping is possible, I have heard that compilation works with only 2Meg and a lot disk traffic :) Isn't it great? IX.26) gcc complains about not finding crt0.o and the system include files What am I doing wrong ? ANSWER: The include files normal place is in /usr/include. lib*.a and *.o should be in /usr/lib or /usr/local/lib IX.27) I tried to port a /new/ version of gnu stuff. But in the linking phase, gcc complains about the missing libg.a. ANSWER: Yes this is well known for compiler version earlier than 2.2.2, throw away the flag -g that's all, anyway libg.a is /only/ for debugging purpose. IX.28) How to compile programs which may be debugged with gdb? ANSWER: There are different ways to handle this problem. If you have the gcc2.2.2 or later it's simple, use the -g flag. Otherwise there are different possibilities: 1) As there is no libg.a, you should throw away the -g flag in link phase, this means that the compilation must be done in two steps example: instead of "gcc -g monprog.c -o monprog", use the following "gcc -g -c monprog.c" and then "gcc -o monprog monprog.o" Alas this method is not that good if you are using Makefile. 2) The other way is to create an empty libg.a as follows (Peter MacDonald trick): - create libfake.c containing libgfake() {} - compile it with: gcc -c libfake.c - create the libg.a with: ar r libg.a libfake.o 2bis) The more tricky Humberto method: cd /usr/lib ranlib libg.a then gcc -g monprog.c -o monprog will produce a debuggable monprog IX.29) When compiling some code, cc1 complains about some insn code, what's that? ANSWER: An insn is an internal representation that gcc uses when compiling. The main part of gcc is to take ordinary c (or c++) code, and compile it, while ding optimizations in insn part, which is soft/hard independant. Then another part which is hard/Os dependant takes the insns and translate it in assembly language. The fix is only to turn off the optimization flag (-O). IX.30) When compiling #$@!, I've got some problems with "SIGBUS" signal that doesn't exist. Any clue ? ANSWER: (Louis J. LaBash, Jr.) SIGBUS is a common problem, its not needed, just comment it all out, something like: #ifdef SIGBUS .. normal sigbus code .. #endif IX.31) How can I write codes suitable for building shared library ? ANSWER: (Eric Youngdale, eric@tantalus.nrl.navy.mil, 3/1/93) In general there are very few restrictions as long as you are using the new tools for building sharable libraries. Before the DLL libraries were available there were all kinds of things you had to watch out for, but currently you can more or less build a sharable library out of the box without making any source code modifications. See the README in the tools-m-n.tar.z distribution for more information on how to build a sharable library. X. SCSI SPECIAL =============== *** This section is written by Drew Eckhardt, mail him for *** information, questions related to this section. *** Last update March 1993. X.01) What hardware is supported? ANSWER: The Adaptec 154x, Adaptec 174x, Future Domain 8xx (TMC 950 based boards?), 16x0, Seagate ST0x, Ultrastor 14F (Some of the new ALPHA code makes attempts to deal with the 34F), and Western Digital 7000 are supported. Various Adaptec clones from Bustek and Future Domain are known to work, in both ISA and EISA flavors. Some of the SCSI drivers will not autodetect your SCSI host if the BIOS is disabled, and there may be IRQ, DRQ, address restrictions compiled into the distribution kernel. Virtually all SCSI disks, CD ROMS, and tapes should work. X.02) What hardware is not supported? ANSWER: The Adaptec 152x, Always IN-2000, DTC, Mylex, and Ultrastor 24F, PS/2 SCSI boards, and all SCSI ports on sound boards. If you want to run Linux on this hardware, you'll have to get technical docs on it, and write a driver yourself or bribe someone to do it. X.03) How do I get SCSI information? ANSWER: Subscribe to the SCSI channel of the linux-activists mailing list. mail linux-activists@joker.cs.hut.fi And put in the header. X-MN-Admin: join SCSI X.04) Where is the latest version maintained? ANSWER: tsx-11.mit.edu:/pub/linux/ALPHA/scsi Please join the SCSI channel of linux-activists@joker.cs.hut.fi before you grab anything. eric@tantalus.nrl.navy.mil (Eric Youngdale) added scatter/gather support to the SCSI drivers, and changed around the internal structures to get something that works as "version 2" X.05) I've found one of the following bugs : - I can't swap to a SCSI disk, or mount one as / - I get a READ CAPACITY FAILED message on bootup. - I have a removeable disk (ie Sysquest) and have problems when I change media. - I have a Seagate / Future Domain TMC-88x and the kernel panics with a kernel paging message. - I have an Adaptec 1742 and am experiencing data corruption - I have an Insite floptical drive and it won't work. - I have a TANDBERG TDC 3600 revision U07, SONYCD-ROM CDU-541 revision 4.3d, DENON DRD-25X revision V, or a SEAGATE ST296 revision 921 and the system hangs or reports multiple devices. ANSWER: All of these bugs have been fixed, so UPGRADE. The first one was due to a race condition. The fourth was caused by a kernel stack overflow. The Adaptec problem was caused by a firmware bug in 1540 mode. The last two were caused by SCSI devices that weren't compliant. X.06) What do I do if I find a bug that still looks like a bug after I've read the FAQ? ANSWER: Your best bet is to send it to the SCSI channel of the mailing list, where it will be seen by all of the people who've contributed to the SCSI drivers. In your bug report, please provide as much information as possible regarding your hardware configuration, and all of the messages that Linux prints when it boots. Your chances of getting the bug fixed increase exponentially with the amount of information provided. The bottom line is that if we can't reproduce your bug, and you can't point at us what's broken, it won't get fixed. X.07) What SCSI disks are supported? ANSWER: Disks up to two terabytes in size will work, since the sd driver switches to 10 byte reads when necessary. Flopticals, Bernoulis, Sysquests, and other removeable media devices are supported by the normal SCSI disk driver. X.08) What about CD ROMS? ANSWER: CD ROMS are supported. The ISO-9660 file system with Rockridge extensions is supported. You will have to make sure that you have configured the kernel to include the isofs filesystem or otherwise you will not be able to use the cdrom. X.09) What about SCSI tapes ? ANSWER: Tapes are supported. You may wish to obtain the utility program mt, which is usually available from tsx-11.mit.edu in pub/linux/ALPHA/scsi. X.10) How do I partition the disk? ANSWER: Use fdisk, efdisk, pfdisk or the DOS parititioning program of your choice. X.11) The linux partitioning programs don't work. ANSWER: Some of these default to /dev/hd*, which are disks on WD-1003 compatable controllers (IDE, MFM, RLL, ESDI, etc), rather than /dev/sd* (SCSI disks). Your solutions are to 1. Call the partitioning program with a device name, ie pfdisk /dev/sda 2. Make links from /dev/hd* to /dev/sd*. X.12) My partitioning program can't figure out the disk geoemetry The problem with partitioning SCSI disks and Linux is that Linux talks directly to the SCSI interface. Each disk is viewed as the SCSI host sees it : N blocks, numbered from 0 to N-1, all error free. There is no portable way to get disk geometry. However, DOS doesn't like things like this, it demmands that BIOS present it with a normal Cylinder / Head / Sector coordinates. So, BIOS does, and it comes up with some fabrication that fits what DOS wants to see. You don't want to disagree with what BIOS thinks when you write the partition table. The newest SCSI code will return the mapped geometry for some host adapter / disk combinations. Kernel release 0.99 and later should have this capability. QUESTION : I can't make a filesystem on /dev/hd* ANSWER : /dev/hd* aren't your SCSI disks. /dev/sd* are. See below for approproate major / minor numbers if they do not exist on your root diskette. X.13) What are the major / minor numbers for SCSI drives? ANSWER: Because of the large number of devices that can be hung off of a SCSI bus (as many as 56 if you use SCSI fanouts or bridge boards), and the possibility of 16 partitions on a SCSI disk, we'd run out of minor numbers if they were statically allocated - so a dynamic numbering scheme is used. Block device major 8 is used for SCSI drives, 11 for CD-ROMs. Character device major 9 is used for SCSI tapes. Minors are assigned in increments of 16 to SCSI disks as they are found, scaning from host 0, ID 0 to host n, ID 7, excluding the host ID. Most hosts use ID 7 for themselves. A minor where minor mod 16 = 0 is the whole drive, where minor mod 16 is between 1 and 4, that partition, extended partitions dynamically assigned from 5 to 15 inclusive. Note that the gendisk.c module prints partition tables on initialization - you should be able to see them there. Example : I have three SCSI disks, set up as follows Seagate ST02, ID=0 Seagate ST02, ID = 5 Adaptec 1542, ID = 0 The first disk on the seagate at ID 0 will become minors 0-15 inclusive, the second at ID5 16-31 inclusive, the disk on the Adaptec 48-63. X.14) My tape drive or other removeable media device isn't recognized at boot time. ANSWER: Try booting with a tape in the drive. X.15) How do I reduce kernel bloat and eliminate the drivers I don't want? ANSWER: For kernel release 0.99 and later, just go to the to directory in the kernel source tree, and type ``make config'', and answer the questions. For older kernel distributions, simply #undef CONFIG_DISTRIBUTION in include/linux/config.h, and define the macros for the SCSI hosts you want enabled. X.16) I get SCSI timeouts. ANSWER: Make sure your board has interrupts enabled correctly. X.17) The * driver doesn't work. ANSWER: A source of difficulty is that you may be trying to run the bus too fast. Try turning off the turbo switch for your machine, or check the bus speed setting in your CMOS. X.18) The Seagate / Future Domain TMC-88x driver doesn't work. ANSWER: There are several possibilities 1) Is the board jumpered for IRQ5 ? The factory settings are for MSDOS, and have interrupts disabled. On the Seagate, Interrupts are controlled by the W3 (ST01) or JP3 (ST02) jumper. Shorting pins F-G selects IRQ5. 2) Cached machines will not have problems if the Seagate's address space (typically C8000 - CAFFFF) is not marked "non cacheable." This applies to the i486 internal cache as well as i386/i486 external caches. This can be set in the XCMOS of most machines. If you can't disable cache for the Seagate's area (16K in size, starting at the base address), then you must disable the cache entirely, otherwise it won't work. X.19) The Adaptec driver doesn't work. ANSWER: A common source of difficulty is a conflict between two different boards for an IRQ level, a DMA channel, or an I/O address. Check the settings for the boards you have in your system (music boards are known to use similar IRQ or I/O addresses as the Adaptec. In the new scsi code the Adaptec can use any of the IRQ levels that it can be strapped for, it can use I/O address 0x330 or 0x334, and it can use DMA channels 5, 6 or 7. X.20) When using a Seagate / Future Domain TMC-88x, why does my system hang when syncing to disk? ANSWER: The Seagate boards are an incredibly brain dead piece of hardware. They can only generate an interrupt when a target raises the SEL signal. So, as long as a target is connected, the Seagate driver must spin its wheels waiting for the actual data transfer. Some devices agravate the situation by connecting for long periods of time while not doing anything. X.21) My system is dog slow (ie, 60k/sec) ANSWER: SCSI commands have an incredible amount of overhead. For every command, you need to arbitrate for the bus, select the target, establish an I_T_L nexus, and send the command. Processing of that command may take as much as 1ms on older devices. Add this overhead to what you already have coming through the file system, buffer cache, etc, and you have a real problem. To work around this, we needed to maximize the amount of data that could be transfered in a single command. So, we implemented scatter-gather, which allows reads/writes from/to contiguous disk sectors to non-contiguous buffers. This typically gets you a 3-5 fold improvement in performance. The current kernel only has scatter-gather support for the Adaptec, Western Digital, and Future Domain 16xx boards. However, Alpha code that provides scatter / gather for the Seagate is available from headrest.woz.colorado.edu:/pub/linux/patches.seagate.Z, for the Ultrastor from tsx-11.mit.edu:/pub/linux/ALPHA/scsi/ultrastor.fast. XI. NETWORKING and LINUX ============================ *** This section should be maintained by Philip Copeland *** (p_copela@csd.uwe.ac.uk). XI.01) Where can I find useful information about networking for Linux ? ANSWER: Join the NET channel of the mailing list. Also, you need to read the NET-FAQ by Phil Copeland, it's on sunsite and tsx-11 and posted to c.o.l and the NET channel every couple of weeks. Basically, all of the information on networking and TCP/IP for Linux is in the NET-FAQ, because it's maintained seperately than this document (and we don't want to waste the space reprinting it all here--- it's big!). The NET-FAQ has been completely rewritten as of Feb 1993. Get the new version. XII. X11 THE MAXIMUM and MORE ============================= *** This section is maintained by Krishna Balasubramanian *** . Mail him if you have corrections, *** additions, etc. *** Last update: Sun, 21 Mar 93 17:14:00 -0500 XII.A. X386 GENERAL INFORMATION XII.B. HARDWARE REQUIREMENTS: Supported Video cards, mice. XII.C. LINUX DISTRIBUTION: Files required, Current version. XII.D. LEARNING/USING X: Pointers to X documentation. XII.E. DEBUGGING STARTUP PROBLEMS: Checklist, Screen restoration, Hanging. XII.F. XCONFIG: Video mode settings and common errors in Xconfig. XII.G. X-APPLICATIONS: Compiling X programs. XII.H. BUGS The X11 directories on linux systems are: XLIB = /usr/X386/lib/X11/ (or /usr/lib/X11/) XBIN = /usr/X386/bin/ (or /usr/bin/X11/) XDOC = XLIB/etc/ cwxi = the comp.windows.x.i386unix newsgroup Subscribe to this group if you are an xfree86 user. XII.A. X386 GENERAL INFORMATION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ XII.01) What is the X11 release supported by Linux? ANSWER: It's the X11R5 (xfree86-1.2). There are (currently separate) servers for 8514 and S3 chips. XII.02) What is X386/xfree86? ANSWER: X386 is the port of the X11 server to System V/386 that was done by Thomas Roell (roell@informatik.tu-muenchen.de). It supports a wide variety of VGA boards. X386 1.2 is included in MIT's X11R5 distribution. The Linux X386 port was based on the stock distribution from X11R5, from MIT and was done by Orest Zborowski (obz@sisd.kodak.com). It has since moved to becoming part of the standard xfree86 distribution. See the FAQ on cwxi for more information on xfree86. XII.03) Where can I get X386 1.2 (X11R5)? ANSWER: The X386 1.2 and xfree86 sources are available at any site that distributes the X11R5 source (too numerous to list here, but includes export.lcs.mit.edu) XII.04) Any tips on compiling X11R5? ANSWER: - Dont do it. - XFree86 is distributed with a link kit so you can optionally include what you like in the server. - Join the xfree86 beta team (how to? see cwxi FAQ) - Instructions are in the README file in XDOC/ and the cwxi FAQ. XII.B HARDWARE REQUIREMENTS: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Approx: at least 4 megs of ram + swap ...slooooww. 10 Meg disk for X. Another 6-10 meg of disk for GCC if you want to compile X11 programs. XII.05) What VGA boards are supported? ANSWER: et3000, et4000, gvga, pvga1a, wd890c00, tvga8900, ati ver. 5 or 6, 8514/A. (X386mono supports generic vga's and hercules). Diamond cards are not supported and will not be supported. If you are the unfortunate owner of such a card, you can probably get the server up by booting in specific modes or using dos to set your modes before warm booting into linux or using an external clock setting program. You will have to bear with these irks until you can convince diamond to alter their policy. Standard x11v1.1 or xfree86 server: ET3000 (for ex. GENOA 5300/5400) ET4000 (Tricom, STB PWR Graph, Sigma Legend, etc.) GVGA (Genoa 6400) PVGA1A (Paradise VGA Professional) WD90C00 (Paradise VGA 1024) supported by xfree86: TVGA TRIDENT 8900c, 9000, support is in xfree86 ATI ATI VGA WONDER XL and most ATI VGA WONDER PLUS cards (chip version 5 or 6). Courtesy Rik Faith (faith@cs.unc.edu) Those with 8514 compatible cards may want to get the X8514 server for speed (~2x xstones?). MONO Any vga card should be able to use X386mono server. (At least 640x480 with 800x600 virtual). Use the vga2 section of Xconfig. Support for hercules monochrome card (usable as 2nd display). The following servers will usually not handle all the options supported by xfree86. Read the documentation that comes with them carefully. They will be merged with the xfree86 distribution in some time. 8514 ATI graphics ULTRA, ATI graphics Vantage Should work with any VESA standard 8514/A register compatible card? Courtesy Kevin Martin (martin@cs.unc.edu). Scott Laird (lair@midway.uchicago.edu) writes: I uploaded a new version of the X8514 X Server to sunsite and tsx-11. It is in /pub/Linux/X11/X-servers/X8514/X8514scale.tar.Z on sunsite. It's linked with version 4.2 of the jumptable libraries, includes TCP/IP support, support for compressed bitmap fonts, Type 1 and Speedo scalable fonts. There's a README file in the same directory that will answer more questions. XS3 S3 chipset server (Jon Tombs jon@robots.ox.ac.uk) Get the FAQ on ftp.robots.ox.ac.uk (pub/linux/S3 check sunsite). Xega Generic 640x480x16 compatible server (originally for laptops). This requires a microsoft mouse at /dev/mouse for now and it does not use Xconfig so use environment variables to define the font path etc. in .xinitrc: export FONT_PATH=/usr/lib/X11/fonts/misc:/usr/lib/X11/fonts75dpi Works better with courier fonts so add to .Xresources: *Font: -*-courier-medium-r-*--10* ..or whatever.. A link kit is available at tsx-11 (you need gcc2.2.2). in pub/linux/ALPHA/Xega/X386.ega.T.Z (Obselete? Unusable? Anyone?) WARNING: Do not try to bring up an Xserver that does not support your hardware. There have been cases where damage has resulted from pushing the monitor (specially fixed frequency monitors) beyond its specs. XII.06) What Mouses are supported? ANSWER: Serial : Logitech, Microsoft, MouseSystems .... compatibles ... Busmouses : Logitech, microsoft, ATI_XL, PS/2 (aux). XII.07) Does anyone have a working PS/2 mouse? Has anyone gotten the "Mini-DIN" mouse on an HP Vectra 486/33T to work? The slight info I've been able to find says it's PS/2 compatible. ANSWER: First you need to create an entry in /dev for it: mknod /dev/psaux c 10 1 There is no direct PS/2 mouse support in XFree86-1.1, so to use the mouse with X you'll have to use the mconv mouse protocol conversion utility, which can be found on nic.funet.fi, in /pub/OS/Linux/utils/tools/mconv.c. This program converts the packets sent by the PS/2 mouse into the corresponding ones from a Microsoft mouse, so you can fool X telling it you have a Microsoft serial mouse instead. Instructions for use are included in the source file. (Johan Myreen jem@cs.hut.fi) XII.08) I have trouble with my logitech Pilot mouse and X under Linux, any clue ? ANSWER: (Thomas Roell?) There are TWO lines of Logitech mice out there. One is the programmable and uses MouseSystems protocol at startup. X386 reprogramms them to use another protocol. If you specify 'Logitech' in the Xconfig, X386 assumes a mouse like C7 or S9 (notC7-M). The second line is the MicroSoft compatible. Currently all newer Logitech mice follows this practice, like the MouseMan. In that case you have to say 'MicroSoft' or 'MouseMan'. From: jliddle@rs6000.cmp.ilstu.edu (Jean Liddle) I just purchased a new logitech mouseman, and yes, the new X-Windows (XFree86 as opposed to X386) requires that you use the "microsoft" mousetype. However, if you turn Third Button Emulation off, the middle button WILL work. XII.C. LINUX DISTRIBUTION ~~~~~~~~~~~~~~~~~~~~~~~~~ XII.09) What is the current version? ANSWER: The newest public Linux release is xfree86-1.2. It was compiled with gcc-2.3 (jump tables 4.3) and is available for example at tsx-11 in pub/linux/packages/X11/XFree86-1.2/. XII.10) What Files do I need to download? ANSWER: For xfree86: There is a README file in the distribution directory. Bring this down first and read it. Then get xbin, xman and xfonts. You need xprog and xlibman only if you plan to compile X applications. You need xkit if you want to relink the server. **** You need The shared images libc.so.4 (4.3 or later) and libm.so.4 (4.0) in /lib/. All the X11 binaries use these. These are available with the GCC distribution or any new rootdisk. To compile programs you should get gcc-2.3 or later and the 4.3 libraries. To get a different server, see the notes in the previous section. X11 directories in the archive sites are: tsx-11 : pub/linux/packages/X11, pub/linux/usr.bin.X11 sunsite : pub/Linux/X11/ pub/Linux/Incoming/DLL? XII.11) Where do the X11 files go? What are they? ANSWER: The linux X binary distribution looks something like: /usr/X386/ lib/ libX11.a ... (X libraries needed for compiling stuff). X11/ config/ (template files for compiling ... xmkmf) fonts/ misc/ , 75dpi/ .... etc/ (documentation). bin/ (X386, X386mono, xterm, X linked to X386). include/X11/ (include files needed for compiling). bitmaps/ (icons, bitmaps used by some applications). man/ man1/, man3/, cat1/, cat3/ /lib libX??.so.?? (Shared images needed by all X11 binaries). Its best you do a tar -tvzf on the distribution you get or find some means of extracting the distribution file list. The support files include default/example Xconfig, xinitrc, twmrc which you could copy to your HOME directory (as Xconfig, .xinitrc and .twmrc) and edit them to define your hardware and X11 setup. The directory XLIB/etc/ contains much documentation on how to configure video modes. Read the files XDOC/README and XDOC/README.Linux. XII.D. LEARNING/USING X ~~~~~~~~~~~~~~~~~~~~~~~~ XII.12) Where can I find the basic help for learning/using X ? ANSWER: Try man X386; man Xserver; man xterm; man twm; man xinit on any machine with X11. The man pages on xterm and twm will reflect behaviour on Linux systems quite accurately. The others will give you some bearing though not every option will work. These man pages are part of the xfree86 distribution. XII.13) What docs are available besides man pages? ANSWER: The FAQ in comp.windows.x is extensive and has a bibliography. There is also the Xt-FAQ. Both are available from export.lcs.mit.edu in pub/contrib/. There is a collection of (mit) X11 documents on tsx-11 (pub/linux/doc/xdoc.tar.Z ?) or export (pub/R5-Untarred) if you are interested in internals. XII.14) How do I start up X? ANSWER: Type 'startx' at the shell prompt. Before doing this you should: 0) Untar the xfree86 distribution from / (read XDOC/README, XDOC/README.Linux). 1) copy the file Xconfig.sample from the XLIB/ directory to your HOME directory (/usr/root/Xconfig?) or to XLIB/Xconfig. 2) Edit Xconfig and set the video data for your card and monitor. Use the clocks appropriate for your card and the modes appropriate for your monitor for those clock values. To determine what values are appropriate the Xconfig section below and the files in XDOC/. 3) Set the mouse device in Xconfig correctly....Use the busmouse entry for Logitech only. For other busmouses use microsoft (try all :-). 4) Ensure that there is a termcap entry for xterm in /etc/termcap (One is available in the subdir /doc/). 5) Ensure that the X11 binaries are in the path example: add the line PATH=${PATH}:/usr/X386/bin to ~/.profile or look at bash.ad in /doc/. WARNING: NONE of the modes (in the Modes line in Xconfig) should use a clock your monitor cannot handle. Now type startx. XII.15) How do I configure X .. colors, menu, keyboard? ANSWER: makes me ... dizzy ... server : video, keyboard Xconfig : man X386, man Xserver, XDOC/VideoModes.doc man X386keybd, man xset, man xmodmap. resources: global and application preferences. XLIB/xinit/.Xresources or ~/.Xresources : man xrdb? twm : menus, title bars, colors .. look and feel. ~/.twmrc or XLIB/twm/system.twmrc : man twm xinit : startup. ~/.xinitrc or XLIB/xinit/xinitrc -- man xinit applications : XLIB/app-defaults/Xxx (also ~/.Xresources) man xxx You can start with files from any X11 setup. Backup the files you change. See the FAQ on comp.windows.x. XII.16) [suggested by Thomas Koenig] How do I support national keyboards in X11 ? ANSWER: Put a .Xmodmap file into the user's home directory specifying which keys to use for what; or else replace the /usr/lib/X11/xinit/.Xmodmap with the national keyboard keys customized. Do man xmodmap for more details. enclosed an excerpt of mine (french keyboard): keycode 8 = keycode 9 = Escape keycode 10 = ampersand 1 keycode 11 = eacute 2 asciitilde keycode 12 = quotedbl 3 numbersign keycode 13 = apostrophe 4 braceleft keycode 14 = parenleft 5 bracketleft keycode 15 = minus 6 bar keycode 16 = egrave 7 grave keycode 17 = underscore 8 backslash keycode 18 = ccedilla 9 asciicircum keycode 19 = agrave 0 at keycode 20 = parenright degree bracketright keycode 21 = equal plus braceright keycode 22 = BackSpace keycode 23 = Tab keycode 24 = A ........ XII.E. DEBUGGING STARTUP PROBLEMS: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ XII.17) I cannot type in my xterm ANSWER: /dev/console must have major=4, minor=0 rm -f /dev/console; ln /dev/console /dev/tty0 XII.18) What are some of the common omissions and errors? ANSWER: (Peter) 1) Add /usr/X386/bin/ (or /usr/bin/X11) to your path. 2) Add the xterm termcap entry to /etc/termcap. 3) ln -s X386 X in the XBIN directory. ln -s X386mono X (if you want to use the mono server). 4) Run X as root first. This avoids some trivial problems. 5) If you change the font path entry .... X386 is finicky about the syntax. 6) Make sure your mouse entry in Xconfig points to a legitimate serial device (or busmouse)... usually something like: microsoft "/dev/ttyS1" serial devices have major # 4 minor 64,65 ... busmouses are major 10. ls -l in /dev will show you the major and minor entries. 7) Need read/write/exec access to /tmp directory 8) Use startx 2> x.err to log your error messages. If the server sticks and you have to reboot you'll probably loose this stuff... see notes on `hanging' below. 9) You must have a free vt (eg. /dev/tty5 with no getty (see /etc/rc)). 10) Delete /tmp/.Xn-lock if recovering from a crash. 11) Note the new probeonly option for the server (man X386): startx -- -pn -probeonly 12) See Xconfig problems and the device list below. XII.19) Why is the server unable to find some of the fonts? ANSWER: First check that the directories listed in the font path exist and have font files in them. Some of the servers are not set up to use compressed fonts. In such cases you have to uncompress the fonts in the directory and run `mkfontdir .`. Read the man page on mkfontdir. XII.20) My server "hangs" Why? ANSWER: (Peter) Quite often it isn't a hang. If the server grabs the screen(and enters graphics mode) and then dies, it may return you to bash *without* restoring the screen. In other words, just because you see no output, don't assume it's running/hanging. The way to test this is to see if you can use a bash command to spin your disk. eg.: sync; ls -l /bin. Also - I *suspect* that (at least for me), you can kill the server if you include the servernum option in the Xconfig (Obselete?) You can kill the server when you want to by typing ctrl-alt-backspace. Then a couple of ctrl-C 's in case your stuck in xinit. The two line message X386 version ..... (protocol Version .... is returned from the X386 programme itself, so if you get this (or if the screen blanks) X must be starting. XII.21) When I started X11 I got "Cannot connect to server" or "process does not exist", any clue ? ANSWER: The cause might be wrong fontpath variable setup in your Xconfig; uncomment and set the correct fontpath variable. XII.22) Why cant I run more than 4 xterms? How can I have more than 4 pty's ? ANSWER: set the number in the header include/linux/tty.h and recompile the kernel. Also make nodes : mknod /dev/ptypxx 4 minor (where minor = 128 + xx) mknod /dev/ttypxx 4 minor (minor = 192 + xx) This is for before linux-0.97pl6.... for later versions you only need to make the nodes. XII.23) How does X11 start up? ANSWER: The startup involves the server (XBIN/X), and some programs like startx and xinit. Typing startx runs the script XBIN/startx. Look through startx. For explanation of the server arguments try man Xserver. startx does little other than gather arguments and then call xinit. xinit runs the server X (X is linked to X386) and the client programs specified in ~/.xinitrc. xinit continues to run, and is often the source of the error messages you see when you exit. If you get the message "giving up", it means X has died (quite probably it died immediately) and xinit has been unable to start clients from the xinitrc script. (The scripts must be executable). XII.24) How can I see what startx passes to xinit, and xinit to X? ANSWER: Add the line: set -x near the top of startx. To see what xinit passes to X, try: (Peter) rm XBIN/X - yes, if you have set it up correctly, X should only be a link so it's safe to remove it. then create a shell script XBIN/X containing: #/bin/sh echo $* and run startx. You should see something like: X :0 which is all xinit passes to X. If you don't see the :0, you may not have your DISPLAY=":0" set correctly. THEN RESTORE X!! : cd XBIN; rm X; ln -s X386 X XII.25) What devices does X depend on: ANSWER: check your device numbers with ls -l /dev. You should have: 5 0 tty 4 0 tty0 4 0 console 4 1 tty1 (etc) virtual consoles (vt's) : eg. startx -- vt8 1 1 mem 4 128 ptyp0 pseudo ttys used by xterm/emacs etc 4 129 ptyp1 (etc) to talk to unix programs. 4 192 ttyp0 4 193 ttyp1 (etc) 4 64 ttyS1 one of these is the mouse 4 65 ttyS2 or you have a busmouse. 10 x mouse busmouse x = 0 => logitech 1 => ps/2 (aux) 2 => microsoft 3 => ATI_XL. /tmp/.X11-unix/Xn n = display number. Socket used by X11 programs to talk to the server. This is created by X386. /tmp/.Xn-lock n = display number. Lock file. Note that unix programs dont expect standard names for serial devices and mice. So you can give these devices any name as long as you tell the server what its called (in Xconfig). XII.F. Xconfig: Xconfig and Video mode settings. ~~~~~~~~~~~~~~~ XII.26) What do the mode names in Xconfig mean? ANSWER: Mode names like "640x480" are used to match entries in the modes line with the modeDB entry which actually defines the mode. You can toggle between modes in the modes line with ctrl-alt-numericplus. If you're experimenting with 640x480 you can define modes "640x480a" "641x480b" "642x480c" with different entries for each under ModeDB so you can toggle between these three modes. XII.27) How do I compute the numbers for the video modes? ANSWER: See if there is an entry that matches your chip/monitor in XDOC/modeDB.txt. Use the clock entries for your chip and the mode entry for that clock appropriate for your monitor. If you cant find a mode entry for a particular clock 'needed_clock' but can find a mode entry (for your monitor) for a nearby clock value 'found_clock', scale all numbers in the modeDB entry by (needed_clock/found_clock). Read XDOC/VideoModes.doc XII.28) How can I determine the clocks on the video chip? Where can I find clock.exe or clock.pas ? ANSWER: The XFREE Team discourages the use of clocks.exe and wants it to be removed from all docs, since the new Server is better at guessing the clocks than clocks.exe. You can get X to tell you what it finds by commenting the clocks entry in Xconfig. Use 'startx -- -probeonly 2> x.err' to log the output. If X starts up this file gets the clocks only after you exit. I strongly advise using the 'modegen' spreadsheets to generate the appropriate settings. If I remember correctly you can find them in 'pub/linux/packages/SLS/x4' called modegen.taz or something equally as obvious ... Good luck. (Andy asb@cs.nott.ac.uk) The clocks entry in Xconfig serves as an index. example: clocks 1 2 ModeDB 1 640x480 ..... 2 800x600 ..... means the first clock on the chip will be used for the 640x480 mode and so on. Usually one uses the MHz value for the clock for convenience instead of 1 2 you probably have 25 28 ... etc. XII.29) What are the settings used with a trident-8900C? ANSWER: To get X/SLS/Linux working with a trident-8900C : 1) From Frank Houston fh8n@uvacs.cs.Virginia.EDU vga256 Virtual 1024 768 ViewPort 0 0 Modes "1024x768" "800x600" "640x480" Use the VESA monitor timings from the modeDB in the example Xconfig. You do not need to specify the chipset or clocks. 2) From: Henk Vandecasteele henkv@cs.kuleuven.ac.be TRIDENT TVGA 8900C card with BIOS C2.11, A cheap color monitor AOC (CM-335) with a maximum horizontal frequence of 39.5 vga256 Virtual 1024 1024 ViewPort 0 0 Modes "912x684" "800x600" "640x480" # This mode drives my monitor to the limit (VESA timings for the rest). "912x684" 45 912 944 1104 1136 684 684 690 712 XII.30) Oh what, Oh what, Oh what can I do with a trident 8900b? ANSWER: (drew@cs.colorado.edu) 1. While the 8900b works with the Xfree 8900c driver, you must specify a chipset line for the 8900c in your Xconfig. 2. The tridents are miserably slow in a Color mode. If you don't mind black and white, you should use X386mono. Not only is it faster, but it requires less video memory, and you'll be able to run a 1k X 1k virtual desktop. Again, you must specify the Chipset line to use the banked mono server for virtual resolutions > ~800x600. XII.31) What are common problems with Xconfig? ANSWER: If X isn't firing at all, or even if it clears the screen and crashes (see below) you almost certainly have a fault in Xconfig. 1. Note that the server X interprets Xconfig. (not xinit) 2. If you have a fault in Xconfig it is possible to crash or hang the server without getting an error message. (older versions?) 3. leave the two paths at the top of Xconfig commented out when testing. 4. test with only one graphics mode included - one you are most sure of. 5. If you make a mistake in the mouse section, you will (I understand) get an error message, so if you don't get some mouse error, try elsewhere first. (eg "No such file or directory" indicates you have a fault in the "/dev/ttyxx" line, or /dev/ttyxx doesn't exist. 6. *NB* X looks in your home directory first to find an Xconfig. make certain it's using the one you've been working on! 7. you need double quotes (") around your chipset and modes: eg chipset "et4000" Modes "640x480" "640x480a" "800x600" and around the /dev/ttyxx eg.: microsoft "/dev/ttys1" 8. Check your VGA section and modeDB first. 9. ensure ModeDB clock speeds match the VGA section. Comment out any unused lines in MODEDB. eg clocks 25 36 00 00 00 00 00 00 then you *must* have (and only have) lines under modeDB corresponding to speeds 25 and 36. If you have one with (say) 62 uncommented out in the modeDB section in place of the 36 line, you will cause the server to die immediately with no error message. 10. a syntax error (such as an unrecognised word) in Xconfig will cause a death with no warning. (Obselete?) 11. videoram must equal the amount of display ram on your chip. 12. The virtual resolution screen must fit in the videoram. eg: 512kB => 800x600 (for the 1 byte per pixel color server) XII.32) What do I use in my Xconfig file to use the bus mouse? Logitech doesn't work with my Logitech busmouse. ANSWER: (Nathan I. Laredo) Here are the mouse lines from my Xconfig: BusMouse "/dev/mouse" You may add a sample rate if you want, but chances are, unless the model number on your mouse matches mine: PC-93-9MD it probably will cause your machine to lock up, as I've gotten several reports saying that. According to the X386 documentation, non-logitech mice do not support a sample rate. XII.33) Where can I get Xconfig-files for various hardware? ANSWER: If you have access to e-mail, e-mail bcr@physics.purdue.edu a message with the subject: help If you do create a new Xconfig file or improve on an old one please mail it to bcr@physics.purdue.edu to save others from having to duplicate your work. XII.G X-APPLICATIONS: Compiling X Programs. ~~~~~~~~~~~~~~~~~~~~~ XII.34) Does anyone know where I can find the libobz.a library ? ANSWER: This library contained the socket stuff, when X386 V0.1 was released. Meanwhile it has found it's way into the kernel, so remove -lobz from the link step in the Makefile. Any program asking for libobz needs to be recompiled anyway. XII.35) I get _setjmp undefined when linking xv from .a files. ANSWER: You are trying to link a program compiled with gcc-2.2.2 and setjmp has changed sice then. Recompile xv from the source using the latest gcc. XII.36) How do I compile an X application that has an Imakefile? ANSWER: Type xmkmf to generate the Makefile. Type make. XII.37) How do I compile a program that has no Imakefile? ANSWER: Use compiler options generated with programs that do have Imakefiles. Look in XLIB/config/ for the linux definitions. In particular you need -fwritable-strings. XII.38) gcc complains the X libraries are not found or links static. ANSWER: Check out the -nojump -static options of GCC ... read the GCC FAQ. You can tell gcc what directories to search with -L. XII.39) When using Makefiles generated by xmkmf why do I get many error messages? ANSWER: The old xmkmf under Linux doesn't like # comments in Imakefiles. Therefore you must change the #'s to XCOMM. But be careful. Don't change any pre-compiler directives. (mal11@po.CWRU.Edu Matthew A. Lewis) XII.H BUGS: ~~~~~~~~~~~ Restoration of the text screen fails on some hardware. You can get the program runx from the vgalib distribution (tsx-11 pub/linux/sources/libs/). Report the problem to the xfree86 team. Cant compile Xaw programs without -static in versions x11v1.1 or older. Color problems with Xega .... fixed in latest version on tsx-11 (Old). from chuck@coplex.com (Chuck Sites) (Old?) It is possible to run X386 on a Paradise VGA Plus. The X386.0 doc file has a small misprint. The Chipset is not pvga. It's pvga1. Anyway, under the line in /usr/X386/lib/X11/Xconfig VGA256, add, `chipset "pvga1"`. You will need a 512k board. There seems to be a problem with 800x600 mode that causes pixels to be misplaced in the center 1/3 of the screen. 640x480 works fine. Anybody out there might have a fix for that? You may want to use X386mono with 800x600 instead Fix for missing numlock control in xfree86-1.1. use xmodmap to change the mapping: clear mod1 add mod1 = Alt_L keysym Alt_R = Mode_switch add mod5 = Mode_switch David (Dawes) Sources for X11_FAQ: Steve Kotsopoulos, Peter Hawkins, John Morris, MM. Corsini, K. Balasubramanian. Direct comments, questions, complaints to krishna at: balasub@cis.ohio-state.edu XIII. EMACS for LINUX ===================== *** This section is maintained by Rick Sladkey (jrs@world.std.com) *** Last Update March 1993. XIII.A. GENERAL INFORMATION XIII.B. GNU EMACS for LINUX XIII.A. GENERAL INFORMATION ~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is a short list of Frequently Asked Questions about GNU Emacs under Linux. It does not address general questions about Emacs which are not Linux specific. For general help about Emacs, 1) learn to use and read the online documentation, 2) read the real Emacs FAQ found in emacs/etc/FAQ, and 3) read the newsgroup gnu.emacs.help. Rick Sladkey XIII.B. GNU EMACS for LINUX ~~~~~~~~~~~~~~~~~~~~~~~~~~~ XIII.01) What version of the compiler was used? Which shared libaries? ANSWER: This describes version of GNU Emacs 18.59 for Linux 0.99.5 and above compiled with GCC 2.2.3 using the libc.so.4.3 and libX11.so.3.0 shared libraries. XIII.02) Which files do I need? ANSWER: emacs-18.59b.tar.Z this file, sample default.el and diffs for this version, the eight-bit patch, iso-latin-1.el and eight-bit.el emacs-etc-18.59b.tar.Z emacs support programs and misc info emacs-bin-18.59b.tar.Z shared emacs binary and its doc file x11emacs-bin-18.59b.tar.Z shared x11emacs binary and its doc file XIII.03) How do I install them? ANSWER: For the latter three files, just cd to /usr and untar them. XIII.04) What if I want to compile Emacs myself? ANSWER: It is fairly easy (and highly recommended) to compile Emacs yourself if you have the the disk space. In this case you only need the standard Emacs distribution (emacs-18.59.tar.Z from any GNU archive) and the Linux diffs and support files (emacs-18.59b.tar.Z from a Linux archive). The diffs are quite small and mostly amount to a configuration file. XIII.05) What about Epoch or Lucid Emacs? Are these available for Linux? ANSWER: Yes. Thomas Dunbar has been maintaining Epoch for Linux and Chipsy Sperber has compiled Lucid Emacs. Both of these work well under Linux. Look in a Linux archive index for where to find them. XIII.06) Does Linux Emacs support eight-bit input/output? ANSWER: Yes. It is new with this version. It uses the so-called "ctl-arrow" patch. See the file README.8bit for more information. XIII.07) How much disk space is required? ANSWER: Anywhere from 1 to 15 Meg. Emacs works reasonably well with no support files at all. With a judicious selection from lisp/*.elc and etc/*, quite a lot can be done using only 2 Meg. If you want all of lisp/*.elc, info/*, and etc/* this will require 4 to 6 Meg. If you unpack the whole source you need 8 Meg. If you collect info files like rare coins and install a lot of big lisp packages then Emacs may need its own partition. :-) XIII.08) Why can't Emacs find its support files anymore? ANSWER: This is because older versions of Emacs were compiled with "/usr/local/emacs" based paths. The current version is compiled with "/usr/emacs" paths. If you have a previous installation, just "mv /usr/local/emacs /usr" and you're done. If you can't bear to part with the "/usr/local" pathnames because of inertia then do "ln -s /usr/local/emacs /usr" and you can have them both. XIII.09) How do I get Emacs to recognize my cursor keys? ANSWER: Simple. Don't use them. :-) Seriously, there are as many ways to do this are there are elisp hackers but the preferred way is to follow the pattern set by the other terminal definition files in emacs/lisp/term/*.el. For just arrow keys you can just copy vt220.el to console.el and that's it. For function keys and the others see the sample default.el included with emacs-18.59b.tar.Z. XIII.10) What packages are particularly useful under Linux? ANSWER: Because info format is the documentation standard of the GNU project and just about everything except the kernel comes from FSF, you will find that Dave Gillespie's enhanced info package is very useful. It allows multiple info directories, space bar paging, and supports compressed info files. Please learn to use info. Imagine Unix life without man. Others that I highly recommend are Sebastian Kremer's enhanced dired directory editor, Dave Gillespie's calc calculator, Masanobu UMEDA's gnus for usenet news, and Kyle Jone's vm for mail. All can be found in the OSU Emacs archive, ftp.cis.ohio-state.edu, /pub/gnu/emacs/elisp-archive. See the real FAQ for more details. XIII.11) Does Linux Emacs use the shared libraries? ANSWER: Yes. It works fine with the DLL libraries and should not require a new binary when the C or X libraries are updated. XIII.12) Does Linux Emacs support the X Window System? ANSWER: Yes. However, there are two binaries. One without X support (about 485k) and one with X support (about 515k). XIII.13) Do I need both Emacs if I don't always use X? ANSWER: No. The X11 version works equally well inside or outside of X. If you get the message "Check your DISPLAY variable" it means that you have defined DISPLAY in your ~/.profile (or whatever). You can fix this by starting Emacs with 'emacs -nw' or by removing the DISPLAY variable from your ~/.profile and putting it in you ~/.xinitrc. XIII.14) Why doesn't Emacs use the settings in my .Xdefaults/.Xresources file? ANSWER: You are probably using the word "emacs" and your X version of emacs is called x11emacs. Either use the word "Emacs" in your resource file or rename x11emacs to emacs. See above question on why this is reasonable. XIII.15) I read about some menu that is supposed to pop up when I press some mouse button. Does this work with Linux Emacs? ANSWER: Yes. This requires XMenu support to be compiled in. Former versions did not support it because it did not work correctly. XIII.16) Sometimes Emacs crashes with a SIGALRM message. What's wrong? ANSWER: The old answer about upgrading to a newer version of bash was incorrect. The problem was in the implementation of sleep(3) in the old C library. It is fixed as of libc-4.3. ===================8<==========>8================ -- Send submissions for comp.os.linux.announce to: linux-announce@tc.cornell.edu