mgetty(8)

mgetty(8) โ€” smart modem getty ๐Ÿ’…

from the mgetty+sendfax manual, bestie

๐ŸŒธ NAME ๐ŸŒธ

mgetty โ€” the smart modem getty. Thatโ€™s the whole name and the whole vibe. ๐ŸŽ€

โœจ SYNOPSIS โœจ

mgetty [options] ttydevice [gettydefs]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

Mgetty is a โ€œsmartโ€ getty replacement, designed to be used with hayes compatible data and data/fax modems. It literally knows about modem initialization, manual modem answering (so your modem doesnโ€™t answer if the machine isnโ€™t ready โ€” boundaries, bestie), UUCP locking (so you can use the same device for dial-in and dial-out), and it provides very extensive logging facilities. โœจ

This manpage doesnโ€™t try to detail mgetty setup in detail, it just lists the most important options. For detailed instructions, see the info file mgetty.info (mgetty.texi). ๐Ÿซถ

๐Ÿ’… OPTIONS ๐Ÿ’…

  • -k <space> โ€” tells mgetty to leave <space> kbytes free on disk when receiving a fax. Disk space said โ€œleave room for me,โ€ and mgetty listened. ๐Ÿ’พ
  • -x <debug level> โ€” use the given level of verbosity for logging: 0 means no logging, 9 is really noisy. The log file is usually /tmp/log_mg.<device>. Turn it up when you need the tea. ๐Ÿ”ฅ
  • -s <speed> โ€” set the port speed to use, e.g. -s 19200. Slay at the exact speed you asked for. โšก
  • -r โ€” tells mgetty that it is running on a direct line. UUCP locking is done, but no modem initialization whatsoever. Just raw line energy. ๐Ÿชข
  • -p <login prompt> โ€” use the given string to prompt users for their login names. Various tokens are allowed in this string: @ for the system name; \n, \r, \g, \b, \v, \f, \t for newline, carriage return, bell, backspace, vertical tab, form feed, and tab, respectively. \P and \L will expand to the tty name ("ttyS0"). \Y will give the Caller ID, \I the "CONNECT foobar" string returned by the modem, and \S will output the port speed. \s, \m, \V, \R represent the operating system, the hardware name, the OS version, the OS release. \N and \U give the number of users currently logged in. \C will be changed into the result of ctime(), and \D and \T will output the date and time, respectively. Finally, \<digit> will use digit as octal/decimal/hexadecimal representation of the character to follow. The default prompt is specified at compile time. Token lore fr fr. ๐Ÿงš
  • -n # โ€” tells mgetty to pick up the phone after the #th RING. Default is 1. One ring and weโ€™re up, iconic behavior. โ˜Ž๏ธ
  • -R <t> โ€” tells mgetty to go into "ringback" (aka "ring-twice") mode. That means: the first call is never answered; instead the caller has to hang up after the phone RINGs, wait 30 seconds, and then call again in the next <t> seconds for mgetty to pick up. If no call comes, mgetty will exit.
bestie, the page literally says: โ€œI do not really recommend using this, better get a second phone line for the modem.โ€ So yeah, proceed with caution and maybe just get the second line. ๐Ÿ˜ญ

