Next Previous Contents

6. Interesting Programs You Should Know About

6.1 What is getty?

getty is a program that handles the login process when you log onto a Linux box. You will need to use getty if you want others to be able to dial in to your Linux machine with a modem. You do not need to use getty if you only want to dial out with your modem. There are three getty versions that are commonly used with Linux: getty_ps, mgetty and agetty. The syntax for these programs differs, so be sure to check that you are using the correct syntax for whatever getty you use.

About getty_ps

Most distributions come with the getty_ps package installed. (Debian uses agetty.) It contains two programs: getty is used for console and terminal devices, and uugetty for modems. Greg Hankins (former author of Serial-HOWTO) used uugetty so his writings about it are included here. See Uugetty. The other gettys are covered by the documentation that comes with them.

About mgetty

mgetty is a version of getty mainly for use with modems. It may be used for hard-wired terminals but the documentation is about 99% related to modems. In addition to allowing dialup logins, mgetty also provides FAX support and auto PPP detection. The mgetty documentation (supplied in texinfo format) is good, and does not need supplementing. Please refer to it for installation instructions. You can find the latest information on mgetty at http://www.leo.org/~doering/mgetty/.

About agetty and mingetty

agetty is the third variation of getty. It's a simple, completely functional implementation of getty which is best suited for virtual consoles or terminals rather than modems. But it works fine with modems under favorable conditions.

mingetty is a small getty that will work only for consoles (monitors). While the previous 3 variations of getty will work for both real terminals and dial-in modems, mingetty will not do this.

6.2 What is setserial ?

setserial is a program which allows you to tell the device driver software the I/O address of the serial port, which IRQ it uses, etc. With appropriate options, it can also probe for serial ports (but you must know the I/O address). Setserial does not set either IRQ's nor I/O addresses in the serial port hardware itself. You must tell setserial the identical values that have been set in the hardware: either by jumpers or by plug-and-play. Do not just invent some values that you think would be nice to use. However if you don't know the IRQ you may command setserial to attempt to determine it.

You can see a list of possible arguments to use by typing setserial with no arguments. Note that setserial calls an I/O address a "port". If the argument to setserial is for example just /dev/ttyS1, then you'll see some info about how that device driver is configured for that port. But this doesn't tell you if the hardware actually has these values set in it. If fact, you can run setserial and assign a purely fictitious I/O address, any IRQ, and whatever uart type you would like to have. Then the next time you type "setserial ..." it will display these bogus values without complaint. Note that assignments made by setserial are lost when the PC is powered down so it is usually run each time that Linux is booted.

In order to try to find out if you have a certain piece of serial hardware you must first know its I/O address (or the device driver must have an I/O address for it, likely previously set by setserial). To try to detect the physical hardware use the -v (verbose) and autoconfig arguments to setserial. If the resulting message shows a uart type such as 16550, then you're OK. If instead it shows "unknown" for the uart type, then there may be no serial port at that I/O address. Some cheap serial ports don't identify themselves correctly so if you see "unknown" you still might have something there. See the file which runs "setserial". Besides auto-probing for uart type, setserial can auto-probe for IRQ's.

When your Linux system boots, only ttyS{0-3} are configured, using the default IRQs of 4 and 3. In 1998 it was (temporarily ?) changed to only ttyS{0-1}. By default, both ttyS0 and ttyS2 share IRQ 4, while ttyS1 and ttyS3 share IRQ 3. But if you only have two serial ports ttyS0 and ttyS1 you're OK since sharing conflicts don't exist for non-existent devices.

But if you do have more than 2 serial ports, then such sharing may be dangerous if the two devices with the same IRQ are being used at the same time. That is, unless you have special software designed for IRQ sharing. If you add an internal modem and retain ttyS0 and ttyS1, then you should attempt to find an unused IRQ and set it both on your modem card (or serial port) and then use setserial to assign it to your device driver. You may need to use isapnp to set it. To help you determine which spare IRQ's you may use, type "man setserial" and search for say: "IRQ 11".

Note that setserial will only work if the kernel module "serial" has been loaded. See the man page for setserial as well as the supplied file which runs it at start-up (which may contain a number of commented-out examples). In 1998, due to motherboards with defective serial chips Linux doesn't do autoconfiguration on ttyS{2-3} as it formerly did.

If you use setserial you could test it on the command line first, and then when you have it working, put it into /etc/rc.d/rc.serial or /etc/rc.d/rc.local or /etc/rc.boot/0setserial so that it is run at startup. Or you could just edit the above file and cross your fingers. Make sure that you are using a valid path for setserial, and a valid device name.

6.3 What is isapnp ?

isapnp is a program to configure Plug-and-Play (PnP) devices on the ISA bus including internal modems. It comes in a package called "isapnptools" and includes another program, "pnpdump" which finds all your ISA PnP devices and shows their current configuration in a format which may be added to the PnP configuration file: /etc/isapnp.conf. The isapnp command may be put into a startup file so that it run each time you start the computer and thus will configure ISA PnP devices. It is able to do this even if your BIOS doesn't support PnP. See Plug-and-Play-HOWTO.


Next Previous Contents