8.1 How To Program XYZ Under Linux
Read the manuals, or a good book on Unix and the manual pages (type man man). There is a lot of GNU Info documentation, which is often more useful as a tutorial. Run Emacs and type F1-i, or type info info if you don't have or don't like Emacs. Note that the Emacs libc node may not exactly describe the latest Linux libc, or GNU glibc2. But the GNU project and LDP are always looking for volunteers to upgrade their library documentation.
Anyway, between the existing Texinfo documentation, and the manual pages in sections 2 and 3, should provide enough information to get started.
As with all free software, the best tutorial is the source code itself.
The latest release of the Linux manual pages, a collection of useful GNU Info documentation, and various other information related to programming Linux, can be found on metalab.unc.edu/pub/Linux/docs/man-pages/.
8.2 What's All This about ELF? glibc?
See the ELF HOWTO by Daniel Barlow. Note that this is not the file move-to-elf, which is a blow-by-blow account of how to upgrade to ELF manually.
Linux has two different formats for executables, object files, and object code libraries, known as, "ELF." (The old format is called "a.out.") They have advantages, including better support for shared libraries and dynamic linking.
Both a.out and ELF binaries can coexist on a system. However, they use different shared C libraries, both of which have to be installed.
If you want to find out whether your system can run ELF binaries, look in /lib for a file named, "libc.so.5." If it's there, you probably have ELF libraries. If you want to know whether your installation actually is ELF you can pick a representative program, like ls, and run file on it:
-chiark:~> file /bin/ls /bin/ls: Linux/i386 impure executable (OMAGIC) - stripped valour:~> file /bin/ls /bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1, stripped
There is a patch to get 1.2.x to compile using the ELF compilers, and produce ELF core dumps, at ftp://tsx-11.mit.edu/pub/packages/GCC/. You do not need the patch merely to run ELF binaries. 1.3.x and later do not need the patch at all.
The GNU glibc2 libraries are essentially more recent versions of ELF libraries that follow most of the same processes for dynamic linking and loading. Upgrade information is contained in ("How To Upgrade the Libraries without Trashing the System.")
8.3 How To Determine What Packages Are Installed on a System
For distributions that use RPM format packages, use the command:
$ rpm -qa
You need to be logged in as root. You can save the output to a text file for future reference, a command like:
$ rpm -qa >installed-packages
For Debian systems, the equivalent command is:
$ dpkg -l
8.4 What Is a .gz File? And a .tgz? And .bz2? And... ?
gz (and .z) files are compressed using GNU gzip. You need to use gunzip (which is a symlink to the gzip command that comes with most Linux installations) to unpack the file.
taz, .tar.Z, and .tz are tar files (made with tar) and compressed using compress. The standard *nix compress is proprietary software, but free equivalents like ncompress exist.
tgz (or .tpz) is a tar file compressed with gzip.
bz2 is a file compressed by the more recently introduced (and efficient) bzip2.
lsm is a Linux Software Map entry, in the form of a short text file. Details about the LSM project and the LSM itself are available in the subdirectory on ftp://metalab.unc.edu/pub/Linux/docs/.
deb is a Debian Binary Package--the binary package format used by the Debian GNU/Linux distribution. It is manipulated using dpkg and dpkg-deb (available on Debian systems and from ftp://ftp.debian.org//).
rpm is a Red Hat RPM package, which is used in the Red Hat and similar distributions.
sit is a compressed Macintosh archive made with StuffIt, a commercial program. Aladdin Systems Inc., the manufacturer of StuffIt, has a free expander utility that will uncompress these archives. You can download it at http://www.aladdinsys.com/expander/.
The file command can often tell you what a file is.
If you find that gzip complains when you try to uncompress a file, you probably downloaded it in ASCII mode by mistake. You must download most things in binary mode: "get," to download the file.
8.5 What Does VFS Stand For?
Virtual File System. It's the abstraction layer between the user and real file systems like ext2, Minix and MS-DOS. Among other things, its job is to flush the read buffer when it detects a disk change on the floppy disk drive.
VFS: Disk change detected on device 2/0
8.6 What is a BogoMip?
"BogoMips" is a combination of Bogus and Mips. MIPS stands for (depending on who you ask) Millions of Instructions per Second, or Meaningless Indication of Processor Speed.
The number printed at boot time is the result of a kernel timing calibration, used for very short delay loops by some device drivers.
According to the BogoMips mini-HOWTO, the rating for your machine will be:
Common BogoMips Ratings Processor BogoMips Comparison Intel 8088 clock * 0.004 0.02 Intel/AMD 386SX clock * 0.14 0.8 Intel/AMD 386DX clock * 0.18 1 (definition) Motorola 68030 clock * 0.25 1.4 Cyrix/IBM 486 clock * 0.34 1.8 Intel Pentium clock * 0.40 2.2 Intel 486 clock * 0.50 2.8 AMD 5x86 clock * 0.50 2.8 Mips R4000/R4400 clock * 0.50 2.8 Nexgen Nx586 clock * 0.75 4.2 PowerPC 601 clock * 0.84 4.7 Alpha 21064/21064A clock * 0.99 5.5 Alpha 21066/21066A clock * 0.99 5.5 Alpha 21164/21164A clock * 0.99 5.5 Intel Pentium Pro clock * 0.99 5.5 Cyrix 5x86/6x86 clock * 1.00 5.6 Intel Pentium II/III clock * 1.00 5.6 Intel Celeron clock * 1.00 5.6 Mips R4600 clock * 1.00 5.6 Alpha 21264 clock * 1.99 11.1 AMD K5/K6/K6-2/K6-III clock * 2.00 11.1 UltraSparc II clock * 2.00 11.1 Pentium MMX clock * 2.00 11.1 PowerPC 604/604e/750 clock * 2.00 11.1 Motorola 68060 clock * 2.01 11.2 Motorola 68040 Not enough data (yet). AMD Athlon Not enough data (yet). IBM S390 Not enough data (yet).
If the number is wildly lower, you may have the Turbo button or CPU speed set incorrectly, or have some kind of caching problem (as described in ("When Adding More Memory, the System Slows to a Crawl.")
For values people have seen with other, rarer, chips, or to calculate
your own BogoMips rating, please refer to the BogoMips Mini-HOWTO, on
ftp://metalab.unc.edu/. ("Where Is the Documentation?")
[Wim van Dorst]
8.7 What Online/Free Periodicals Exist for Linux?
There are a number of recent additions to the list of periodicals devoted to Linux and free software:
* geek news. http://geeknews.cjb.net/. Headlines for articles about Linux, like the comp.os.linux.announce and Techweb postings, and general interest, like Associated Press stories.
* Linux Gazette. http://www.linuxgazette.com/. This is the longest-running of the on-line periodicals, and the only one that publishes source code.
* Linux Today. http://www.linuxtoday.com. News and opinion related to the Linux community, updated daily.
* Linux Weekly News. http://lwn.net. News about the Linux community, updated weekly.
* Slashdot. http://www.slashdot.org. News about the free software community and culture.
* Freshmeat. http://www.freshmeat.net/. Notices of new and updated software for Linux and other free OS's.
Please send additions to this list to the FAQ maintainer.
[Jim Dennis, Robert Kiesling]
8.8 How Many People Use Linux?
Linux is freely available, and no one is required to register with any central authority, so it is difficult to know. Several businesses survive solely on selling and supporting Linux. Linux news groups are some of the most heavily read on Usenet. Accurate numbers are hard to come by, but the number is almost certainly in the millions.
However, people can register as Linux users at the Linux Counter project, which has been in existence since 1993. In August, 1998, the project counted more than 70,000 users.
Visit the Web site at http://counter.li.org/ and fill in the registration form. If you don't want to use the Web, send E-mail to counter@counter.li.org with the subject line, "I use Linux at home," or "I use Linux at work."
The current count is posted monthly to comp.os.linux.misc, and is
always available from the Web site.
[Harald Tveit Alvestrand]
8.9 How Many People Use Linux? (Redux.)
In 1999, International Data Corporation released its first commercial forecast of Linux sales. The report quantifies Linux vendor sales in 1996, 1997, and 1998, and forecasts through the year 2003.
To obtain the report, contact IDC at ctoffel@idc.com. Their Web site is http://www.itresearch.com/.
8.10 What Is the Best (Distribution|SCSI Card|Editor|CD-ROM Drive|....)
The "best" of anything depends on your particular needs. Discussions like these frequently occur on Usenet. Most often they're flame bait. Answering is generally a waste of time. Free software licensing is unrestrictive enough, that, with a little experience, you can perform your own testing on your own hosts.
A better way to phrase a specific inquiry might be: "Where can I find...."
8.11 How Does One Pronounce Linux?
This question produces an outrageous amount of heated debate.
If you want to hear Linus himself say how he pronounces it, download english.au or swedish.au from ftp.funet.fi/pub/Linux/PEOPLE/Linus/SillySounds/. If you have a sound card or the PC-speaker audio driver you can hear them by typing
$ cat english.au >/dev/audio
The difference isn't in the pronunciation of Linux but in the language Linus uses to say, "hello."
For the benefit of those who don't have the equipment or inclination: Linus pronounces Linux approximately as Leenus, where the "ee" is pronounced as in "feet," but rather shorter, and the "u" is like a much shorter version of the French "eu" sound in "peur" (pronouncing it as the "u" in "put" is probably passable).
9.1 Modprobe Can't Locate Module, XXX, and Similar Messages
These types of messages mostly occur at boot time or shutdown. If modprobe, insmod, or rmmod complain about not being able to find a module, add the following to the /etc/modules.conf or /etc/modutils/aliases file, whichever is present on your system.
$ aliasoff
And use the name of the module that appears in the error message. [J.H.M. Dassen]
9.2 Unknown Terminal Type "linux" and Similar
In early kernels the default console terminal type has changed from "console" to "linux." You must edit /etc/termcap to change the line reading:
console|con80x25:\ to linux|console|con80x25:\
(there may be an additional "dumb" in there--if so it should be removed.)
To get the editor to work you may need type:
$ TERM=console
(for bash and ksh), or
$ setenv TERM console
for csh or tcsh.
Some programs use /usr/lib/terminfo instead of /etc/termcap. For these programs you should upgrade your terminfo package, which is part of ncurses.
The same is true for X terminal displays. If your distribution sets the TERM to something strange like xterm-24-color, you can simply reset it to a generic value from the command line:
$ TERM="xterm"; export TERM
9.3 INET: Warning: old style ioctl... called!
You are trying to use the old network configuration utilities. The new ones can be found on ftp.linux.org.uk/pub/linux/Networking/PROGRAMS/NetTools/ (source only, I'm afraid).
Note that they cannot be used just like the old-style programs. See the NET-2 HOWTO for instructions on how to set up the old-style networking programs correctly. Even better, see the NET-3 HOWTO and upgrade your networking software.
9.4 ld: unrecognized option '-m486'
You have an old version of ld. Install a newer binutils package that contains an updated ld. Look on tsx-11.mit.edu in /pub/linux/packages/GCC/ for binutils-2.6.0.2.bin.tar.gz.
9.5 GCC Says, "Internal compiler error."
If the fault is repeatable (i.e., it always happens at the same place in the same file--even after rebooting and trying again, using a stable kernel) you have discovered a bug in GCC. See the GCC Info documentation (type F1-i in Emacs, and select GCC from the menu) for details on how to report the error. Make sure you have the latest version, though.
Note that this is probably not a Linux-specific problem. Unless you are compiling a program many other Linux users also compile, you should not post your bug report to any of the comp.os.linux groups.
If the problem is not repeatable, you may be experiencing memory corruption. Refer to the answer: ("Make Says, "Error 139."")
9.6 Make Says, "Error 139."
Your compiler (GCC) dumped core. You probably have a corrupted, buggy, or old version of GCC--get the latest release or EGCS. Alternatively, you may be running out of swap space. Refer to: ("The Machine Runs Very Slowly with GCC / X / ...")
If this doesn't fix the problem, you are probably having problems with memory or disk corruption. Check that the clock rate, wait states, and refresh timing for your SIMMS and cache are correct (hardware manuals are sometimes wrong, too). If so, you may have some marginal SIMMS, or a faulty motherboard or hard disk or controller.
Linux is a very good memory tester--much better than MS-DOS based memory test programs.
Reportedly, some clone x87 math coprocessors can cause problems. Try compiling a kernel with math emulation ("How To Upgrade/Recompile a Kernel.") no387 kernel command line flag on the LILO prompt to force the kernel to use math emulation, or it may be able to work and still use the '387, with the math emulation compiled in but mainly unused.
More information about this problem is available on the Web at http://www.bitwizard.nl/sig11/.
9.7 Shell-Init: Permission Denied when I Log In
Your root directory and all the directories up to your home directory must be readable and executable by everybody. See the manual page for chmod or a book on Unix for how to fix the problem.
9.8 No Utmp Entry. You Must Exec ... when Logging In
Your /var/run/utmp is screwed up. You should have
/var/run/utmp
in your /etc/rc.local or /etc/rc.d/*. See, ("I Screwed Up the System and Can't Log In to Fix It.") Note that the utmp may also be found in /var/adm/ or /etc/ on some older systems.
9.9 Warning--bdflush Not Running
Modern kernels use a better strategy for writing cached disk blocks. In addition to the kernel changes, this involves replacing the old update program which used to write everything every 30 seconds with a more subtle daemon (actually a pair), known as bdflush. Get bdflush-n.n.tar.gz from the same place as the kernel source code ("How To Upgrade/Recompile a Kernel.") and compile and install it. bdflush should be started before the usual boot-time file system checks. It will work fine with older kernels as well, so there's no need to keep the old update around.
9.10 Warning: obsolete routing request made
This is nothing to worry about. The message means that your version route is a little out of date, compared to the kernel. You can make the message go away by getting a new version of route from the same place as the kernel source code. ("How To Upgrade/Recompile a Kernel.")
9.11 EXT2-fs: warning: mounting unchecked file system
You need to run e2fsck (or fsck -t ext2 if you have the fsck front end program) with the -a option to get it to clear the "dirty" flag, and then cleanly unmount the partition during each shutdown.
The easiest way to do this is to get the latest fsck, umount, and shutdown commands, available in Rik Faith's util-linux package ("Where Are the Linux FTP Archives?") You have to make sure that your /etc/rc*/ scripts use them correctly.
NB: Don't try to check a file system that's mounted read/write. This includes the root partition if you don't see
VFS: mounted root ... read-only
at boot time. You must arrange to mount the root file system read/only to start with, check it if necessary, and then remount it read/write. Almost all distributions do this. If your's doesn't, read the documentation that comes with util-linux to find out how to do this.
Note that you need to specify the -n option to mount so it won't try to update /etc/mtab, since the root file system is still read-only, and this will otherwise cause it to fail.
9.12 EXT2-fs warning: maximal count reached
This message is issued by the kernel when it mounts a file system that's marked as clean, but whose "number of mounts since check" counter has reached the predefined value. The solution is to get the latest version of the ext2fs utilities (e2fsprogs-0.5b.tar.gz at the time of writing) from the usual sites. ("Where Are the Linux FTP Archives?")
The maximal number of mounts value can be examined and changed using the tune2fs program from this package.
9.13 EXT2-fs warning: checktime reached
Kernels from 1.0 onwards support checking a file system based on the elapsed time since the last check as well as by the number of mounts. Get the latest version of the ext2fs utilities. ("EXT2-fs warning: maximal count reached.")
9.14 df Says, "Cannot read table of mounted file systems."
There is probably something wrong with your /etc/mtab or /etc/fstab files. If you have a reasonably new version of mount, /etc/mtab should be emptied or deleted at boot time (in /etc/rc.local or /etc/rc.d/*), using something like
$ rm -f /etc/mtab*
Some old Linux distributions have an entry for the root partition in /etc/mtab made in /etc/rc* by using rdev. That is incorrect--the newer versions of mount do this automatically.
Some old distributions also have a line in /etc/fstab that looks like:
/dev/sdb1 /root ext2 defaults
The entry for /root should read simply /.
9.15 fdisk Says, "Partition X has different physical/logical..."
If the partition number (X, above) is 1, this is the same problem as in fdisk: Partition 1 does not start on cylinder boundary. If the partition begins or ends on a cylinder numbered greater than 1024, this is because the standard DOS disk geometry information format in the partition table can't cope with cylinder numbers with more than 10 bits. You should see ("How To Get Linux to Work with a Disk.")
9.16 fdisk: Partition 1 does not start on cylinder boundary
The version of fdisk that comes with many Linux systems creates partitions that fail its own validity checking. Unfortunately, if you've already installed your system, there's not much you can do about this, apart from copying the data off the partition, deleting and remaking it, and copying the data back.
You can avoid the problem by getting the latest version of fdisk, from Rik Faith's util-linux package (available on all the usual FTP sites). Alternatively, if you are creating a new partition 1 that starts in the first cylinder, you can do the following to get a partition that fdisk likes.
* Create partition 1 in the normal way. A `p' listing will produce the mismatch complaint.
* Type u to set sector mode and do p again. Copy down the number from the End column.
* Delete partition 1.
* While still in sector mode, re-create partition 1. Set the first sector to match the number of sectors per track. This is the sector number in the first line of the p output. Set the last sector to the value you wrote down in the step above.
* Type u to reset cylinder mode and continue with other partitions.
Ignore the message about unallocated sectors. They refer to the sectors on the first track apart from the Master Boot Record, and they are not used if you start the first partition in track 2.
9.17 fdisk Says Partition n Has an Odd Number of Sectors
The PC disk partitioning scheme works in 512-byte sectors, but Linux uses 1K blocks. If you have a partition with an odd number of sectors, the last sector is wasted. Ignore the message.
9.18 Mtools Utilities Say They Cannot Initialize Drive X
This means that mtools is having trouble accessing the drive. This can be due to several things.
Often this is due to the permissions on floppy drive devices (/dev/fd0* and /dev/fd1*) being incorrect. The user running mtools must have the appropriate access. See the manual page for chmod for details.
Most versions of mtools distributed with Linux systems (not the standard GNU version) use the contents of a file /etc/mtools to determine which devices and densities to use, in place of having this information compiled into the binary. Mistakes in this file often cause problems. There is often no documentation about this.
For the easiest way to access your MS-DOS files (especially those on a hard disk partition) see How do I access files on my DOS partition or floppy? Note--you should never use mtools to access files on an msdosfs mounted partition or disk!
9.19 At the Start of Booting: Memory tight
This means that you have an extra-large kernel, which means that Linux has to do some special memory-management magic to be able to boot itself from the BIOS. It isn't related to the amount of physical memory in your machine. Ignore the message, or compile a kernel containing only the drivers and features you need. ("How To Upgrade/Recompile a Kernel.")
9.20 The System Log Says, "end_request: I/O error, ...."
This error message, and messages like it, almost always indicate a hardware error with a hard drive.
This commonly indicates a hard drive defect. The only way to avoid further data loss is to completely shut own the system. You must also make sure that whatever data is on the drive is backed up, and restore it to a non-defective hard drive.
This error message may also indicate a bad connection to the drive, especially with home brew systems. If you install an IDE drive, always use new ribbon cables. It's probably is a good idea with SCSI drives, too.
In one instance, this error also seemed to coincide with a bad ground
between the system board and the chassis. Be sure that all electrical
connections are clean and tight before placing the blame on the hard
drive itself.
[Peter Moulder, Theodore Ts'o]
9.21 "You don't exist. Go away."
This is not a viral infection. It comes from programs like write, talk, and wall, if your invoking UID doesn't correspond to a valid user (probably due to /etc/passwd being corrupted), or if the session (pseudoterminal, specifically) you're using isn't properly registered in the utmp file (probably because you invoked it in a funny way).
9.22 "Operation not permitted."
One or more of the file's or directory's attribute bits are set incorrectly. If the "I" bit is set, for example, you won't be able to change file permissions with chmod.
The solution is to use lsattr to display file and directory
attributes, and chattr to set and unset them. The programs'
documentation is contained in their manual pages.
[Paul Campbell]
9.23 programname: error in loading shared libraries: lib xxx..so. cannot open shared object file: No such file or directory.
A message like this, when the program that you're trying to run uses shared libraries, usually means one of two things: the program was either compiled on a machine that had a different set of libraries or library paths than yours; or you've upgraded your libraries but not the program.
Executable programs that are linked with dynamic libraries, expect the full pathname of each of the library files it requires. So do the shared libraries, if they rely on other libraries. This is so the shared object dependencies remain as unambiguous as possible, and also as a security measure.
Short of recompiling the executable file for the libraries on the system--probably the most desirable alternative in the long run--you can try to determine which libraries the executable file needs with the command: "ldd programname." The output will be a list of the shared libraries on the system that the program needs to run, as well as the missing libraries. You can then add the library packages, or if the libraries already exist in a different directory, you can create a symbolic link so the program can find it. For example, if the program requires /usr/lib/libncurses.so.2, and your machine has /lib/libncurses.so.2, you can create a link where the program expects to find the library; e.g.:
# cd /usr/lib && ln -s /lib/libncurses.so.2 .
You should note, however, that creating library links like these should be considered a security risk, and the additional links you create will not be compatible with future upgrades. It's simply a quick fix for backward compatibility.
Also, it may take some guesswork to determine in exactly which of the system library directories the program expects to find a shared library file, because ldd will not list the paths of libraries it can't find. A program most likely will tell the run-time linker, /lib/ld.so, to look for shared libraries in /lib, /usr/lib, /usr/local/lib, or /usr/X11R6/lib, if it's an X client. But that doesn't mean that libraries can't be installed elsewhere. It helps to have some idea of the original library configuration before proceeding.
Also be sure to run ldconfig after creating the symbolic link, so that ld.so has an updated view of the system's libraries. You should also make certain that all of the library directories are listed in /etc/ld.so.conf, and perhaps in the LD_LIBRARY_PATH environment variable.
9.24 "init: Id "x" respawning too fast: disabled for 5 minutes.
In most distributions this means that the system is booting by default into runlevel 5, which is supposed to respawn (re-start again after it's been exited) a graphical login via xdm, kdm, gdm, or whatever, and the system can't locate the program.
However, "Id" can also indicate the absence or misconfiguration of another program, like mingetty, if init tries to respawn itself more than 10 times in 2 minutes.
Id "x" is the number in the leftmost column of the /etc/inittab file:
# Run gettys in standard runlevels 1:2345:respawn:/sbin/mingetty tty1 2:2345:respawn:/sbin/mingetty tty2 3:2345:respawn:/sbin/mingetty tty3 4:2345:respawn:/sbin/mingetty tty4 5:2345:respawn:/sbin/mingetty tty5 6:2345:respawn:/sbin/mingetty tty6
Commenting the offending line out and then fixing the errant program and testing on the command line will allow you to see any error messages that go to standard error output (console) if the errors are not going to the system log file. Uncomment the line and restart init with "kill -SIGHUP 1" or "telinit q" to cause init to reinitialize and reread the /etc/inittab file.
Some systems, however, rewrite /etc/inittab when booting. In that case, refer to the init man page, and/or the settings in /etc/sysconfig/init.
Refer to the init and /etc/inittab man pages for detailed information.
[Carl King]
9.25 FTP server says: "421 service not available, remote server has closed connection."
If an FTP server won't allow logins, it is probably configured correctly, but the problem is probably with authorizing users at login. FTP servers in current distriubtions often authorize users with the Pluggable Authentication Modules library, in which case there should be an authorization file /etc/pam.d/ftp. A generic authorization file looks like this. (The line break on the first "auth" line is for readability. The entry is actually a single, long line).
#%PAM-1.0 auth required /lib/security/pam_listfile.so item=user \ sense=deny file=/etc/ftpusers onerr=succeed auth required /lib/security/pam_pwdb.so shadow nullok auth required /lib/security/pam_shells.so account required /lib/security/pam_pwdb.so session required /lib/security/pam_pwdb.so
Also, make sure the /etc/ftpusers file, or whatever users file is named in the first "auth" line, is configured correctly.
Btw, the sample ftp file above is actually theftpd/ftp.pam.sample file from the ftpd-BSD-0.3.1.tar.gz package. Many thanks to David A. Madore for this much needed port.
10.1 Does Linux Support X?
Yes. Linux uses XFree86 (the current version is 4.0, which is based on X11R6). You need to have a video card which is supported by XFree86. See the XFree86 HOWTO for more details. Most Linux distributions nowadays come with an X installation. However, you can install or upgrade your own, from "ftp://metalab.unc.edu/pub/Linux/X11/Xfree86-*" and its mirror sites, or from http://www.xfree86.org/.
10.2 How Do I Get the X Window System to Work?
The answers to this question can, and do, fill entire books. If the installation program wasn't able to configure the X server correctly, Linux will most likely try to start the X display, fail, and drop back into text-only terminal mode.
First and foremost, make certain that you have provided, as closely as possible, the correct information to the installation program of your video hardware: the video card and monitor. Some installation programs can correctly guess a "least common denominator" screen configuration, like a 640-by-480 VESA-standard display, but there are many possible video hardware configurations that may not be able to display this standard.
The X Window System configuration file is called (usually) /etc/XF86Config, /etc/X11/XF86Config, or /usr/X11R6/lib/X11/XF86Config.
If you need to manually configure the X server, there are several possible methods:
* Try to use the XF86Setup program, which can help identify the correct X server and monitor timings for the video hardware.
* Make sure that the X server has the correct options. If you log in as the superuser, you should be able to use X --probeonly to get a listing of the video card chipset, memory, and any special graphics features. Also, refer to the manual page for the X server. (E.g.; man X), and try running the X server and redirecting the standard error output to a file so you can determine, after you can view text on the screen again, what error messages the server is generating; e.g., X 2>x.error.
* With that information, you should be able to safely refer to one of the references provided by the Linux Documentation Project. ("Where can I get the HOWTO's and other documentation? ") There are several HOWTO's on the subject, including a HOWTO to calculate video timings manually if necessary. Also, the Installation and Getting Started guide has a chapter with a step-by-step guide to writing a XF86Config file.
Also, make sure that the problem really is an incorrect XF86Config file, not something else like the window manager failing to start. If the X server is working correctly, you should be able to move the mouse cursor on the screen, and pressing Ctrl-Alt-Backspace will shut down the X server and return to the shell prompt in one of the virtual terminals.
10.3 Where To Find a Ready-Made XF86Config file
If you can't seem to get X working using the guidelines above, refer to the XFree86 HOWTO, recent versions of Installation and Getting Started, and the instructions for the XF86Setup program. The contents of the XF86Config file depend on the your exact combination of video card and monitor. It can either be configured by hand, or using the XF86Setup utility. Read the instructions that came with XFree86, in /usr/X11R6/lib/X11/etc. The file you probably need to look at most is README.Config. You should not use the sample XF86Config.eg file which is included with newer versions of XFree86 verbatim, because the wrong video clock settings can damage your monitor. Please don't post to comp.os.linux.x asking for an XF86Config, and please don't answer such requests. If you have a laptop, look at the Linux Laptop Web page ("How To Find Out If a Notebook Runs Linux.") Many of the installation notes also have the XF86Config file for the display. If you have a desktop machine, there are a few sample XF86Config files at ftp://metalab.unc.edu/. Refer also to the XFree86 FAQ http://www.xfree.org/FAQ/ and the monitor timings list http://www.xfree.org/#resources/, and in the /usr/X11R6/lib/X11/ directory of your X distribution.
10.4 What Desktop Environments Run on Linux?
Linux with XFree86 supports the KDE, GNOME, and commercial CDE desktop environments, and extended window managers like WindowMaker. Each uses a different set of libraries and provides varying degrees of MS Windows-like look and feel.
Information on KDE is available from http://www.kde.org/. The KDE environment uses the Qt graphics libraries, available from http://www.qt.org/. The desktop uses its own window manager, kwm, and provides a MS Windows-like look and feel.
The GNOME home page is http://www.gnome.org/. The environment uses the free GTK libraries, available from http://www.gtk.org/, and window managers like Enlightenment, http://www.enlightenment.org/, SawFish, http://www.sawfish.org/. There's also a Web page for GNOME installation and upgrade that functions much like Debian's apt-get utility with a friendly GUI front end. It's at: http://www.helixcode/com/desktop/.
The commercial CDE environment uses the Motif libraries and a variation of the Motif mwm window manager, dtwm, and provides a suite of desktop and session-management utilities. Several vendors have made the source code of Motif available and provided binary packages for Linux distributions. As a starting point, download and installation information is available at http://www.opengroup.org/openmotif/.
A free version of Motif, called LessTiF, is available from http://www.lesstif.org/.
WindowMaker, http://www.windowmaker.org/ is a window manager that has many desktop environment-like features. It provides support for GNUstep, http://www.gnustep.org/, a clone of the commercial NeXTStep environment.
10.5 xterm Logins Show Up Strangely in who, finger
The xterm that comes with XFree86 2.1 and earlier doesn't correctly understand the format that Linux uses for the /var/adm/utmp file, where the system records who is logged in. It therefore doesn't set all the information correctly. The xterms in XFree86 3.1 and later versions fix this problem.
10.6 How to Start a X Client on Another Display
To start a X client on another system that has a running X server, use the following commands:
* Use xhost on the server system to allow the client system use the display. If the server's IP address is 192.168.20.1, enter the command:
$ xhost + 192.168.20.1
* On the client system, open a telnet connection to the server system.
* In the telnet session, start a xterm in the background with the -display and -e options. For example, if the IP address of the machine running the server is 192.168.20.1 and the client program name is named "clientapp," use the following command:
$ xterm -display 192.168.20.1 -e clientapp &
[Pierre Dal Farra]
11.1. If this Document Still Hasn't Answered Your Question....
Please read all of this answer before posting. I know it's a bit long, but you may be about to make a fool of yourself in front of 50,000 people and waste hundreds of hours of their time. Don't you think it's worth spending some of your time to read and follow these instructions?
If you think an answer is incomplete or inaccurate, please e-mail
Read the appropriate Linux Documentation Project books. Refer to: ("Where Is the Documentation?")
If you're a Unix or Linux newbie, read the FAQ for comp.unix.questions, news.announces.newusers, and those for any of the other comp.unix.* groups that may be relevant.
Linux has so much in common with commercial unices, that almost everything you read there will apply to Linux. The FAQ's, like all FAQ's, be found on ftp://rtfm.mit.edu/pub/usenet/ (the mail-server@rtfm.mit.edu can send you these files, if you don't have FTP access). There are mirrors of rtfm's FAQ archives on various sites. Check the Introduction to *.answers posting, or look in news-answers/introduction in the directory above.
Check the relevant HOWTO for the subject in question, if there is one, or an appropriate old style sub-FAQ document. Check the FTP sites.
Try experimenting--that's the best way to get to know Unix and Linux.
Read the documentation. Check the manual pages (type man man if you don't know about manual pages. Also try man -k subject and apropos subject. They often list useful and relevant, but not very obvious, manual pages.
Check the Info documentation (type F1-i, i.e. the F1 function key followed by "i" in Emacs). This isn't just for Emacs. For example, the GCC documentation lives here as well.
There will also often be a README file with a package that gives installation and/or usage instructions.
Make sure you don't have a corrupted or out-of-date copy of the program in question. If possible, download it again and re-install it--you probably made a mistake the first time.
Read comp.os.linux.announce. It often contains very important information for all Linux users. General X Window System questions belong in comp.windows.x.i386unix, not in comp.os.linux.x. But read the group first (including the FAQ), before you post. Only if you have done all of these things and are still stuck, should you post to the appropriate comp.os.linux.* newsgroup. Make sure you read the next question first. "( What to put in a request for help. )"
11.2 What to Put in a Request for Help
Please read the following advice carefully about how to write your posting or E-mail. Making a complete posting will greatly increase the chances that an expert or fellow user reading it will have enough information and motivation to reply.
This advice applies both to postings asking for advice and to personal E-mail sent to experts and fellow users.
Make sure you give full details of the problem, including:
* What program, exactly, you are having problems with. Include the version number if known and say where you got it. Many standard commands tell you their version number if you give them a --version option.
* Which Linux release you're using (Red Hat, Slackware, Debian, or whatever) and what version of that release.
* The exact and complete text of any error messages printed.
* Exactly what behavior you expected, and exactly what behavior you observed. A transcript of an example session is a good way to show this.
* The contents of any configuration files used by the program in question and any related programs.
* What version of the kernel and shared libraries you have installed. The kernel version can be found by typing "uname -a," and the shared library version by typing "ls -l /lib/libc*."
* Details of what hardware you're running on, if it seems appropriate.
You are in little danger of making your posting too long unless you include large chunks of source code or uuencoded files, so err on the side of giving too much information.
Use a clear, detailed Subject line. Don't put things like "doesn't work," "Linux," "help," or "question" in it--we already know that. Save the space for the name of the program, a fragment of an error message, or summary of the unusual behavior.
Put a summary paragraph at the top of your posting.
At the bottom of your posting, ask for responses by email and say you'll post a summary. Back this up by using "Followup-To: poster." Then, actually post the summary in a few days or a week or so. Don't just concatenate the replies you got--summarize. Putting the word "SUMMARY" in your summary's Subject line is also a good idea. Consider submitting the summary to comp.os.linux.announce.
Make sure your posting doesn't have an inappropriate References: header line. This marks your article as part of the thread of the article referred to, which will often cause it to be junked by readers, along with the rest of a boring thread.
You might like to say in your posting that you've read this FAQ and the appropriate HOWTO's--this may make people less likely to skip your posting.
Remember that you should not post E-mail sent to you personally without the sender's permission.
11.3 How To Email Someone about Your Problem
Try to find the author or developer of whatever program or component is causing you difficulty. If you have a contact point for your Linux distribution, you should use it.
Please put everything in your E-mail message that you would put in a posting asking for help.
Finally, remember that, despite the fact that most of the Linux community are very helpful and responsive to E-mailed questions, you're likely asking for help from unpaid volunteers, so you have no right to expect an answer.
12.1 Where To Send Comments
Contributions to the FAQ may be in any format. Comments and corrections are gratefully received. Again, that email address is:
If you wish to refer to a question in the FAQ, it's better to do so by the question heading instead of number. The question numbers are generated automagically, and I don't see them in the source file.
I prefer comments in English to patch files--context diff is not my first language.
12.2 Formats in Which This FAQ Is Available.
This document is available as an ASCII text file, an HTML World Wide Web page, Postscript, PDF, and as a USENET news posting.
Section and item numbers are generated with Perl. HTML is generated from SGML source using the Jade DSSSL interpreter by James Clark. Text versions are generated using lynx and edited with sed, which are part of most Linux distributions.
The Usenet version is posted regularly to news.answers, comp.answers, and comp.os.linux.misc. It is archived at ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/comp/os/linux/misc/.
For Postscript and PDF versions, please contact the FAQ maintainer.
If you would like to receive the archived version of the FAQ by E-mail, send the following in the body of an E-mail message to mail-server@rtfm.mit.edu:
send faqs/linux/faq
Text, HTML, and SGML versions are available from the Linux archives at metalab.unc.edu, and from http://www.linuxdoc.org/, but they may be out of date, owing to lack of time on the LDP maintainers' parts.
The latest text and HTML versions are available at http://www.mainmatter.com and directly from the FAQ maintainer,
12.3 Authorship and Acknowledgments.
This FAQ is compiled and maintained by Robert Kiesling, activists all over the world.
Freddy Contreras, the_blur_oc@hotmail.com, designed and GPL'd the Linux Frequently Asked Questions logos that appear on www.mainmatter.com.
Special thanks are due to Matt Welsh, who moderated comp.os.linux.announce and comp.os.linux.answers, coordinated the HOWTO's and wrote substantial portions of many of them, Greg Hankins the former Linux Documentation Project HOWTO maintainer, Lars Wirzenius and Mikko Rauhala, the former and current moderators of comp.os.linux.announce, Marc-Michel Corsini, who wrote the original Linux FAQ, and Ian Jackson, the previous FAQ maintainer. Thanks also to Roman Maurer for his many updates and additions, especially with European Web sites, translations, and general miscellany.
Last but not least, thanks to Linus Torvalds and the other contributors to Linux for giving us something to talk about!
12.4 Disclaimer and Copyright
Linux Frequently Asked Questions with Answers may be reproduced and distributed in its entirety (including this authorship, copyright, and permission notice), provided that no charge is made for the document itself, without the author's consent. This includes "fair use" excerpts like reviews and advertising, and derivative works like translations.
Note that this restriction is not intended to prohibit charging for the service of printing or copying the document.
These conditions are in addition to the regular LDP distribution license, at http://www.linuxdoc.org/manifesto.html/
Exceptions to these rules may be granted. I would be happy to answer any questions regarding this copyright. E-mail me at these restrictions are here to protect the contributors, not to restrict you as educators and learners.