๐Ÿ“ž

  • -i <issue file> โ€” output <issue file> instead of /etc/issue before prompting for the user name. The same token substitutions as for the login prompt are done in this file. Custom issue file moment. ๐ŸŽ€
  • -D โ€” tells mgetty that the modem is to be treated as a DATA modem, no fax initialization is attempted. Data-only era. ๐Ÿ’พ
  • -F โ€” tells mgetty that DATA calls are not allowed and the modem should be set to Fax-Only. No data calls, periodt. ๐Ÿ“ 
  • -C <class> โ€” tells mgetty how to treat the modem. Possible values for <class> are "auto" (default, try to find out whether the modem supports fax), "cls2" (use the class 2 fax command set, even if the modem supports class 2.0), "c2.0" (use the class 2.0 fax command set), and "data" (data only, exactly as the -D switch). Pick your class like you pick your aesthetic. ๐Ÿฆ‹
  • -S <g3 file> โ€” if a call comes in and requests fax polling, mgetty will send the named file. Note: not all fax modems support poll sending. Sad but true. ๐Ÿ™ˆ
  • -I <fax id> โ€” use the given fax station ID for fax identification. Not used for data modems. Itโ€™s giving fax stationery. ๐Ÿ’Œ
  • -b โ€” open the port in blocking mode. Best used in combination with -r. This is the default if mgetty is called as getty. You may want to use this if you want to make use of the two-device / kernel-locking scheme of the Linux and SunOS operating systems (/dev/ttyS.. and /dev/cua..). The page says: โ€œI do not recommend it, itโ€™s just include for completeness, and to be able to use mgetty as a full-featured getty replacement.โ€ So itโ€™s included for completeness, bestie. ๐Ÿงฉ
  • -a โ€” use autobauding. That is, after a connection is made, mgetty parses the "CONNECT foo" response code of the modem and sets the port speed to the first integer found after the "CONNECT" string, "foo" in this example. You need this if your modem insist on changing its DTE speed to match the line speed. The page recommends against using it โ€” better leave the port speed locked at a fixed value. The feature is included because there exist old modems that cannot use a fixed (locked) port speed. Old-modem solidarity. ๐Ÿง“
  • -m 'expect send ...' โ€” set the "chat sequence" that is used to initialize the modem. For an empty expect part, use empty double quotes (""). Since the sequence contains spaces, you have to enclose all of it in single quotes(''). Example:
mgetty -m '"" ATH0 OK'

Chat sequence but make it modem initialization. ๐Ÿ’ฌ

๐ŸŽ€ FILES ๐ŸŽ€

  • /etc/mgetty+sendfax/mgetty.config โ€” main configuration file. The mothership. ๐Ÿ‘‘
  • /etc/mgetty+sendfax/login.config โ€” controls whether (and when) mgetty should call some other program for user login instead of /bin/login. How this is done is explained in this file. Login plot twist potential. ๐ŸŒ€
  • /etc/mgetty+sendfax/dialin.config โ€” controls acceptance/denial of incoming calls based on the callerโ€™s number. Available only if you have "caller ID" and your modem supports it. Caller ID gatekeeping. ๐Ÿšช
  • /etc/nologin.ttyxx โ€” controls whether mgetty should pick up the phone upon incoming calls. If the file exists, calls are completely ignored. You can use this, for example, to stop mgetty during day time, and let it pick up at night only, by creating and removing /etc/nologin.ttyxx via the cron program at the appropriate time. Day/night mode activated. ๐ŸŒ™
  • /etc/issue โ€” will be printed after a connection is established, and before the with the -i option. Yes that phrasing is literally what the page says, and itโ€™s giving mysterious. ๐Ÿซ 
  • /var/log/mgetty.ttyxx โ€” debug log file, see below. The receipts. ๐Ÿงพ

๐Ÿ”ฅ DIAGNOSTICS ๐Ÿ”ฅ

If mgetty doesnโ€™t work the way it should, the main source of diagnostic data is the log file. It can be found in /var/log/mgetty.ttyxx (for the mgetty process handling ttyxx). If it doesnโ€™t contain enough details, enhance the log level with the -x option to mgetty, e.g. -x 5. More verbosity, more clues, more drama. ๐Ÿ”

Many of the common problems and solutions are discussed in the mgetty manual and the FAQ. Please see the WWW page at http://alpha.greenie.net/mgetty/ for both. The lore is documented, bestie. ๐ŸŒ

๐Ÿ’€ BUGS ๐Ÿ’€

Not all of mgetty configuration can be done at run-time yet. Things like flow control and file paths (log file / lock file) have to be configured by changing the source and recompiling. So yes, sometimes itโ€™s a recompile situation. ๐Ÿ˜ญ

Users never read manuals... and honestly, that one is a whole mood. ๐Ÿ’€

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

g32pbm(1), sendfax(8), getty(8), mgettydefs(4), mgetty.info

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

mgetty is Copyright (C) 1993 by Gert Doering, <gert@greenie.muc.de>. Respect the copyright, bestie. ๐Ÿซถ

โ€” greenie ยท 27 Oct 93 - 21 Jul 98 ยท mgetty(8) ๐Ÿ’œ

๐Ÿ“ฆ where this page comes from