home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / old / ckermit60 / ckuker.bwr < prev    next >
Text File  |  2020-01-01  |  97KB  |  2,096 lines

  1. CKUKER.BWR         "Beware File" for C-Kermit Version 6.0         -*- text -*-
  2.  
  3.                  UNIX VERSION
  4.  
  5. As of C-Kermit version:  6.0.192
  6. This file last updated:  Fri Sep  6 23:23:23 1996
  7.  
  8. Authors: Frank da Cruz and Christine M. Gianone, Columbia University.
  9.  
  10.   Copyright (C) 1985, 1996, Trustees of Columbia University in the City of New
  11.   York.  The C-Kermit software may not be, in whole or in part, licensed or
  12.   sold for profit as a software product itself, nor may it be included in or
  13.   distributed with commercial products or otherwise distributed by commercial
  14.   concerns to their clients or customers without written permission of the
  15.   Office of Kermit Development and Distribution, Columbia University.  This
  16.   copyright notice must not be removed, altered, or obscured.
  17.  
  18. WHAT IS IN THIS FILE
  19.  
  20. This is the "beware file" for the UNIX version of C-Kermit.  It contains
  21. hints and tips, frequently asked questions (and answers), troubleshooting
  22. advice, limitations and restrictions, known bugs, etc, that apply to all UNIX
  23. variations, as well as to specific ones like HP-UX, AIX, SunOS, Solaris,
  24. Unixware, NeXTSTEP, etc etc.  It should be read in conjunction with the
  25. system-independent C-Kermit "beware file", ckcker.bwr, which contains similar
  26. information that applies to all versions of C-Kermit (VMS, OS/2, AOS/VS, VOS,
  27. etc, as well as to UNIX).
  28.  
  29. CONTENTS:
  30.  
  31.   (0) DOCUMENTATION
  32.   (1) IMPORTANT FILES
  33.   (2) BINARIES
  34.   (3) NOTES ON SPECIFIC UNIX VERSIONS
  35.   (3.1) C-KERMIT AND AIX
  36.   (3.2) C-KERMIT AND HP-UX
  37.   (3.3) C-KERMIT AND LINUX
  38.   (3.4) C-KERMIT AND NEXTSTEP
  39.   (3.5) C-KERMIT AND QNX
  40.   (3.6) C-KERMIT AND SCO UNIX, XENIX, ODT, AND OPENSERVER
  41.   (3.7) C-KERMIT AND SOLARIS
  42.   (3.8) C-KERMIT AND SUNOS
  43.   (3.9) C-KERMIT AND ULTRIX
  44.   (3.10) C-KERMIT AND UNIXWARE
  45.   (3.11) C-KERMIT AND APOLLO SR10
  46.   (3.12) C-KERMIT AND TANDY XENIX 3.0
  47.   (3.13) C-KERMIT AND OSF/1 (DIGITAL UNIX)
  48.   (3.14) C-KERMIT AND SGI IRIX
  49.   (3.15) C-KERMIT AND THE BEBOX
  50.   (4) GENERAL UNIX-SPECIFIC LIMITATIONS AND BUGS
  51.   (5) INITIALIZATION AND COMMAND FILES
  52.   (6) COMMUNICATION SPEED SELECTION
  53.   (7) COMMUNICATIONS AND DIALING
  54.   (8) HARDWARE FLOW CONTROL
  55.   (9) TERMINAL CONNECTION AND KEY MAPPING
  56.   (10) FILE TRANSFER
  57.   (11) EXTERNAL FILE TRANSFER PROTOCOLS
  58.   (11.1) C-KERMIT AS AN EXTERNAL PROTOCOL
  59.   (11.2) INVOKING EXTERNAL PROTOCOLS FROM C-KERMIT
  60.   (11.3) USING C-KERMIT WITH TERM
  61.   (12) MISCELLANEOUS
  62.  
  63. (0) DOCUMENTATION
  64.  
  65. C-Kermit is documented in the book "Using C-Kermit" by Frank da Cruz and
  66. Christine M. Gianone, Digital Press, Burlington, MA, USA, ISBN 1-55558-164-1.
  67. Price: US $39.95.  To order, call Columbia University, New York City,
  68. at +1 212 854-3703, or Digital Press / Butterworth-Heinemann at:
  69.  
  70.   +1 800 366-2665  (Massachusetts office for USA & Canada)
  71.   +441 1993 414414 (Rushden, England office for Europe)
  72.   +61 2 372-5511   (Chatswood, NSW, office for Australia & New Zealand)
  73.   +65 220-3684     (Singapore office for Asia)
  74.  
  75. A German edition is available from Verlag Heinz Heise in Hannover, Germany,
  76. Tel. +49 (05 11) 53 52-0, Fax. +49 (05 11) 53 52-1 29.
  77.  
  78. New features added since these books were published are documented in the
  79. ckcker.upd file.
  80.  
  81. TECHNICAL SUPPORT
  82.  
  83. Please consult the documentation listed above, plus the ckcker.bwr file and
  84. this file itself, before submitting questions, reporting problems, etc, to:
  85.  
  86.   E-Mail: kermit-support@columbia.edu
  87.  
  88.     News: comp.protocols.kermit.misc
  89.  
  90.     Post: The Kermit Project
  91.           Columbia University
  92.           612 West 115th Street
  93.           New York NY  10025-7799
  94.           USA
  95.  
  96.     Fax: +1 212 663-8202
  97.      or: +1 212 662-6442
  98.  
  99. Telephone support also available:
  100.  
  101.   USA Only:  +1 900 555-5595, cost: $2.50 per minute
  102.   Anywhere:  +1 212 854-5126, cost: $25.00 per call, payable via Visa or MC.
  103.  
  104.  
  105. (1) IMPORTANT FILES
  106.  
  107. In addition to the published documentation, the following files are useful
  108. in troubleshooting:
  109.  
  110.     ckaaaa.hlp:  Overview, file naming conventions, list of files, etc.
  111.     ckuins.doc:  Installation instructions for UNIX C-Kermit.
  112.     ckccfg.doc:  C-Kermit program configuration information.
  113.     ckcker.bwr:  C-Kermit "beware file" for all C-Kermit implementations.
  114.     ckuker.bwr:  C-Kermit "beware file" specific to UNIX (this file).
  115.     ckcplm.doc:  C-Kermit program logic manual.
  116.     ckcker.upd:  User documentation for features added since 5A(188).
  117.     ckcXXX.upd:  Program edit history for edit XXX, e.g. ckc190.upd.
  118.  
  119. (2) BINARIES
  120.  
  121. It is often dangerous to run a binary C-Kermit (or any other) program built
  122. on a different computer.  Particularly if that computer had a different C
  123. compiler, libraries, operating system version, processor features, etc, and
  124. especially if the program was built with shared libraries.
  125.  
  126. It is often OK to run a binary built on an earlier OS version, but it is
  127. rarely possible (or safe) to run a binary built on a later one, for example
  128. to run a binary built under SunOS 4.1.2 on a SunOS 4.1.1 system.
  129.  
  130. When in doubt, build C-Kermit from the source code on the system where it is
  131. to be run (if possible!).  If not, ask us for a binary specific to your
  132. configuration.  We might have one, and if we don't, we might be able to get
  133. one.
  134.  
  135. (3) NOTES ON SPECIFIC UNIX VERSIONS
  136.  
  137. The following sections apply to specific UNIX versions.
  138.  
  139. (3.1) C-KERMIT AND AIX
  140.  
  141. Many problems reported with bidirectional terminal lines on AIX 3.2.x on the
  142. RS/6000.  Workaround: don't use bidirectional terminal lines, or write some
  143. kind of shell script that turns getty off on the line before starting Kermit,
  144. or before Kermit attempts to do the SET LINE.  (But note: These problems
  145. MIGHT be fixed in C-Kermit 6.0.192.)
  146.  
  147. Reportedly, all versions of IBM AIX use the same (undocumented) lockfile
  148. conventions as RTAIX.  If this is true, the "makes" for PS/2 AIX and AIX/370
  149. will have to be changed to use the RTAIX convention (it may be sufficient to
  150. simply add -DRTAIX to the make entry).
  151.  
  152. C-Kermit SET HOST or TELNET from AIX on an RS/6000 to another RS/6000 won't
  153. work right unless you set your local terminal type to something other than
  154. AIXTERM.  When your terminal type is AIXTERM, AIX TELNET sends two escapes
  155. whenever you type one, and the AIX telnet server swallows one of them.
  156. This has something to do with the "hft" device.  This behavior is reportedly
  157. removed in AIX 3.2.
  158.  
  159. Transfer of binary -- and maybe even text -- files can fail on AIX 3.x.  The
  160. problem was traced to a facility in AIX whereby a particular port can have
  161. character-set translation done for it by the tty driver.  The following
  162. advice from a knowledgeable AIX user:
  163.  
  164.   (begin quote...)  [This feature] has to be checked (and set/cleared) with
  165.   a separate command, unfortunately stty doesn't handle this.  To check:
  166.  
  167.     $ setmaps
  168.     input map: none installed
  169.     output map: none installed
  170.  
  171.   If it says anthing other than "none installed" for either one, it is likely
  172.   to cause a problem with kermit.  To get rid of installed maps:
  173.  
  174.     $ setmaps -t NOMAP
  175.  
  176.   However, I seem to recall that with some versions of AIX before 3.2.5, only
  177.   root could change the setting.  I'm not sure what versions - it might have
  178.   only been under AIX 3.1 that this was true.  At least with AIX 3.2.5 an
  179.   ordinary user can set or clear the maps.  (...end quote) And this would
  180.   imply that Kermit itself cannot be coded to take care of this, because it
  181.   would have to run as root.  On the same problem, another knowledgeable AIX
  182.   user says:
  183.  
  184.   The way to get information on the NLS mapping under AIX (3.2.5 anyway) is
  185.   as follows.  From the command line type:
  186.  
  187.     lsattr -l tty# -a imap -a omap -E -H
  188.  
  189.   Replace the tty number for the number sign above. This will give a human
  190.   readable output of the settings that looks like this;
  191.  
  192.     # lsattr -l tty2 -a imap -a omap -E -H
  193.     attribute value description     user_settable
  194.  
  195.     imap      none  INPUT map file  True
  196.     omap      none  OUTPUT map file True
  197.  
  198.   If you change the -H to a -O, you get output that can easily be processed
  199.   by another program or a shell script, for example:
  200.  
  201.     # lsattr -l tty2 -a imap -a omap -E -O
  202.     #imap:omap
  203.     none:none
  204.  
  205.   To change the settings from the command line, the chdev command is used
  206.   with the following syntax.
  207.  
  208.     chdev -l tty# -a imap='none' -a omap='none'
  209.  
  210.   Again substituting the appropriate tty port number for the number sign,
  211.   "none" being the value we want for C-Kermit.  Of course, the above can also
  212.   be changed by using the SMIT utility and selecting devices - tty.
  213.   (...end quote)
  214.  
  215. (3.2) C-KERMIT AND HP-UX
  216.  
  217. During the C-Kermit 6.0 Beta cycle, something happened to ckcpro.w (or, more
  218. precisely, the ckcpro.c file that is generated from it) which causes HP
  219. optimizing compilers under HP-UX versions 7.0 and 8.0 (apparently on all
  220. platforms) as well as under HP-UX 9.0 on Motorola platforms only, to blow up.
  221. The symptoms vary from the system grinding to a halt, to the compiler
  222. crashing, to the compilation of the ckcpro.c module taking very long periods
  223. of time, like 9 hours.
  224.  
  225. On HP-UX 9.0, a kernel parameter, maxdsiz (maximum process data segment size),
  226. seems to be important.  On Motorola systems, it is 16MB by default, whereas on
  227. RISC systems the default is much bigger.  Increasing maxdsiz to about 80MB
  228. seems to make the problem go away, but only if the system also has a lot of
  229. physical memory -- otherwise it swaps itself to death.
  230.  
  231. Therefore, the C-Kermit 6.0 makefile entries for HP-UX 7.x and 8.x that do
  232. optimization, compile ckcpro.c first without optimization.  For HP-UX 9.0, a
  233. special entry, hpux90mot, was added for Motorola makes; the regular entries
  234. optimize all modules.
  235.  
  236. Even so, the optimizing compiler will often complain about "some optimizations
  237. skipped" on certain modules, due to lack of space available to the optimizer.
  238. You can always increase the space (the incantation depends on the particular
  239. compiler version -- see the makefile), but doing so tends to make the
  240. compilations take a much longer time.  For example, the "hpux100o+" makefile
  241. entry adds the "+Onolimit" compiler flag, and about an hour to the compile
  242. time on an HP-9000/730.  But it *does* produce an executable that is about
  243. 10K smaller :-)
  244.  
  245. (3.2.0) Performance
  246.  
  247. An unexpected slowness has been noted when transferring files over local
  248. Ethernet connections when an HP-UX system (9.0 or later, perhaps also earlier
  249. versions) is on the remote end.   The following experiment was conducted to
  250. determine the cause.
  251.  
  252. The systems were HP-UX 10.00 (on 715/33) and SunOS 4.1.3 (on Sparc-20), both
  253. on the same local 10Mbps Ethernet.  Window size 20, packet length 4096, parity
  254. none, control prefixing "cautious", using only local disks on each machine --
  255. no NFS.  The file was a 1.08MB binary file (wermit), transferred in binary
  256. mode.  Conditions were relatively poor: the Sun and the local net heavily
  257. loaded; the HP system is slow and memory-constrained.
  258.  
  259.  Client   Server   Send    Receive
  260.   Sun      HP       36       18    <-- K cps
  261.   HP       HP       25       15      
  262.   HP       Sun      77       83
  263.   Sun      Sun      60       60
  264.  
  265. So whenever HP is the server we have bad performance.  Why?
  266.  
  267.  . Changing file display to CRT has no effect (so it's not the curses
  268.    library on the client side).
  269.  
  270.  . Changing TCP RECV-BUFFER or SEND-BUFFER has very little effect.
  271.  
  272.  . Telling the client to make a binary-mode connection (SET TELNET BINARY
  273.    REQUESTED, which successfully negotiates a binary connection) has no effect.
  274.  
  275. BUT...  If I start C-Kermit as a TCP server:
  276.  
  277.   set host * 3000
  278.   server
  279.  
  280. and then from the client "set host blah 3000", I get:
  281.  
  282.  Client   Server   Send    Receive
  283.   HP       HP       50       50
  284.   Sun      HP       77       67
  285.   HP       Sun      57       85
  286.   Sun      Sun      57       50
  287.  
  288. Therefore the HP-UX telnet server or pty driver seems to be adding more
  289. overhead than the SunOS one, and most others.  When going through this type of
  290. connection (a remote telnet server) there is nothing Kermit can do improve
  291. matters, since the telnet server and pty driver are between the two Kermits,
  292. and neither Kermit can have any influence over them (except putting the Telnet
  293. connection in binary mode, but that doesn't help).
  294.  
  295. (3.2.1) HP-UX 5.21
  296.  
  297. Reportedly, "[there is] a bug in C-Kermit using HP-UX version 5.21 on the
  298. HP-9000 series 500 computers.  It only occurs when the controlling terminal
  299. is using an HP-27140 six-port modem mux.  The problem is not present if the
  300. controlling terminal is logged into an HP-27130 eight-port mux.  The symptom
  301. is that just after dialing successfully and connecting Kermit locks up and
  302. the port is unusable until both forks of Kermit and the login shell are
  303. killed."
  304.  
  305. (3.2.2) HP-UX 8.05
  306.  
  307. To make C-Kermit work on HP-UX 8.05 on a model 720, obtain and install HP-UX
  308. patch PHNE_0899.  This patch deals with a lot of driver issues, particularly
  309. related to communication at higher speeds.
  310.  
  311. (3.2.3) HP-UX 9.00 AND LATER
  312.  
  313. HP-UX 9.00 and 9.01 need patch PHNE_3641 for hptt0.o, asio0.o, and ttycomn.o
  314. in libhp-ux.a.  Contact Hewlett Packard if you need this patch.  Without it,
  315. the dialout device (tty) will be hung after first use; subsequent attempts to
  316. use will return an error like "device busy".
  317.  
  318. C-Kermit works fine -- including its curses-based file-transfer display -- on
  319. the console terminal, in a remote session (e.g. when logged in to the HP 9000
  320. on a terminal port or when telnetted or rlogin'd), and in an HP-VUE hpterm
  321. window or an xterm window.
  322.  
  323. Before you can use serial ports on the HP-9000, you must configure them as
  324. either "terminals" or "modems" with SAM ("peripheral devices"..."terminals and
  325. modems"), as described in the HP manual, "Configuring HP-UX for Peripherals:
  326. HP 9000".  If you attempt to use a serial device before it has been configured
  327. this way, it will not work properly; typical symptoms are (a) no communication
  328. at all; (b) nonfunctional modem signals; and/or (c) massive amounts of
  329. character loss in both directions.
  330.  
  331. In HP-UX 9.0, serial device names were different between HP9000 Series 700 and
  332. Series 800 systems.  In 10.0, device file names (and also major and minor
  333. numbers) have "converged", as shown in the following table:
  334.  
  335.   Converged HP-UX Serial I/O Filenames : TTY Mux Naming
  336.   ---------------------------------------------------------------------
  337.   General meaning        S800 9.0          S700 9.0    Convio 10.0
  338.   ---------------------------------------------------------------------
  339.   tty* hardwired ports   tty<X>p<Y>        tty<YY>     tty<D>p<p>
  340.              diag:mux<X>                   diag:mux<D>
  341.   ---------------------------------------------------------------------
  342.   ttyd* dial-in modems   ttyd<X>p<Y>       ttyd<YY>    ttyd<D>p<p>
  343.              diag:ttyd<X>p<Y>              diag:ttyd<D>p<p>
  344.   ---------------------------------------------------------------------
  345.   cua* auto-dial out     cua<X>p<Y>        cua<YY>     cua<D>p<p>
  346.              diag:cua<X>p<Y>
  347.   ---------------------------------------------------------------------
  348.   cul* dial-out          cul<X>p<Y>        cul<YY>     cul<D>p<p>
  349.              diag:cul<X>p<Y>
  350.   ---------------------------------------------------------------------
  351.    <X>= LU (Logical Unit)  <D>= Devspec (decimal card instance)
  352.    <Y> or <YY> = Port      <p>= Port
  353.  
  354. For dialing out, you should use the cua or cul devices.  When C-Kermit's
  355. CARRIER setting is AUTO or ON, C-Kermit will pop back to its prompt
  356. automatically if the carrier signal drops, e.g. when you log out from the
  357. remote computer or service.  If you use the tty<D>p<d> (e.g. tty0p0) device,
  358. the carrier signal is ignored.  The tty<D>p<d> device should be used for
  359. direct connections where the carrier signal does not follow RS-232
  360. conventions (use the cul device for hardwired connections through a true null
  361. modem).  Do not use the ttyd<D>p<d> device for dialing out.
  362.  
  363. Kermit's access to serial devices is controlled by "UUCP lockfiles", which are
  364. intended to prevent different users using different software programs (Kermit,
  365. cu, etc, and UUCP itself) from accessing the same serial device at the same
  366. time.  When a device is in use by a particular user, a file with a special
  367. name is created in the /var/spool/locks directory.  The file's name indicates
  368. the device that is in use, and its contents indicates the process ID (pid) of
  369. the process that is using the device.  Since serial devices and the
  370. /var/spool/locks directory are not both publicly readable and writable, Kermit
  371. and other communication software must be installed setuid to the owner (bin)
  372. of the serial device and setgid to the group (daemon) of the /var/spool/locks
  373. directory.  Kermit's setuid and setgid privileges are enabled only when
  374. opening the device and accessing the lockfiles.
  375.  
  376. Let's say "unit" means a string of decimal digits (the interface instance
  377. number) followed by the letter "p" (lowercase), followed by another string of
  378. decimal digits (the port number on the interface), e.g. "0p0", "0p1", "1p0",
  379. etc.  Then a normal serial device (driver) name consists of a prefix ("tty",
  380. "ttyd", "cua", "cul") followed by a unit, e.g. "cua0p0".  Kermit's treatment
  381. of UUCP lockfiles is as close as possible to that of the HP-UX "cu" program.
  382. Here is a table of the lockfiles that Kermit creates for unit 0p0:
  383.  
  384.   Selection      Lockfile 1     Lockfile 2
  385.   ------------   ------------   ------------
  386.   /dev/tty0p0    LCK..tty0p0    (none)
  387. * /dev/ttyd0p0   LCK..ttyd0p0   (none)
  388.   /dev/cua0p0    LCK..cua0p0    LCK..ttyd0p0
  389.   /dev/cul0p0    LCK..cul0p0    LCK..ttyd0p0
  390.   <other>        LCK..<other>   (none)
  391.  
  392. (* = Dialin device, should not be used.)
  393.  
  394. The final case allows for symbolic links, etc, but, of course, it is not
  395. foolproof since we have no way of telling which device is really being used.
  396.  
  397. When Kermit tries to open a dialout device whose name ends with a "unit", it
  398. searches the lockfile directory for all possible names for the same unit.  For
  399. example, if user selects /dev/cul2p3, Kermit looks for lockfiles named
  400. LCK..tty2p3, LCK..ttyd2p3, LCK..cua2p3, and LCK..cul2p3.
  401.  
  402. If any of these files are found, Kermit opens them to find out the ID (pid) of
  403. the process that created them; if the pid is still valid, the process is still
  404. active, and so the SET LINE command fails and the user is informed of the pid
  405. so s/he can use "ps" to find out who is using the device.
  406.  
  407. If the pid is not valid, the file is deleted.  If all such files (i.e. with
  408. same "unit" designation) are successfully removed, then the SET LINE command
  409. succeeds; up to four messages are printed telling the user which "stale
  410. lockfiles" are being removed.
  411.  
  412. If the selected device was in use by "cu", Kermit can't open it, because "cu"
  413. has changed its ownership, so we never get as far as looking at the lockfiles.
  414. In the normal case, we can't even look at the device to see who the owner is
  415. because it is visible only to its (present) owner.  In this case, Kermit says
  416. (for example):
  417.  
  418.   /dev/cua0p0: Permission denied
  419.  
  420. When Kermit releases a device it has successfully opened, it removes all the
  421. lockfiles that it created.  This also happens whenever Kermit exits "under its
  422. own power".
  423.  
  424. If Kermit is killed with a device open, the lockfile(s) are left behind.  The
  425. next Kermit program that tries to assign the device, under any of its various
  426. names, will automatically clean up the stale lockfiles because the pids
  427. they contain are invalid.
  428.  
  429. (3.2.4) HP-UX 10.10 AND LATER
  430.  
  431. C-Kermit is included as part of the HP-UX 10.xx operating system by contract
  432. between Hewlett Packard and Columbia University.  Each level of HP-UX 10.xx
  433. includes a freshly built C-Kermit binary in /bin/kermit, which should work
  434. correctly.  However, if you are building your own or downloading from
  435. Columbia, you should be aware that you can only use a binary that was built
  436. under the same OS level as you are running.  As of C-Kermit version 6.0, HP-UX
  437. 10.xx binaries announce, in the startup herald and the VERSION command, the
  438. explicit HP-UX version they were built for: HP-UX 10.00, 10.10, 10.20, or
  439. 10.30.  If there is a version mismatch, HP-UX does something like "Invalid
  440. version for shared lib /usr/lib/libc.1, IOT trap (core dumped)".
  441.  
  442. Beginning in 10.10, libcurses is linked to libxcurses, the new UNIX95 (X/Open)
  443. version of curses, which has some serious bugs; some routines, when called,
  444. would hang and never return, some would dump core.  Evidently libxcurses
  445. contains a select() routine, and whenever C-Kermit calls what it thinks is the
  446. regular (sockets) select(), it gets the curses one, causing a segmentation
  447. fault.  There is a patch for this from HP, PHCO_8086, "s700_800 10.10
  448. libcurses patch", "shared lib curses program hangs on 10.10", "10.10 enhanced
  449. X/Open curses core dumps due to using wrong select call", 96/08/02 (you can
  450. tell if the patch is installed with "what /usr/lib/libxcurses.1"; the unpatched
  451. version is 76.20, the patched one is 76.20.1.2.  It has been verified that
  452. C-Kermit works OK with the patched library, but results are not definite for
  453. HP-UX 10.20 or higher.  
  454.  
  455. To ensure that C-Kermit works even on non-patched HP-UX 10.10 systems,
  456. separate makefile entries are provided for HP-UX 10.00/10.01, 10.10, 10.20,
  457. etc, in which the entries for 10.10 and above link with libHcurses, which is
  458. "HP curses", the one that was used in 10.00/10.01.
  459.  
  460. (3.3) C-KERMIT AND LINUX
  461.  
  462. Be sure to read the comments in the "linux:" makefile entry.  There are all
  463. sorts of confusing issues caused by the many and varied Linux distributions.
  464. Some of the worst involve the curses library and header files: where are they,
  465. what are they called, which ones are they really?  Ditto for UUCP lock files.
  466.  
  467. Run C-Kermit in the regular console screen, which provides VT100 emulation via
  468. the "console" termcap entry, or under X-Windows in an xterm window.  Before
  469. starting C-Kermit in an xterm window, tell the xterm window's shell to "stty
  470. sane".
  471.  
  472. How to set up your PC console keyboard to send VT220 key sequences when using
  473. C-Kermit as your communications program in an X terminal window: Create a file
  474. somewhere (e.g. in /root/) called .xmodmaprc, containing something like the
  475. following:
  476.  
  477.   keycode 77  = KP_F1       ! Num Lock     => DEC Gold (PF1)
  478.   keycode 112 = KP_F2       ! Keypad /     => DEC PF1
  479.   keycode 63  = KP_F3       ! Keypad *     => DEC PF3
  480.   keycode 82  = KP_F4       ! Keypad -     => DEC PF4
  481.   keycode 111 = Help        ! Print Screen => DEC Help
  482.   keycode 78  = F16         ! Scroll Lock  => DEC Do
  483.   keycode 110 = F16         ! Pause        => DEC Do
  484.   keycode 106 = Find        ! Insert       => DEC Find
  485.   keycode 97  = Insert      ! Home         => DEC Insert
  486.   keycode 99  = 0x1000ff00  ! Page Up      => DEC Remove
  487.   keycode 107 = Select      ! Delete       => DEC Select
  488.   keycode 103 = Page_Up     ! End          => DEC Prev Screen
  489.   keycode 22  = Delete      ! Backspace sends Delete (127)
  490.  
  491. Then put "xmodmap <filename>" in your .xinitrc file (in your login
  492. directory), e.g.
  493.  
  494.   xmodmap /root/.xmodmaprc
  495.  
  496. Of course you can move things around.  Use the xev program to find out key
  497. codes.
  498.  
  499. Different UUCP lockfile conventions are used by Linux, depending on your Linux
  500. distribution.  In C-Kermit 6.0, "make linux" uses /var/lock/LCK..name, decimal
  501. ASCII 10-byte PID string with leading spaces because -DLINUXFSSTND ("Linux File
  502. System Standard") is included in the compilation CFLAGS.  If you remove this
  503. definition, C-Kermit will use the earlier arrangement of integer PID,
  504. /usr/spool/uucp/LCK..name.  The leading spaces are required by FSSTND 1.2, but
  505. FSSTND 1.0 required leading zeros; to get the leading zeros, also include
  506. -DFSSTND10.  Use whichever option agrees with your uucp, cu, tip, etc,
  507. programs.
  508.  
  509. Building C-Kermit on Linux 1.1.33 and 1.1.34 gets fatal compilation errors
  510. due to inconsistencies in the Linux header files.  Linux kernel versions prior
  511. to 1.1.33 and later than 1.1.34 should be OK.
  512.  
  513. C-Kermit versions prior to 5A(190) did not support hardware flow control or
  514. high interface speeds for Linux.
  515.  
  516. One Linux user reported problems dialing out using the /dev/cua device;
  517. "device busy" errors.  He said that using the alternative name (driver) for
  518. the device, /dev/ttyS2, made the problem go away.
  519.  
  520. Reportedly there is a bug in gcc 2.5.8 with signed to unsigned compares
  521. that can wreak havoc when Kermit (or most any other program) is compiled with
  522. this version of gcc; reportedly this can be worked around, at least in part,
  523. by adding "-fno-unroll-loops" to the gcc compilation options.
  524.  
  525. Reportedly, if you have the iBCS2 (Intel Binary Compatibility Standard 2)
  526. module installed, you can also run SCO Xenix and UNIX binaries under Linux,
  527. including the SCO C-Kermit binaries, shareable libraries and all.
  528. (iCBS2 is available via anonymous ftp from tsx-11.mit.edu, along with an
  529. SCO libc_s compatibility module for Linux).
  530.  
  531. Some Linux users reported that after doing a file transfer using the
  532. fullscreen display (thermometer), that "screen scrolling locks up" and the
  533. cursor "is stuck on the bottom of the screen".  This probably only happens
  534. when using the console device.  This turns out to be a problem with Linux
  535. ncurses.  The workaround is to use "set file display crt" or "serial".  The
  536. cure (reportedly) is to build C-Kermit with Linux ncurses 1.8.7 (or later).
  537.  
  538. (Time passes...)  Now (early 1996) we have increasing reports of C-Kermit core
  539. dumping in Linux 1.2.x, e.g. when the "set line" command is given.  But they
  540. are conflicting -- it happens to some people, not to others.  Not much can be
  541. said about this but:
  542.  
  543. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  544. Newsgroups: comp.protocols.kermit.misc
  545. Subject: Re: Kermit drops core at SET LINE /dev/cua1
  546. Date: 14 Feb 1996 15:43:07 GMT
  547. Organization: Columbia University
  548.  
  549. In article <4fr2nc$n0o@mozo.cc.purdue.edu>,
  550. Branden Robinson <branden@ecn.purdue.edu> wrote:
  551. : I'm trying to run C-Kermit under Linux, but as soon as I type "set line
  552. : /dev/cua1", kermit gets a segmentation fault.  This is the correct line, as
  553. : evidenced by the fact that "echo ATDT" and a phone number redirected to
  554. : /dev/cua1 makes the modem dial.
  555. : I thought this might have something to do with the lock file put on
  556. : /dev/cua1, but both the compliation with the -DLINUXFSSTND and without it
  557. : yield the same result.  What is going on here?
  558. : Relevant hardware:
  559. :  Hayes Accura 14.4 + FAX internal on COM 2
  560. : Relevant software:
  561. :  Linux Debian 0.93R6, kernel 1.2.13, GCC 2.6.3, C-kermit 1.90
  562. C-Kermit 5A(190) was tested successfully on every known Linux variation at
  563. the time it was released (October 1994), but since then what is
  564. collectively known as Linux has been changing rapidly out from underneath
  565. us, thanks in large part to its numerous repackagers.  Most of the
  566. problems stem from the many and varied curses libraries; this is the first
  567. report I have heard of this nature.  You might try:
  568.  
  569.  1. The Debian C-Kermit distribution, put together and tested by the
  570.     Debian Project.  Maybe they linked it with different libraries than
  571.     you did:
  572.  
  573.       ftp://kermit.columbia.edu/kermit/linux/
  574.  
  575.  2. The 6.0.192 Alpha not-yet-a-release:
  576.  
  577.       ftp://kermit.columbia.edu/kermit/test/
  578.  
  579.  3. Taking a debug log of a core-dumping session and sending the last
  580.     hundred lines or so to kermit@columbia.edu for analysis.  Also see if
  581.     you can get a backtrace from the core file to find out what routine it
  582.     was in when it faulted.  I don't know what the command for this is on
  583.     Linux -- locally I use "adb kermit core" and then "$c", where "kermit"
  584.     is Kermit's pathname and "core" is the core file's pathname.
  585.  
  586. griffith@axopta.kodak.com (John D. Griffith) replies:
  587. Well I am succesfully using C-kermit 1.90 with the same modem on 
  588. /dev/cua2 (COM3).  I am running linux 1.2.13 (a.out) and gcc 2.5.8.
  589. My distribution was originally Red Hat Release 1.0, but has been
  590. considerably customized since then. 
  591.  
  592. mitchell@mdd.comm.mot.com (Bill Mitchell) replies:
  593. I'm the debian kermit maintainer, but I'm afraid I don't have much
  594. of a clue about this.  The debian kermit sources are stock kermit
  595. sources except for the addition of some debian-specific files (debian.*)
  596. which don't impact non-debian compilation and the addition of a debian
  597. target in debian.makefile.
  598. I use kermit regularly on my debian linux system with the 1.2.13 kernel,
  599. and my modem is on /dev/cua1.
  600.  
  601. And in the same vein...
  602.  
  603. Date: Wed, 15 Nov 95 10:16:24 EST
  604. From: Frank da Cruz <fdc@watsun.cc.columbia.edu>
  605. To: kurt klingbeil <kurtk@pc160.aec.env.gov.ab.ca>
  606. Subject: Re: cku190 & linux 1.1.59 vs 1.2.x ??
  607. In-Reply-To: Your message of Tue, 14 Nov 1995 23:57:21 -0700 (MST)
  608.  
  609. > Any idea what's changed in the serial handling of linux
  610. > between 1.1.x and 1.2.x ?
  611. Absolutely no idea.  It's just the way of the world.  The rule is that if
  612. Kermit works in release n of any operating system, then release n+1 breaks it.
  613. I think this must be an internal requirement for OS developers.  The nice
  614. thing about Linux is you don't even know who to ask about it.
  615.  
  616. > Using cku190 to connect to a USR v.everything (no getty or any other process
  617. > active on that tty port):
  618. > I can dial, connect, run a remote session.
  619. > When I hangup, the loss of CD causes kermit 
  620. > to disconnect, drop RTS and DTR, and return to its prompt.
  621. > When attempting to immediately re-connect to the modem
  622. > (using c command), I can see the DTR and RTS lines being brought up:
  623. > (The modem's CTS and DSR remain set at all times.)
  624. > Under Linux 1.1.59, kermit is immediately able to communincate with 
  625. > the modem.  Under Linux 1.2.{3,8,13} kermit appears to be hung -
  626. > no modem responses are received, kermit ignores it's escape character
  627. > and will wait forever.  If one sends kermit a signal (either via kill,
  628. > or, if one is on the console via break (control-C is ignored as well)),
  629. > then a few characters of garbage appear in kermit's session, and
  630. > things are back to normal.
  631. > I suspect that either a previously non-blocking read is now a blocking
  632. > read, or that previously the port was being properly flushed before
  633. > a connection was made, and that under 1.2.x it isn't and hence kermit
  634. > gets deadlocked waiting forever for a conidition which never occurs.
  635. > Any ideas ?
  636. (Unhelpful response deleted)
  637.  
  638. Could this be the explanation? --
  639.  
  640. Date: Sat, 13 Jan 1996 09:48:11 -0800 (PST)
  641. From: John Harris <jharris@langara.bc.ca>
  642. Subject: C-Kermit Installation on Linux 1.2.1 
  643.  
  644. Below is a letter which addresses the problem I was having installing 
  645. C-Kermit on a Linux platform.  So you do not need to waste your time 
  646. addressing my difficulty, I wish to inform you that I have just resolved 
  647. it; that is, the compile now takes place without even a warning. 
  648.  
  649. So that someone else can benefit, I briefly describe the cause of the 
  650. problem.  The following directories were not present: /usr/include/linux/ 
  651. and /usr/src/linux/include/asm.  There may also have been other files 
  652. missing in certain directories; for example, /usr/include/linux and 
  653. /usr/include/asm.  The problem may have arisen from an oversight during
  654. Linux installation; for example, I may have forgotten to create the file
  655. system in advance of installation with "mke2fs -c <partition> <size>" or
  656. perhaps I simply neglected to transfer some library files during the 
  657. software installation itself.
  658.  
  659. In more recent releases of Linux (mid-1996), the trend is to replace curses by
  660. ncurses.  But of course this is not transparent to application software that
  661. includes curses.h and links with libcurses.  Linus says it *should* be
  662. transparent -- the application should continue to refer to curses and not to
  663. ncurses.  C-Kermit follows this recommendation, so if you have curses-related
  664. trouble during compilation or at runtime, create symbolic links called
  665. curses.h and libcurses.a (or .sa, or .so, or .so.XX, etc) pointing to
  666. ncurses.h and libncurses-dot-whatever, and rebuild Kermit.
  667.  
  668. Also note that some Linux distributions have internal problems in their header
  669. files.  In one case, there are fatal errors in <termcap.h> that can be fixed
  670. by adding "#include <termios.h>" to the termcap.h file.
  671.  
  672. See additional comments in the Linux entry in the makefile.
  673.  
  674. (3.4) C-KERMIT AND NEXTSTEP
  675.  
  676. Run C-Kermit in a Terminal, Stuart, or xterm window, or when logged in
  677. remotely through a serial port or TELNET connection.  C-Kermit does not work
  678. correctly when invoked directly from the NeXTSTEP File Viewer or Dock.  This
  679. is because the terminal-oriented gtty, stty, & ioctl calls don't work on the
  680. little window that NeXTSTEP pops up for non-NeXTSTEP applications like Kermit.
  681. CBREAK and No-ECHO settings do not take effect in the command parser --
  682. commands are parsed strictly line at a time.  "set line /dev/cua" works.
  683. During CONNECT mode, the console stays in cooked mode, so characters are not
  684. transmitted until carriage return or linefeed is typed, and you can't escape
  685. back.  If you want to run Kermit directly from the File Viewer, then launch it
  686. from a shell script that puts it in the desired kind of window, something like
  687. this (for "Terminal"):
  688.  
  689.   Terminal -Lines 24 -Columns 80 -WinLocX 100 -WinLocY 100 $FONT $FONTSIZE \
  690.   -SourceDotLogin -Shell /usr/local/bin/kermit &
  691.  
  692. C-Kermit does not work correctly on a NeXT with NeXTSTEP 3.0 to which you have
  693. established an rlogin connection, due to a bug in NeXTSTEP 3.0, which has been
  694. reported to NeXT.
  695.  
  696. The SET CARRIER command has no effect on the NeXT -- this is a limitation of
  697. the tty device drivers.
  698.  
  699. Hardware flow control on the NeXT is selected not by "set flow rts/cts" in
  700. Kermit (since NeXTSTEP offers no API for this), but rather, by using a
  701. specially-named driver for the serial device: /dev/cufa instead /dev/cua;
  702. /dev/cufb instead of /dev/cub.  This is available only on 68040-based NeXT
  703. models (the situation for Intel NeXTSTEP implementations is unknown).
  704.  
  705. NeXT-built 68030 and 68040 models have different kinds of serial interfaces;
  706. the 68030 has a Macintosh-like RS-422 interface, which lacks RTS and CTS
  707. signals; the 68040 has an RS-423 (RS-232 compatible) interface, which
  708. supports the commonly-used modem signals.  WARNING: the connectors look
  709. exactly the same, but the pins are used in completely DIFFERENT ways --
  710. different cables are required for the two kinds of interfaces.
  711.  
  712.   IF YOU GET LOTS OF RETRANSMISSIONS during file transfer, even when
  713.   using a /dev/cuf* device and the modem is correctly configured for
  714.   RTS/CTS flow control, YOU PROBABLY HAVE THE WRONG KIND OF CABLE.
  715.  
  716. On the NeXT, Kermit reportedly (by TimeMon) causes the kernel to use a lot of
  717. CPU time when using a "set line" connection.  That's because there is no DMA
  718. channel for the NeXT serial port, so the port must interrupt the kernel for
  719. each character in or out.
  720.  
  721. One user reported trouble running C-Kermit on a NeXT from within NeXT's
  722. Subprocess class under NeXTstep 3.0, and/or when rlogin'd from one NeXT to
  723. another: Error opening /dev/tty:, congm: No such device or address.
  724. Diagnosis: Bug in NeXTSTEP 3.0, cure unknown.
  725.  
  726. (3.5) C-KERMIT AND QNX
  727.  
  728. Support for QNX 4.x was added in C-Kermit 5A(190).  This is a full-function
  729. implementation, thoroughly tested on QNX 4.21, and verified to work in both
  730. 16-bit and 32-bit versions.  Most advanced features are supported including
  731. TCP/IP, high serial speeds, hardware flow-control, modem-signal awareness,
  732. curses support, etc.
  733.  
  734. Dialout devices are normally /dev/ser1, /dev/ser2, ..., and can be opened
  735. explicitly with SET LINE.  Reportedly, "/dev/ser" (no unit number) opens the
  736. first available /dev/ser<n> device.
  737.  
  738. Like all other UNIX C-Kermit implementations, QNX C-Kermit does not provide
  739. any kind of terminal emulation.  Terminal specific functions are provided by
  740. your terminal, terminal window (e.g. QNX Terminal or xterm), or emulator.
  741.  
  742. QNX C-Kermit, as distributed, does not include support for UUCP line-locking;
  743. the QNX makefile entries (qnx32 and qnx16) include the -DNOUUCP switch.  This
  744. is because QNX, as distributed, does not include UUCP, and its own
  745. communications software (e.g. qterm) does not use UUCP line locking.  If you
  746. have a UUCP product installed on your QNX system, remove the -DNOUUCP switch
  747. from the makefile entry and rebuild.  Then check to see that Kermit's UUCP
  748. lockfile conventions are the same as those of your UUCP package; if not, read
  749. the UUCP lockfile section ckuins.doc and make the necessary changes to the
  750. makefile entry (e.g. add -DHDBUUCP).
  751.  
  752. BUG: The fullscreen file transfer display works fine the first time, but it is
  753. fractured on subsequent file transfers.  Cause and cure unknown.
  754.  
  755. (3.6) C-KERMIT AND SCO UNIX, XENIX, ODT, AND OPENSERVER
  756.  
  757. There is all sorts of confusion among SCO versions, particularly when third-
  758. party communications boards and drivers are installed, regarding lockfile
  759. naming conventions.  Basically, all bets are off if you are using a third
  760. party multiport board.  At least you have the source code.  Hopefully you also
  761. have a C compiler :-)
  762.  
  763. Use SCO-provided utilities for switching the directionality of a modem line,
  764. such as "enable" and "disable" commands.  For example, to dial out on tty1a,
  765. which is normally set up for logins:
  766.  
  767.   disable tty1a
  768.   kermit -l /dev/tty1a
  769.   enable tty1a
  770.  
  771. In SCO Xenix, you must use SET CARRIER ON *and* use the upper-case tty device
  772. name in order to have carrier detection.  SET CARRIER OFF should work with
  773. either upper or lowercase tty devices.  SET CARRIER AUTO is the same as OFF.
  774.  
  775. SCO Xenix and UNIX can provide different names for the same device.  In Xenix,
  776. /dev/tty1a refers to a terminal device that has no modem control; open, read,
  777. write, and close operations do not depend on carrier.  On the other hand,
  778. /dev/tty1A (same name, but with final letter upper case), is the same device
  779. with modem control, in which carrier is required (the SET LINE command does
  780. not complete until carrier appears, read/write operations fail if there is no
  781. carrier, etc).  In the SCO case, C-Kermit always uses the lowercase name when
  782. creating the UUCP lockfile (this is, according to SCO experts, the proper
  783. behavior, but reportedly not all other communications applications found on
  784. SCO systems follow this rule).
  785.  
  786. One user of C-Kermit 5A(190) on SCO UNIX 3.2.4 reported that C-Kermit dumps
  787. core when receiving files in local mode.  The crash invariably occurs when the
  788. 16384th byte arrives, obviously indicating some kind of int/long, or
  789. short/int, or similar mismatch in argument-passing -- no doubt the byte count.
  790. Other users of SCO UNIX 3.2.4, built using the same makefile entry, report
  791. that they can receive files of any length with no problem at all.  Maybe it
  792. depends on which file transfer display is being used?  If this happens to you,
  793. try using a different file transfer display (SET FILE DISPLAY NONE, SERIAL,
  794. CRT, or FULLSCREEN).
  795.  
  796. SCO users report that only one copy of Kermit can run at a time when a
  797. Stallion Technologies multiport boards are installed.
  798.  
  799. (3.7) C-KERMIT AND SOLARIS
  800.  
  801. The built-in SunLink X.25 support for Solaris 2.3/2.4./25 and SunLink 8.01 or
  802. 9.00 works OK provided the X.25 system has been installed and initialized
  803. properly.  Packet sizes might need to be reduced to 256, maybe even less,
  804. depending on the configuration of the X.25 installation.  On one connection
  805. where C-Kermit 6.0 was tested, very large packets and window sizes could be
  806. used in one direction, but only very small ones would work in the other.
  807.  
  808. In any case, according to Sun, C-Kermit's X.25 support is superfluous with
  809. SunLink 8.x / Solaris 2.3.  Quoting an anonymous Sun engineer:
  810.  
  811.   ... there is now no need to include any X.25 code within kermit.  As of
  812.   X.25 8.0.1 we support the use of kermit, uucp and similar protocols over
  813.   devices of type /dev/xty.  This facility was there in 8.0, and should
  814.   also work on the 8.0 release if patch 101524 is applied, but I'm not 100%
  815.   sure it will work in all cases, which is why we only claim support from
  816.   8.0.1 onwards.
  817.  
  818.   When configuring X.25, on the "Advanced Configuration->Parameters" screen
  819.   of the x25tool you can select a number of XTY devices.  If you set this
  820.   to be > 1, press Apply, and reboot, you will get a number of /dev/xty
  821.   entries created.
  822.  
  823.   Ignore /dev/xty0, it is a special case.  All the others can be used exactly
  824.   as if they were a serial line (e.g. /dev/tty) connected to a modem, except
  825.   that instead of using Hayes-style commands, you use PAD commands.
  826.  
  827.   From kermit you can do a 'set line' command to, say, /dev/xty1, then set
  828.   your dialing command to be "CALL 12345678", etc.  All the usual PAD
  829.   commands will work (SET, PAR, etc).
  830.  
  831.   I know of one customer in Australia who is successfully using this, with
  832.   kermit scripts, to manage some X.25-connected switches. He used standard
  833.   kermit, compiled for Solaris 2, with X.25 8.0 xty devices.
  834.  
  835. C-Kermit can't be compiled successfully under Solaris 2.3 using SUNWspro cc
  836. 2.0.1 unless at least some of the following patches are applied to cc (it is
  837. not known which one(s), if any, fix the problem):
  838.  
  839.   100935-01 SparcCompiler C 2.0.1: bad code generated when addresses
  840.     of two double arguments are involved 
  841.   100961-05 SPARCcompilers C 2.0.1: conditional expression with
  842.     function returning strucure gives wrong value 
  843.   100974-01 SparcWorks 2.0.1: dbx jumbo patch
  844.   101424-01 SPARCworks 2.0.1 maketool SEGV's instantly on Solaris 2.3
  845.  
  846. With unpatched cc 2.0.1, the symptom is that certain modules generate
  847. truncated object files, resulting in many unresolved references at link time.
  848.  
  849. Using a Sun workstation keyboard for VT emulation when accessing VMS:
  850.  
  851. From: Jerry Leichter <leichter@smarts.com>
  852. Newsgroups: comp.os.vms
  853. Subject: Re: VT100 keyboard mapping to Sun X server
  854. Date: Mon, 19 Aug 1996 12:44:21 -0400
  855.  
  856. > I am stuck right now using a Sun keyboard (type 5) on systems running SunOS
  857. > and Solaris.  I would like to use EVE on an OpenVMS box with display back to
  858. > the Sun.  Does anyone know of a keyboard mapping (or some other procedure)
  859. > which will allow the Sun keyboard to approximate a VT100/VT220?
  860.  
  861. You can't get it exactly - because the keypad has one fewer key - but
  862. you can come pretty close.  Here's a set of keydefs I use:
  863.  
  864. keycode 101=KP_0
  865. keycode 119=KP_1
  866. keycode 120=KP_2
  867. keycode 121=KP_3
  868. keycode 98=KP_4
  869. keycode 99=KP_5
  870. keycode 100=KP_6
  871. keycode 75=KP_7
  872. keycode 76=KP_8
  873. keycode 77=KP_9
  874. keycode 52=KP_F1
  875. keycode 53=KP_F2
  876. keycode 54=KP_F3
  877. keycode 57=KP_Decimal
  878. keycode 28=Left
  879. keycode 29=Right
  880. keycode 30=KP_Separator
  881. keycode 105=KP_F4
  882. keycode 78=KP_Subtract
  883. keycode 8=Left
  884. keycode 10=Right
  885. keycode 32=Up
  886. keycode 33=Down
  887. keycode 97=KP_Enter
  888.  
  889. Put this in a file - I use "keydefs" in my home directory and feed it
  890. into xmodmap:
  891.  
  892.   xmodmap - <$HOME/keydefs
  893.  
  894. This takes care of the arrow keys and the "calculator" key cluster.  The
  895. "+" key will play the role of the DEC "," key.    The Sun "-" key will be
  896. like the DEC "-" key, though it's in a physically different position -
  897. where the DEC PF4 key is.  The PF4 key is ... damn, I'm not sure where
  898. "key 105" is.  I *think* it may be on the leftmost key of the group of
  899. four just above the "calculator" key cluster.
  900.  
  901. I also execute the following (this is all in my xinitrc file):
  902.  
  903. xmodmap -e 'keysym KP_Decimal = KP_Decimal'
  904. xmodmap -e 'keysym BackSpace = Delete BackSpace' \
  905.         -e 'keysym Delete = BackSpace Delete'
  906. xmodmap -e 'keysym KP_Decimal = Delete Delete KP_Decimal'
  907. xmodmap -e 'add mod1 = Meta_R'
  908. xmodmap -e 'add mod1 = Meta_L'
  909.  
  910. Beware of one thing about xmodmap:  Keymap changes are applied to the
  911. *whole workstation*, not just to individual windows.  There is, in fact,
  912. no way I know of to apply them to individual windows.  These definitions
  913. *may* confuse some Unix programs (and/or some Unix users).
  914.  
  915. If you're using Motif, you may also need to apply bindings at the Motif
  916. level.  If just using xmodmap doesn't work, I can try and dig that stuff
  917. up for you.
  918.  
  919. (end quote)
  920.  
  921.   NOTE: The rest of the problems in this section have to do with bidirectional
  922.   tty lines and the Solaris Port Monitor.  Hopefully these are all fixed in
  923.   C-Kermit 6.0.192 Beta.029, 22 Aug 96.
  924.  
  925. Reportedly, "C-Kermit ... causes a SPARCstation running Solaris 2.3
  926. to panic after the modem connects.  I have tried compiling C-Kermit with Sun's
  927. unbundled C compiler, with GCC Versions 2.4.5 and 2.5.3, with make targets
  928. 'sunos51', 'sunos51tcp', 'sunos51gcc', and even 'sys5r4', and each time it
  929. compiles and starts up cleanly, but without fail, as soon as I dial the number
  930. and get a 'CONNECT' message from the modem, I get:
  931.  
  932.   BAD TRAP
  933.   kermit: Data fault
  934.   kernel read fault at addr=0x45c, pme=0x0
  935.   Sync Error Reg 80 <INVALID>
  936.   ...
  937.   panic: Data Fault.
  938.   ...
  939.   Rebooting...
  940.  
  941. The same modem works fine for UUCP/tip calling."  Also (reportedly), this only
  942. happens if the dialout port is configured as in/out via admintool.  If it is
  943. configured as out-only, no problem.  This is the same dialing code that works
  944. on hundreds of other System-V based UNIX OS's.  Since it should be impossible
  945. for a user program to crash the operating system, this problem must be chalked
  946. up to a Solaris bug.  Even if you SET CARRIER OFF, CONNECT, and dial manually
  947. by typing ATDTnnnnnnn, the system panics as soon as the modem issues its
  948. CONNECT message.  (Clearly, when you are dialing manually, C-Kermit does not
  949. know a thing about the CONNECT message, and so the panic is almost certainly
  950. caused by the transition of the Carrier Detect (CD) line from off to on.)
  951. This problem was reported by many users, all of whom say that C-Kermit worked
  952. fine on Solaris 2.1 and 2.2.  If the speculation about CD is true, then a
  953. possible workaround might be to configure the modem to leave CD on (or off)
  954. all the time.  Perhaps by the time you read this, a patch will have been
  955. issued for Solaris 2.3.
  956.  
  957. The following is from Karl S. Marsh, Systems & Networks Administrator,
  958. AMBIX Systems Corp, Rochester, NY (begin quote):
  959.  
  960. "Environment:
  961.   Solaris 2.3 Patch 101318-45
  962.   C-Kermit 5A(189) (and presumably this applies to 188 and 190 also)
  963.   eeprom setting:
  964.     ttya-rts-dtr-off=false
  965.     ttya-ignore-cd=false
  966.     ttya-mode=19200,8,n,8,-
  967.  
  968. "To use C-Kermit on a bidirectional port in this environment, do not use
  969. admintool to configure the port.  Use admintool to delete any services running
  970. on the port and then quit admintool and issue the following command:
  971.  
  972.   pmadm -a -p zsmon -s ttyb -i root -fu -v 1 -m "`ttyadm -b -d /dev/term/b \
  973.   -l conttyH -m ldterm,ttcompat -s /usr/bin/login -S n`"
  974.  
  975. [NOTE: This was copied from a fax, so please check it carefully]  where:
  976.  
  977.   -a = Add service
  978.   -p = pmtag (zsmon)
  979.   -s = service tag (ttyb)
  980.   -i = id to be associated with service tag (root)
  981.   -fu = create utmp entry
  982.   -v = version of ttyadm
  983.   -m = port monitor-specific portion of the port monitor administrative file
  984.        entry for the service
  985.   -b = set up port for bidirectional use
  986.   -d = full path name of device
  987.   -l = which ttylabel in the /etc/ttydefs file to use
  988.   -m = a list of pushable STREAMS modules
  989.   -s = pathname of service to be invoked when connection request received
  990.   -S = software carrier detect on or off (n = off)
  991.  
  992. "This is exactly how I was able to get Kermit to work on a bi-directional
  993. port without crashing the system."  (End quote)
  994.  
  995. On the Solaris problem, also see SunSolve Bug ID 1150457 ("Using C-Kermit, get
  996. Bad Trap on receiving prompt from remote system").  Another user reported "So,
  997. I have communicated with the Sun tech support person that submitted this bug
  998. report [1150457].  Apparently, this bug was fixed under one of the jumbo
  999. kernel patches.  It would seem that the fix did not live on into 101318-45, as
  1000. this is EXACTLY the error that I see when I attempt to use kermit on my
  1001. system."
  1002.  
  1003. Later (Aug 94)...  C-Kermit dialout successfully tested on a Sun4m with a
  1004. heavily patched Solaris 2.3.  The patches most likely to have been relevant:
  1005.  
  1006. 101318-50: SunOS 5.3: Jumbo patch for kernel (includes libc, lockd)
  1007. 101720-01: SunOS 5.3: ttymon - prompt not always visible on a modem connection
  1008. 101815-01: SunOS 5.3: Data fault in put() NULL queue passed from
  1009.                       ttycommon_qfull()
  1010. 101328-01: SunOS 5.3: Automation script to properly setup tty ports prior to
  1011.                       PCTS execution
  1012.  
  1013. Still later (Nov 94): another user (Bo Kullmar in Sweden) reports that after
  1014. using C-Kermit to dial out on a bidirectional port, the port might not answer
  1015. subsequent incoming calls, and says "the problem is easy enough to to fix with
  1016. the Serial Port Manager; I just delete the service and and install it again
  1017. using the graphical interface, which underneath uses commands like sacadm and
  1018. pmadm."  Later Bo reports, "I have found that if I run Kermit with the
  1019. following script then it works.  This script is for /dev/cua/a, -s a is the
  1020. last a in /dev/cua/a
  1021.  
  1022.   #! /bin/sh
  1023.   kermit
  1024.   sleep 2
  1025.   surun pmadm -e -p zsmon -s a
  1026.  
  1027. (end quote)
  1028.  
  1029. (3.8) C-KERMIT AND SUNOS
  1030.  
  1031. Sun SPARCstation users should read the section "Setting up Modem Software" in
  1032. the Desktop SPARC Sun System & Network Manager's Guide.  If you don't set up
  1033. your serial ports correctly, Kermit (and other communications software) won't
  1034. work right.
  1035.  
  1036. Reportedly, C-Kermit does not work correctly on a Sun SPARCstation in an Open
  1037. Windows window with scrolling enabled.  Disable scrolling, or else invoke
  1038. Kermit in a terminal emulation window (xterm, crttool, vttool) under SunView
  1039. (this might be fixed in later SunOS releases).
  1040.  
  1041. On the Sun with Open Windows, an additional symptom has been reported:
  1042. outbound SunLink X.25 connections "magically" translate CR typed at the
  1043. keyboard into LF before transmission to the remote host.  This doesn't happen
  1044. under SunView.
  1045.  
  1046. SET CARRIER ON, when used on the SunOS 4.1 version of C-Kermit (compiled in
  1047. the BSD universe), causes the program to hang uninterruptibly when SET LINE
  1048. is issued for a device that is not asserting carrier.  When Kermit is built
  1049. in the Sys V universe on the same computer, there is no problem (it can be
  1050. interrupted with Ctrl-C).  This is apparently a limitation of the BSD-style
  1051. tty driver.
  1052.  
  1053. SunOS 4.1 C-Kermit has been observed to dump core when running a complicated
  1054. script program under cron.  The dump invariably occurs in ttoc(), while trying
  1055. to output a character to a TCP/IP TELNET connection.  ttoc() contains a
  1056. write() call, and when the system or the network is very busy, the write()
  1057. call can get stuck for long periods of time.  To break out of deadlocks caused
  1058. by stuck write() calls, there is an alarm around the write().  It is possible
  1059. that the core dump occurs when this alarm signal is caught.  (This one has
  1060. not been observed recently -- possibly fixed in edit 190.)
  1061.  
  1062. On Sun computers with SunOS 4.0 or 4.1, SET FLOW RTS/CTS works only if the
  1063. carrier signal is present from the communication device at the time when
  1064. C-Kermit enters packet mode or CONNECT mode.  If carrier is not sensed (e.g.
  1065. when dialing), C-Kermit does not attempt to turn on RTS/CTS flow control.
  1066. This is because the SunOS serial device driver does not allow characters to
  1067. be output if RTS/CTS is set (CRTSCTS) but carrier (and DSR) are not present.
  1068. Workaround (maybe):  SET CARRIER OFF before giving the SET LINE command,
  1069. establish the connection, then SET FLOW RTS/CTS
  1070.  
  1071. It has also been reported that RTS/CTS flow control under SunOS 4.1 through
  1072. 4.1.3 works only on INPUT, not on output, and that there is a patch from Sun
  1073. to correct this problem: Patch-ID# T100513-04, 20 July 1993 (this patch might
  1074. apply only to SunOS 4.1.3).  It might also be necessary to configure the
  1075. eeprom parameters of the serial port; e.g. do the following as root at the
  1076. shell prompt:
  1077.  
  1078.   eeprom  ttya-ignore-cd=false
  1079.   eeprom  ttya-rts-dtr-off=true
  1080.  
  1081. There have been reports of file transfer failures on Sun-3 systems when using
  1082. long packets and/or large window sizes.  One user says that when this happens,
  1083. the console issues many copies of this message:
  1084.  
  1085.   chaos vmunix: zs1: ring buffer overflow
  1086.  
  1087. This means that SunOS is not scheduling Kermit frequently enough to service
  1088. interrupts from the zs serial device (Zilog 8350 SCC serial communication
  1089. port) before its input silo overflows.  Workaround: use smaller packets
  1090. and/or a smaller window size, or use "nice" to increase Kermit's priority.
  1091. Use hardware flow control if available, or remove other active processes
  1092. before running Kermit.
  1093.  
  1094. SunLink X.25 support in C-Kermit 5A(190) has been built and tested
  1095. successfully under SunOS 4.1.3b and SunLink X.25 7.00.
  1096.  
  1097. (3.9) C-KERMIT AND ULTRIX
  1098.  
  1099. There is no hardware flow control in Ultrix.  That's not a Kermit deficiency,
  1100. but an Ultrix one.
  1101.  
  1102. Reportedly, DEC ULTRIX 4.3 is immune to C-Kermit's disabling of SIGQUIT,
  1103. which is the signal that is generated when the user types Ctrl-\, which kills
  1104. the current process (i.e. C-Kermit) and dumps core.  Diagnosis and cure
  1105. unknown.  Workaround: before starting C-Kermit -- or for that matter, when you
  1106. first log in because this applies to all processes, not just Kermit -- give
  1107. the following UNIX command:
  1108.  
  1109.   stty quit undef
  1110.  
  1111. Certain operations driven by RS-232 modem signal do not work on DECstations or
  1112. other DEC platforms whose serial interfaces use MMP connectors (DEC version of
  1113. RJ45 telephone jack with with offset tab).  These connectors convey only the
  1114. DSR and DTR modem signals, but not carrier (CD), RTS, CTS, or RI.  Use SET
  1115. CARRIER OFF to enable communication, or "hotwire" DSR to CD.
  1116.  
  1117. (3.10) C-KERMIT AND UNIXWARE
  1118.  
  1119. Using the UnixWare 1.1 Application Server, one user reports a system panic
  1120. when the following script program is executed:
  1121.  
  1122.   set line /dev/tty4
  1123.   set speed 9600
  1124.   output \13
  1125.   connect
  1126.  
  1127. The panic does not happen if a PAUSE is inserted:
  1128.  
  1129.   set line /dev/tty4
  1130.   set speed 9600
  1131.   pause 1
  1132.   output \13
  1133.   connect
  1134.  
  1135. This is using a Stallion EasyIO card installed as board 0 on IRQ 12 on
  1136. a Gateway 386 with the Stallion-supplied driver.  The problem was reported 
  1137. to Novell and Stallion, resolution pending.  (Reportedly, this problem
  1138. is now fixed.)
  1139.  
  1140. (3.11) C-KERMIT AND APOLLO SR10
  1141.  
  1142. Reportedly, version 5A(190), when built under Apollo SR10 using "make
  1143. sr10-bsd", compiles, links, and executes OK, but leaves the terminal unusable
  1144. after it exits -- the "cs7" or "cs8" (character size) parameter has become
  1145. cs5.  The terminal must be reset from another terminal.  Cause and cure
  1146. unknown.  Suggested workaround: Wrap Kermit in a shell script something like:
  1147.  
  1148.   kermit @*
  1149.   stty sane
  1150.  
  1151. (3.12) C-KERMIT AND TANDY XENIX 3.0
  1152.  
  1153. Reportedly, if you type lots of Ctrl-C's during execution of the
  1154. initialization file, ghost Kermit processes will be created, and will compete
  1155. for the keyboard.  They can only be removed via "kill -9" from another
  1156. terminal, or by rebooting.  Diagnosis -- something strange happening with
  1157. the SIGINT handler while the process is reading the directory (it seems to
  1158. occur during the SET PROMPT [\v(dir)] ... sequence).  Cure: unknown.
  1159. Workaround: don't interrupt C-Kermit while it is executing its init file on
  1160. the Tandy 16/6000.
  1161.  
  1162. (3.13) C-KERMIT AND OSF/1 (DIGITAL UNIX)
  1163.  
  1164. Reportedly, if a modem is set for &S0 (assert DSR at all times), the system
  1165. resets or drops DTR every 30 seconds; reportedly DEC says to set &S1.
  1166.  
  1167. Digital UNIX 3.2 evidently wants to believe your terminal is one line longer
  1168. than you say it is, e.g. when a "more" or "man" command is given.  This is has
  1169. nothing to do with C-Kermit, but tends to annoy those who use Kermit or other
  1170. terminal emulators to access Digital UNIX systems.  Workaround: tell UNIX
  1171. to "stty rows 23" (or whatever).
  1172.  
  1173. (3.14) C-KERMIT AND SGI IRIX
  1174.  
  1175. Reportedly on Silicon Graphics (SGI) machines with IRIX 4.0, Kermit cannot be
  1176. suspended by typing the suspend ("swtch") character if it was started from
  1177. csh, even though other programs can be suspended this way, and even though the
  1178. Z and SUSPEND commands still work correctly.  This is evidently because IRIX's
  1179. csh does not deliver the SIGTSTP signal to Kermit.  The reason other programs
  1180. can be suspended in the same environment is probably that they do not trap
  1181. SIGTSTP themselves, so the shell is doing the suspending rather than the
  1182. application.
  1183.  
  1184. Reportedly some Indys have bad serial port hardware.  IRIX 5.2, for example,
  1185. needs patch 151 to work around this; or upgrade to a later release.
  1186. Similarly, IRIX 5.2 has several problems with serial i/o, flow control, etc.
  1187. Again, patch or upgrade.
  1188.  
  1189. For hardware flow control on IRIX, use the ttyf* (modem control AND hardware
  1190. flow control) devices and not the ttyd* (direct) or ttym* (modem control but
  1191. no hardward flow control) ones, and obtain the proper "hardware handshaking"
  1192. cable from SGI, which is incompatible with the ones for the Macintosh and
  1193. NeXT even though they look the same.  "man serial" for further info.
  1194.  
  1195. (3.15) C-KERMIT AND THE BEBOX
  1196.  
  1197. The BeBox isn't a real product yet, and BeOS -- particularly the POSIX pieces
  1198. of it -- aren't finished.  As the POSIX bits are fleshed out, a lot of the
  1199. Be-specific code can Be removed.  The workarounds in this version are for
  1200. DR7, contributed by an anonymous donor, sufficient to:
  1201.  
  1202.   - set line /dev/serial2 (and probably the other serial ports)
  1203.   - set speed 115200 (and at least some of the lower baud rates)
  1204.   - connect
  1205.   - set modem type hayes (and likely others, too)
  1206.   - dial [phone number]
  1207.   - set send packet length 2048 (other lengths for both send and receive)
  1208.   - set receive packet length 2048
  1209.   - set file type binary (text mode works, too)
  1210.   (with remote kermit session in server mode)
  1211.   - put bedrop.jpg
  1212.   - get bedrop.jpg
  1213.   - get bedrop.jpg bedrop.jpg2
  1214.   - finish, bye
  1215.  
  1216. The following do not work:
  1217.   - kermit does not detect modem hangup
  1218.   - !/RUN/PUSH [commandline command]
  1219.   - running kermit in remote mode
  1220.   - using other protocols (x/y/zmodem)
  1221.   - TCP networking interface (Be's TCP/IP API has a ways to go, still)
  1222.  
  1223. (4) GENERAL UNIX-SPECIFIC HINTS, LIMITATIONS, AND BUGS
  1224.  
  1225. In version 6.0, the default C-Kermit prompt includes your current (working)
  1226. directory; for example:
  1227.  
  1228.   [/usr/olga] C-Kermit>
  1229.  
  1230. If that directory is on an NFS-mounted disk, and NFS stops working or the
  1231. disk becomes unavailable, C-Kermit will hang waiting for NFS and/or the disk
  1232. to come back.  Whether you can interrupt C-Kermit when it is hung this way
  1233. depends on the specific OS.  Kermit has called the operating systems's
  1234. getcwd() function, and is waiting for it to return.  Some versions of UNIX
  1235. (e.g. HP-UX 9.x) allow this function to be interrupted with SIGINT (Ctrl-C),
  1236. others (such as HP-UX 8.x) do not.  To avoid this effect, you can always
  1237. use SET PROMPT change your prompt to something that does not involve calling
  1238. getcwd(), but if NFS is not responding, C-Kermit will still hang any time you
  1239. give a command that refers to the current directory.  Also note that in some
  1240. cases, the uninterruptibility of NFS-dependent system or library calls is
  1241. considered a bug, and sometimes there are patches.  For HP-UX, for example:
  1242.  
  1243.   HP-UX 10.20     libc    PHCO_8764
  1244.   HP-UX 10.10     libc    PHCO_8763
  1245.   HP-UX 9.x       libc    PHCO_7747       S700
  1246.   HP-UX 9.x       libc    PHCO_6779       S800
  1247.  
  1248. You might have reason to make C-Kermit the login shell for a specific user,
  1249. by entering the pathname of Kermit (possibly with command-line switches, such
  1250. as -x to put it in server mode) into the shell field of the /etc/passwd file.
  1251. This works pretty well.  In some cases, for "ultimate security", you might
  1252. want to use a version built with -DNOPUSH (see ckccfg.doc) for this, but even
  1253. if you don't, then PUSHing or shelling out from C-Kermit just brings up a
  1254. new copy of C-Kermit (but warning: this does not prevent the user from
  1255. explicitly running a shell; e.g. "run /bin/sh"; use NOPUSH to prevent this).
  1256.  
  1257. C-Kermit will not work as expected on a remote UNIX system, when used through
  1258. the "splitvt" or GNU "screen" programs.  In this case, terminal connections to
  1259. the remote UNIX system work, but attempts to transfer files fail because the
  1260. screen optimization (or at least, line wrapping, control-character absorption)
  1261. done by this package interferes with Kermit's packets.
  1262.  
  1263. You might try the following -- what we call "doomsday Kermit" settings to
  1264. push packets through even the densest and most obstructive connections, such
  1265. as "screen" and "splitvt" (and certain kinds of 3270 protocol emulators):
  1266. Give these commands to BOTH Kermit programs:
  1267.  
  1268.   SET FLOW NONE
  1269.   SET CONTROL PREFIX ALL
  1270.   SET RECEIVE PACKET-LENGTH 70
  1271.   SET RECEIVE START 62       
  1272.   SET SEND START 62          
  1273.   SET SEND PAUSE 100
  1274.   SET BLOCK B                
  1275.  
  1276. If it works, it will be slow.
  1277.  
  1278. On UNIX workstations equipped with DOS emulators like SoftPC, watch out for
  1279. what these emulators do to the serial port drivers.  After using a DOS
  1280. emulator, particularly if you use it to run DOS communications software, you
  1281. might have to reconfigure the serial ports for use by UNIX.
  1282.  
  1283. On AT&T 7300 (3B1) machines, you might have to "stty nl1" before starting
  1284. C-Kermit.  Do this if characters are lost during communications operations.
  1285.  
  1286. Under the bash shell (versions prior to 1.07 from CWRU), "pushing" to an
  1287. inferior shell and then exiting back to Kermit leaves Kermit in the background
  1288. such that it must be explicitly fg'd.  This is reportedly fixed in version
  1289. 1.07 of bash.
  1290.  
  1291. Interruption by Ctrl-Z makes UNIX C-Kermit try to suspend itself with
  1292. kill(0,SIGSTOP), but only on systems that support job control, as determined
  1293. by whether the symbol SIGTSTP is defined (or on POSIX or SVR4 systems, if
  1294. syconf(_SC_JOB_CONTROL) or _POSIX_JOB_CONTROL in addition to SIGTSTP).
  1295. However, if Kermit is running under a login shell (such as the original Bourne
  1296. shell) that does not support job control, the user's session hangs and must be
  1297. logged out from another terminal, or hung up on.  There is no way Kermit can
  1298. defend itself against this.  If you use a non-job control shell on a computer
  1299. that supports job control, give a command like "stty susp undef" to fix it so
  1300. the suspend signal is not attached to any particular key, or give the command
  1301. SET SUSPEND OFF to C-Kermit, or build C-Kermit with -DNOJC.
  1302.  
  1303. Reportedly, the UNIX C-Kermit server, under some conditions, on certain
  1304. particular systems, fails to log out its login session upon receipt of a
  1305. BYE command.  Before relying on the BYE command working, test it a few times
  1306. to make sure it works on your system: there might be system configuration or
  1307. security mechanisms to prevent an inferior process (like Kermit) from
  1308. killing a superior one (like the login shell).
  1309.  
  1310. (5) INITIALIZATION AND COMMAND FILES
  1311.  
  1312. C-Kermit's initialization file for UNIX is .kermrc (lowercase, starts with
  1313. period) in your home directory, unless Kermit was built with the system-wide
  1314. initialization-file option (see ckuins.doc).
  1315.  
  1316. C-Kermit identifies your home directory based on the environment variable,
  1317. HOME.  Most UNIX systems set this variable automatically when you log in.  If
  1318. C-Kermit can't find your initialization file, check your HOME variable:
  1319.  
  1320.   echo $HOME      (at the UNIX prompt)
  1321.  
  1322. or:
  1323.  
  1324.   echo \$(HOME)   (at the C-Kermit prompt)
  1325.  
  1326. If HOME is not defined, or is defined incorrectly, add the appropriate
  1327. definition to your UNIX .profile or .login file, depending on your shell:
  1328.  
  1329.   setenv HOME full-pathname-of-your-home-directory  (C-Shell, .login file)
  1330. or:
  1331.   HOME=full-pathname-of-your-home-directory         (sh, ksh, .profile file)
  1332.   export HOME
  1333.  
  1334. NOTE: Various other operations depend on the correct definition of HOME.
  1335. These include the "tilde-expansion" feature, which allows you to refer to
  1336. your home directory as "~" in filenames used in C-Kermit commands, e.g.
  1337.  
  1338.   send ~/.kermrc
  1339.  
  1340. as well as the \v(home) variable.
  1341.  
  1342. Prior to version 5A(190), C-Kermit would look for its initialization file in
  1343. the current directory if it was not found in the home directory.  This feature
  1344. was removed from 5A(190) because it was a security risk.  Some people, however,
  1345. liked this behavior and had .kermrc files in all their directories that would
  1346. set up things appropriately for the files therein.  If you want this behavior,
  1347. you can accomplish it in various ways, for example:
  1348.  
  1349.  . Create a shell alias, for example:
  1350.    alias kd="kermit -Y ./.kermrc"
  1351.  
  1352.  . Create a .kermrc file in your home directory, whose contents are:
  1353.    take ./.kermrc   
  1354.  
  1355. The TAKE command does not search your UNIX PATH for command files.  If a
  1356. command file is not in the current directory, you must give a full path
  1357. specification for it.  This poses a problem for TAKE commands that are
  1358. themselves in TAKE files.  See the trick used in CKETEST.INI...
  1359.  
  1360. Suppose you need to pass a password from the UNIX command line to a C-Kermit
  1361. script program, in such a way that it does not show up in "ps" or "w" listings.
  1362. Here is a method (not guaranteed to be 100% secure, but definitely more secure
  1363. than the more obvious methods):
  1364.  
  1365.   echo mypassword | kermit myscript
  1366.  
  1367. The "myscript" file contains all the commands that need to be executed during
  1368. the Kermit session, up to and including EXIT, and also includes an ASK or ASKQ
  1369. command to read the password from standard input, which has been piped in from
  1370. the UNIX 'echo' command, but it must not include a CONNECT command.  Only
  1371. "kermit myscript" shows up in the ps listing.
  1372.  
  1373. (6) COMMUNICATION SPEED SELECTION
  1374.  
  1375. Version-7 based UNIX implementations, including 4.3 BSD and earlier and
  1376. UNIX systems based upon BSD, use a 4-bit field to record a serial device's
  1377. terminal speed.  This leaves room for 16 speeds, which are normally:
  1378.  
  1379.   0, 50, 75, 110, 134.5, 150, 200, 300, 600, 1200, 1800, 2400, 4800, and 9600
  1380.  
  1381. The remaining two are usually called EXTA and EXTB, and are defined by the
  1382. particular UNIX implementation.  C-Kermit determines which speeds are
  1383. available on your system based on whether symbols for them are defined in your
  1384. terminal device header files.  EXTA is generally assumed to be 19200 and EXTB
  1385. 38400, but these assumptions might be wrong, or they might not apply to a
  1386. particular device that does not support these speeds.  Presumably, if you try
  1387. to set a speed that is not legal on a particular device, the driver will
  1388. return an error, but this can not be guaranteed.
  1389.  
  1390. On these systems, it is usually not possible to select a speed of 14400 bps
  1391. for use with V.32bis modems.  In that case, use 19200 or 38400 bps, configure
  1392. your modem to lock its interface speed and to use RTS/CTS flow control, and
  1393. tell C-Kermit to SET SPEED RTS/CTS and SET DIAL SPEED-MATCHING OFF.
  1394.  
  1395. Some recent versions of UNIX, and/or terminal device drivers that come with
  1396. certain third-party add-in high-speed serial communication interfaces, use the
  1397. low "baud rates" to stand for higher ones.  For example, SET SPEED 50 gets you
  1398. 57600 bps; SET SPEED 75 gets you 76800; SET SPEED 110 gets 115200.
  1399.  
  1400. SCO ODT 3.0 is an example where a "baud-rate-table patch" can be applied that
  1401. can rotate the tty driver baud rate table such that 600=57600 and 1800=115k
  1402. baud.   Similarly for Digiboard multiport/portservers, which have a
  1403. "fastbaud" setting that does this.
  1404.  
  1405. The situation is similar, but different, in System V.  SVID Third Edition
  1406. lists the same speeds, 0 through 38400.
  1407.  
  1408. For further details, read the section TERMINAL SPEEDS in ckuins.doc.
  1409.  
  1410. (7) COMMUNICATIONS AND DIALING
  1411.  
  1412. The SET CARRIER command works as advertised only if the underlying operating
  1413. system and device drivers support this feature; in particular only if a read()
  1414. operation returns immediately with an error code if the carrier signal goes
  1415. away.  And, of course, if the devices themselves (e.g. modems)
  1416. are configured appropriately and the cables convey the carrier signal, etc.
  1417.  
  1418. When UNIX C-Kermit exits, it closes (and must close) the communications
  1419. device.  If you were dialed out, this will most likely hang up the connection.
  1420. If you want to get out of Kermit and still use Kermit's communication device,
  1421. you have several choices:
  1422.  
  1423.  1. Shell out from Kermit or suspend Kermit, and refer to the device literally
  1424.     (as in "term -blah -blah < /dev/cua > /dev/cua").
  1425.  
  1426.  2. Shell out from Kermit and use the device's file descriptor which Kermit
  1427.     makes available to you in the \v(ttyfd) variable.
  1428.  
  1429.  3. Use C-Kermit's REDIRECT command.  See the CKCKER.UPD file about this.
  1430.  
  1431. If you are having trouble dialing:
  1432.  
  1433.  1. Make sure the dialout line is configured correctly.  More
  1434.     about this below.
  1435.  
  1436.  2. Make sure all necessary patches are installed for your operating
  1437.     system.
  1438.  
  1439.  3. If you can't dial on a "bidirectional" line, then configure it for
  1440.     outbound-only (remove the getty) and try again.  (The mechanisms -- if
  1441.     any -- for grabbing bidirectional lines for dialout vary wildly
  1442.     among UNIX implementations and releases, and C-Kermit -- which runs on
  1443.     well over 300 different UNIX variations -- makes no effort to keep up 
  1444.     with them; the recommended method for coping with this situation is to 
  1445.     wrap C-Kermit in a shell script that takes the appropriate actions.)
  1446.  
  1447.  4. Make sure C-Kermit's SET DIAL and SET MODEM parameters agree with the
  1448.     modem you are actually using -- pay particular attention to SET DIAL
  1449.     SPEED-MATCHING.
  1450.  
  1451.  5. Try SET DIAL HANGUP OFF before the DIAL command.  Also, SET DIAL DISPLAY
  1452.     ON to watch what's happening.  See section 8 of ckuins.doc.
  1453.  
  1454.  6. Read pages 50-67 of "Using C-Kermit".
  1455.  
  1456.  7. As a last resort, don't use the DIAL command at all; SET CARRIER OFF and
  1457.     CONNECT to the modem and dial interactively, or write a script program to
  1458.     dial the modem.
  1459.  
  1460. Make sure your dialout line is correctly configured for dialing out (as
  1461. opposed to login).  The method for doing this is different for each kind of
  1462. UNIX system.  Consult your system documentation for configuring lines for
  1463. dialing out (for example, SUN SparcStation IPC users should read the section
  1464. "Setting up Modem Software" in the Desktop SPARC Sun System & Network
  1465. Manager's Guide; HP-9000 workstation users should consult the manual
  1466. "Configuring HP-UX for Peripherals", etc).
  1467.  
  1468. Symptom: DIAL works, but a subsequent CONNECT command does not.  Diagnosis:
  1469. the modem is not asserting Carrier Detect (CD) after the connection is made,
  1470. or the cable does not convey the CD signal.  Cure: Reconfigure the modem,
  1471. replace the cable.  Workaround: SET CARRIER OFF (at least in System-V based
  1472. UNIX versions).
  1473.  
  1474. C-Kermit tries to use the 8th bit for data when parity is NONE, and this
  1475. generally works on real UNIX terminal (tty) devices, but it often does not
  1476. work when the UNIX system is accessed over a network via telnet or rlogin
  1477. protocols, including (in many cases) through terminal servers.  For example,
  1478. an Encore computer with Annex terminal servers only gives a 7-bit path if
  1479. the rlogin protocol is selected in the terminal server but it gives the full
  1480. 8 bits if the proprietary RDP protocol is used.
  1481.  
  1482. If file transfer does not work through a host to which you have rlogin'd,
  1483. use "rlogin -8" rather than "rlogin".  If that doesn't work, tell both Kermit
  1484. programs to "set parity space".
  1485.  
  1486. The Encore TELNET server does not allow long bursts of input.  When you have
  1487. a TELNET connection to an Encore, tell C-Kermit on the Encore to SET RECEIVE
  1488. PACKET-LENGTH 200 or thereabouts.
  1489.  
  1490. For Berkeley-UNIX-based systems (4.3BSD and earlier), Kermit includes code to
  1491. use LPASS8 mode when parity is none, which is supposed to allow 8-bit data and
  1492. Xon/Xoff flow control at the same time.  However, as of edit 174, this code is
  1493. entirely disabled because it is unreliable: even though the host operating
  1494. system might (or might not) support LPASS8 mode correctly, the host access
  1495. protocols (terminal servers, telnet, rlogin, etc) generally have no way of
  1496. finding out about it and therefore render it ineffective, causing file
  1497. transfer failures.  So as of edit 174, Kermit once again uses rawmode for
  1498. 8-bit data, and so there is no Xon/Xoff flow control during file transfer or
  1499. terminal emulation in the Berkeley-based versions (4.3 and earlier, not 4.4).
  1500.  
  1501. Also on Berkeley-based systems (4.3 and earlier), there is apparently no way
  1502. to configure a dialout line for proper carrier handling, i.e. ignore carrier
  1503. during dialing, require carrier thereafter, get a fatal error on any attempt
  1504. to read from the device after carrier drops (this is handled nicely in System
  1505. V by manipulation of the CLOCAL flag).  The symptom is that carrier loss does
  1506. not make C-Kermit pop back to the prompt automatically.  This is evident on
  1507. the NeXT, for example, but not on SunOS, which supports the CLOCAL flag.  This
  1508. is not a Kermit problem, but a limitation of the underlying operating system.
  1509. For example, the cu program on the NeXT doesn't notice carrier loss either,
  1510. whereas cu on the Sun does.
  1511.  
  1512. On certain AT&T UNIX systems equipped with AT&T modems, DIAL and HANGUP don't
  1513. work right.  Workarounds: (1) SET DIAL HANGUP OFF before attempting to dial;
  1514. (2) If HANGUP doesn't work, SET LINE, and then SET LINE <device> to totally
  1515. close and reopen the device.  If all else fails, SET CARRIER OFF.
  1516.  
  1517. C-Kermit does not contain any particular support for AT&T DataKit devices.
  1518. You can use Kermit software to dial in to a DataKit line, but C-Kermit does
  1519. not contain the specialized code required to dial out from a DataKit line.  If
  1520. the UNIX system is connected to DataKit via serial ports, dialout should work
  1521. normally (e.g. set line /dev/ttym1, set speed 19200, connect, and then see the
  1522. DESTINATION: prompt, from which you can connect to another computer on the
  1523. DataKit network or to an outgoing modem pool, etc).  But if the UNIX system
  1524. is connected to the DataKit network through the special DataKit interface
  1525. board, then SET LINE to a DataKit pseudodevice (such as /dev/dk031t) will not
  1526. work (you must use the DataKit "dk" or "dkcu" program instead).
  1527.  
  1528. In some BSD-based UNIX C-Kermit versions, SET LINE to a port that has nothing
  1529. plugged in to it with SET CARRIER ON will hang the program (as it should), but
  1530. it can't be interrupted with Ctrl-C.  The interrupt trap is correctly armed,
  1531. but apparently the UNIX open() call cannot be interrupted in this case.  When
  1532. SET CARRIER is OFF or AUTO, the SET LINE will eventually return, but then the
  1533. program hangs (uninterruptibly) when the EXIT or QUIT command (or, presumably,
  1534. another SET LINE command) is given.  The latter is probably because of the
  1535. attempt to hang up the modem.  (In edit 169, a timeout alarm was placed around
  1536. this operation.)
  1537.  
  1538. With SET DIAL HANGUP OFF in effect, the DIAL command might work only once,
  1539. but not again on the same device.  In that case, give a SET LINE command
  1540. with no arguments to close the device, and then another SET LINE command for
  1541. the desired device.  Or rebuild your version of Kermit with the -DCLSOPN
  1542. compile-time switch (see ckuins.doc).
  1543.  
  1544. The DIAL command says "To cancel: Type your interrupt character (normally
  1545. Ctrl-C)."  This is just one example of where program messages and
  1546. documentation assume your interrupt character is Ctrl-C.  But it might be
  1547. something else.  In most (but not necessarily all) cases, the character
  1548. referred to is the one that generates the SIGINT signal.  If Ctrl-C doesn't
  1549. act as an interrupt character for you, type the Unix command "stty -a" or
  1550. "stty all" or "stty everything" to see what your interrupt character is.
  1551. (Kermit could be made to find out what the interrupt character is, but this
  1552. would require a lot of system-dependent coding and #ifdefs, and a new routine
  1553. and interface between the system-dependent and system-independent parts of the
  1554. program.)
  1555.  
  1556. In general, the hangup operation on a serial communication device is prone
  1557. to failure.  C-Kermit tries to support many, many different kinds of
  1558. computers, and there seems to be no portable method for hanging up a modem
  1559. connection (i.e. turning off the RS-232 DTR signal and then turning it back on
  1560. again).  If HANGUP, DIAL, and/or Ctrl-\H do not work for you, and you are a
  1561. programmer, look at the tthang() function in ckutio.c and see if you can add
  1562. code to make it work correctly for your system, and send the code to the
  1563. address above.  (NOTE: This problem has been largely sidestepped as of edit
  1564. 188, in which Kermit first attempts to hang up the modem by "escaping back"
  1565. via +++ and then giving the modem's hangup command, e.g. ATH0, when DIAL
  1566. MODEM-HANGUP is ON, which is the default setting.)
  1567.  
  1568. Even when Kermit's modem-control software is configured correctly for your
  1569. computer, it can only work right if your modem is also configured to assert
  1570. the CD signal when it is connected to the remote modem and to hang up the
  1571. connection when your computer drops the DTR signal.  So before deciding Kermit
  1572. doesn't work with your modem, check your modem configuration AND the cable (if
  1573. any) connecting your modem to the computer -- it should be a straight-through
  1574. modem cable conducting the signals FG, SG, TD, RD, RTS, CTS, DSR, DTR, CD,
  1575. and RI.
  1576.  
  1577. Many UNIX systems keep aliases for dialout devices; for example, /dev/acu
  1578. might be an alias for /dev/tty00.  But most of these UNIX systems also use
  1579. UUCP lockfile conventions that do not take this aliasing into account, so if
  1580. one user assigns (e.g.) /dev/acu, then another user can still assign the same
  1581. device by referring to its other name.  This is not a Kermit problem --
  1582. Kermit must follow the lockfile conventions used by the vendor-supplied
  1583. software (cu, tip, uucp).
  1584.  
  1585. The SET FLOW-CONTROL KEEP option should be given *before* any communication
  1586. (dialing, terminal emulation, file transfer, INPUT/OUTPUT/TRANSMIT, etc) is
  1587. attempted, if you want C-Kermit to use all of the device's preexisting
  1588. flow-control related settings.  The default flow-control setting is XON/XOFF,
  1589. and it will take effect when the first communication-related command is given,
  1590. and a subsequent SET FLOW KEEP command will not necessarily know how to
  1591. restore *all* of the device's original flow-control settings.
  1592.  
  1593. (8) HARDWARE FLOW CONTROL
  1594.  
  1595. SET FLOW RTS/CTS is available in UNIX C-Kermit only when the underlying
  1596. operating system provides an Application Program Interface (API) for turning
  1597. this feature on and off under program control, which turns out to be a rather
  1598. rare feature among UNIX systems.  To see if your UNIX C-Kermit version
  1599. supports hardware flow control, type "set flow ?" at the C-Kermit prompt, and
  1600. look for "rts/cts" among the options.  Other common situations include:
  1601.  
  1602.  1. The API is available, so "set flow rts/cts" appears as a valid C-Kermit
  1603.     command, but it doesn't do anything because the device driver (part of
  1604.     the operating system) was never coded to do hardware flow control.  This
  1605.     is common among System V R4 implementations (details below).
  1606.  
  1607.  2. The API is not available, so "set flow rts/cts" does NOT appear as a valid
  1608.     C-Kermit command, but you can still get RTS/CTS flow control by selecting
  1609.     a specially named device in your SET LINE command.  Examples:
  1610.  
  1611.       NeXTSTEP: /dev/cufa instead of /dev/cua, /dev/cufb instead of /dev/cub
  1612.       (68040 only; "man zs" for further info).
  1613.  
  1614.       IRIX: /dev/ttyf2 instead of /dev/ttyd2 or /dev/ttym2 ("man 7 serial").
  1615.  
  1616.  3. The API is available, doesn't work, but a workaround as in (2) can be used.
  1617.  
  1618.  4. The API is available, but Kermit doesn't know about it.  In these cases,
  1619.     you can usually use an stty command to enable RTS/CTS on the device, e.g.
  1620.     "stty crtscts" or "stty ctsflow", "stty rtsflow", before starting Kermit,
  1621.     and then tell Kermit to SET FLOW KEEP.
  1622.  
  1623.  5. No API and no special device drivers.  Hardware flow control is completely
  1624.     unavailable.
  1625.  
  1626. System V R4 based UNIXes are supposed to supply a <termiox.h> file, which
  1627. gives Kermit the necessary interface to command the terminal driver to
  1628. enable/disable hardware flow control.  Unfortunately, but predictably, many
  1629. implementations of SVR4 whimsically place this file in /usr/include/sys rather
  1630. than /usr/include (where SVID clearly specifies it should be; see SVID, Third
  1631. Edition, V1, termiox(BA_DEV).  Thus if you build C-Kermit with any of the
  1632. makefile entries that contain -DTERMIOX or -DSTERMIOX (the latter to select
  1633. <sys/termiox.h>), C-Kermit will have "set flow rts/cts" and possibly other
  1634. hardware flow-control related commands.  BUT...  That does not necessarily
  1635. mean that they will work.  In some cases, the underlying functions are simply
  1636. not coded into the operating system.
  1637.  
  1638. (9) TERMINAL CONNECTION AND KEY MAPPING
  1639.  
  1640. UNIX C-Kermit's SET KEY command currently can not be used with keys that
  1641. generate "wide" scan codes or multibyte sequences, such as workstation 
  1642. function or arrow keys, because UNIX C-Kermit does not have direct access to
  1643. the keyboard.  More about this in CKCKER.BWR.
  1644.  
  1645. However, many UNIX workstations and/or console drivers provide their own key
  1646. mapping feature.  With xterm, for example, you can use 'xmodmap' ("man
  1647. xmodmap" for details); here is an xterm mapping to map the Sun keyboard to DEC
  1648. VT200 values for use with VT-terminal oriented applications like VMS EVE:
  1649.  
  1650.   keycode 101=KP_0
  1651.   keycode 119=KP_1
  1652.   keycode 120=KP_2
  1653.   keycode 121=KP_3
  1654.   keycode 98=KP_4
  1655.   keycode 99=KP_5
  1656.   keycode 100=KP_6
  1657.   keycode 75=KP_7
  1658.   keycode 76=KP_8
  1659.   keycode 77=KP_9
  1660.   keycode 52=KP_F1
  1661.   keycode 53=KP_F2
  1662.   keycode 54=KP_F3
  1663.   keycode 57=KP_Decimal
  1664.   keycode 28=Left
  1665.   keycode 29=Right
  1666.   keycode 30=KP_Separator
  1667.   keycode 105=KP_F4
  1668.   keycode 78=KP_Subtract
  1669.   keycode 8=Left
  1670.   keycode 10=Right
  1671.   keycode 32=Up
  1672.   keycode 33=Down
  1673.   keycode 97=KP_Enter
  1674.  
  1675. Users of Linux consoles can use loadkeys ("man dumpkeys loadkeys keytables"
  1676. for details.  The format used by loadkeys is compatible with that used by
  1677. Xmodmap, although it is not definitely certain that the keycodes are
  1678. compatible for different keyboard types (e.g. Sun vs HP vs PC, etc).
  1679.  
  1680. UNIX GNU EMACS includes a "kermit" library that allows Kermit connections to
  1681. be made to other computers from within an EMACS window.  As of June 1994,
  1682. there is also a Kermit file transfer library for GNU EMACS.
  1683.  
  1684. (10) FILE TRANSFER
  1685.  
  1686. UNIX C-Kermit does not reject incoming files on the basis of size.  There
  1687. appears to be no good (reliable, portable) way to determine in advance how
  1688. much disk space is available, either on the device, or (when quotas are
  1689. involved) to the user.
  1690.  
  1691. File transfer will fail if the incoming file is bigger than your ULIMIT.
  1692. Use the UNIX ulimit command to examine or change your ULIMIT (the number is
  1693. in 512-byte blocks, i.e. 0.5K).
  1694.  
  1695. UNIX C-Kermit discards all carriage returns from incoming files when in text
  1696. mode.
  1697.  
  1698. If C-Kermit is receiving a file on a dialup connection and the connection
  1699. hangs up, the SIGHUP signal is delivered to the top-level shell, which kills
  1700. all processes (including Kermit and any of its subforks) and closes all open
  1701. files, including the file that was being received.  Even if you have told
  1702. Kermit to SET FILE INCOMPLETE DISCARD, the partially received file is kept.
  1703. See comments in ckutio.c (search for SIGHUP) for details.
  1704.  
  1705. If you SET FILE DISPLAY FULLSCREEN, and C-Kermit complains "Sorry, terminal
  1706. type not supported", it means that the terminal library (termcap or termlib)
  1707. that C-Kermit was built with does not know about a terminal whose name is the
  1708. current value of your TERM environment variable.  If this happens, EXIT from
  1709. C-Kermit and set a UNIX terminal type from among the supported values that is
  1710. also supported by your terminal emulator, or else have an entry for your
  1711. terminal type added to the system termcap and/or terminfo database.
  1712.  
  1713. If you attempt to suspend C-Kermit during local-mode file transfer and then
  1714. continue it in the background (via bg), it will block for "tty output" if
  1715. you are using the FULLSCREEN file transfer display.  This is apparently
  1716. a problem with curses.  Moving a local-mode file transfer back and forth
  1717. between foreground and background works correctly, however, with the SERIAL,
  1718. CRT, or NONE file transfer displays.
  1719.  
  1720. If C-Kermit's command parser no longer echoes, or otherwise acts strangely,
  1721. after returning from a file transfer with the fullscreen (curses) display,
  1722. and your version of UNIX is based on AT&T System V, then try rebuilding your
  1723. version of C-Kermit with -DCK_NEWTERM.  Similarly if it echoes doubly, which
  1724. might even happen during a subsequent CONNECT session.  If rebuilding with
  1725. -DCK_NEWTERM doesn't fix it, then there is something very strange about your
  1726. systems curses library, and you should probably not use it.  Tell C-Kermit
  1727. to SET FILE DISPLAY CRT or anything else other than FULLSCREEN, or rebuild
  1728. without -DCK_CURSES, and without linking with (termlib and) curses.
  1729.  
  1730. It has been observed on a couple platforms -- e.g. BSDI and QNX -- that the
  1731. curses display works properly only once.  The second and subsequent times,
  1732. the display is a mess.  The reason is unknown, the cure is unknown.  See the
  1733. comments in screenc() in ckuusx.c.  In one other case (one of the Linux
  1734. distributions), a cure was obtained by linking to a different curses library
  1735. (ncurses rather than curses).
  1736.  
  1737. Reportedly, when using "MSEND *" from a 14-character filename UNIX system to
  1738. another system (e.g. BSD) that allows longer names, with SET FILE NAMES
  1739. LITERAL, any files with 14-character names will have a space added to the end
  1740. of the name on the receiving machine (this *should* be fixed in 6.0).
  1741.  
  1742. Optimum file transfer performance is a matter of tuning parameters like packet
  1743. length, window size, control-character unprefixing, and on serial connections,
  1744. ensuring there is an effective flow control method, preferably hardware (such
  1745. as RTS/CTS).
  1746.  
  1747. However, a fully-configured C-Kermit program can be slower than a minimally
  1748. configured one simply because of its size.  A command-line-only version that
  1749. is stripped of every conceivable feature not affecting file transfer (such as
  1750. "sunos41m" for the Sun or "dellsys5r4m" for Dell) can move files faster than a
  1751. full-featured one.  Thus, it might make sense to keep a minimal version
  1752. available as well as a full-featured one.  See the files ckuins.doc and
  1753. ckccfg.doc as well as the makefile for how to do this.
  1754.  
  1755. A fairly substantial reduction in size and a noticeable improvement in speed
  1756. can be obtained simply by rebuilding C-Kermit without the debugging feature:
  1757.  
  1758.   make <entryname> KFLAGS=-DNODEBUG
  1759.  
  1760. See ckccfg.doc for more detailed information about configuration.
  1761.  
  1762. (11) EXTERNAL FILE TRANSFER PROTOCOLS
  1763.  
  1764. UNIX C-Kermit can be used in conjunction with other communications software
  1765. in various ways.  C-Kermit can be invoked from another communications program
  1766. as an "external protocol", and C-Kermit can also invoke other communication
  1767. software to perform external protocols.
  1768.  
  1769. This sort of operation makes sense only when you are dialing out from your
  1770. UNIX system.  If the UNIX system is the one you have dialed in to, you don't
  1771. need any of these tricks.  Just run the desired software on your UNIX system
  1772. instead of Kermit.  When dialing out from a UNIX system, the difficulty is
  1773. getting two programs to share the same communication device in spite of the
  1774. UNIX UUCP lockfile mechanism, which would normally prevent any sharing, and
  1775. preventing the external protocol from closing (and therefore hanging up) the
  1776. device when it exits back to the program that invoked it.
  1777. (This section deleted; see ckcker.upd.)
  1778.  
  1779. "pcomm" is a general-purpose terminal program that provides file transfer
  1780. capabilities itself (X- and YMODEM variations) and the ability to call on
  1781. external programs to do file transfers (ZMODEM and Kermit, for example).  You
  1782. can tell pcomm the command to send or receive a file with an external
  1783. protocol:
  1784.             send                receive
  1785.     ZMODEM        sz <filename>            rz
  1786.     Kermit        kermit -s <filename>        kermit -r
  1787.  
  1788. pcomm runs external programs for file transfer by making stdin and stdout
  1789. point to the modem port, and then exec-ing "/bin/sh -c xxx" (where xxx is the
  1790. appropriate command).  However, C-Kermit does not treat stdin and stdout as
  1791. the communication device unless you instruct it:
  1792.  
  1793.             send                receive
  1794.     Kermit        kermit -l 0 -s <filename>    kermit -l 0 -r
  1795.  
  1796. The "-l 0" option means to use file descriptor 0 for the communication device.
  1797.  
  1798. In general, any program can pass any open file descriptor to C-Kermit for the
  1799. communication device in the "-l" command-line option.  When Kermit is given
  1800. a number as the argument to the "-l" option, it simply uses it as a file
  1801. descriptor, and it does not attempt to close it upon exit.
  1802.  
  1803. Here's another example, for Seyon (a Linux communication program).  First try
  1804. the technique above.  If that works, fine; otherwise...  If Seyon does not
  1805. give you a way to access and pass along the file descriptor, but it starts up
  1806. the Kermit program with its standard i/o redirected to its (Seyon's)
  1807. communications file descriptor, you can also experiment with the following
  1808. method, which worked here in brief tests on SunOS.  Instead of having Seyon
  1809. use "kermit -r" or "kermit -s filename" as its Kermit protocol commands, use
  1810. something like this (examples assume C-Kermit 6.0):
  1811.  
  1812.   For serial connections:
  1813.  
  1814.     kermit -YqQl 0 -r                     <-- to receive
  1815.     kermit -YqQl 0 -s filename(s)         <-- to send one or more files
  1816.  
  1817.   For Telnet connections:
  1818.  
  1819.     kermit -YqQF 0 -r                     <-- to receive
  1820.     kermit -YqQF 0 -s filename(s)         <-- to send one or more files
  1821.  
  1822. Command line options:
  1823.  
  1824.   Y    - skip executing the init file
  1825.   Q    - use fast file transfer settings
  1826.   l 0  - transfer files using file descriptor 0 for a serial connection
  1827.   F 0  - transfer files using file descriptor 0 for a Telnet connection
  1828.   q    - quiet - no messages
  1829.   r    - receive
  1830.   s    - send
  1831.  
  1832. (11.2) INVOKING EXTERNAL PROTOCOLS FROM C-KERMIT
  1833.  
  1834.    (This section is obsolete, but not totally useless.  
  1835.     See section 8 of CKCKER.UPD.)
  1836.  
  1837. After you have opened a communication link with C-Kermit's SET LINE (SET PORT)
  1838. or SET HOST (TELNET) command, C-Kermit makes its file descriptor available to
  1839. you in the \v(ttyfd) variable so you can make it available to other programs
  1840. that you RUN from C-Kermit.  Here, for example, C-Kermit runs itself as an
  1841. external protocol:
  1842.  
  1843.   C-Kermit>set modem type hayes
  1844.   C-Kermit>set line /dev/acu
  1845.   C-Kermit>set speed 2400
  1846.   C-Kermit>dial 7654321
  1847.    Call complete.
  1848.   C-Kermit>echo \v(ttyfd)
  1849.    3
  1850.   C-Kermit>run kermit -l \v(ttyfd)
  1851.  
  1852. Other programs that accept open file descriptors on the command line can be
  1853. started in the same way.
  1854.  
  1855. You can also use your shell's i/o redirection facilities to assign C-Kermit's
  1856. open file descriptor (ttyfd) to stdin or stdout.  For example, old versions of
  1857. the UNIX ZMODEM programs, sz and rz, when invoked as external protocols,
  1858. expect to find the communication device assigned to stdin and stdout with no
  1859. option for specifying any other file descriptor on the sz or rz command line.
  1860. However, you can still invoke sz and rz as exterior protocols from C-Kermit if
  1861. your current shell ($SHELL variable) is ksh (the Korn shell) or bash (the
  1862. Bourne-Again shell), which allows assignment of arbitrary file descriptors to
  1863. stdin and stdout:
  1864.  
  1865.   C-Kermit> run rz <&\v(ttyfd) >&\v(ttyfd)
  1866.  
  1867. or:
  1868.  
  1869.   C-Kermit> run sz oofa.zip <&\v(ttyfd) >&\v(ttyfd)
  1870.  
  1871. In version 5A(190) and later, you can use C-Kermit's REDIRECT command, if it
  1872. is available in your version of C-Kermit, to accomplish the same thing without
  1873. going through the shell:
  1874.  
  1875.   C-Kermit> redirect rz
  1876.  
  1877. or:
  1878.  
  1879.   C-Kermit> redirect sz oofa.zip
  1880.  
  1881. A complete set of rz,sz,rb,sb,rx,sx macros for UNIX C-Kermit is defined in
  1882. the file ckurzsz.ini.  It automatically chooses the best redirection method.
  1883.  
  1884. (11.3) USING C-KERMIT WITH TERM
  1885.  
  1886. The "term" program provides an error-corrected, multiplexed connection
  1887. between two UNIX systems, allowing you to run multiple applications over a
  1888. single connection, for example several terminal windows and a file transfer
  1889. simultaneously.  Term depends on a communications application (such as
  1890. C-Kermit) to make the connection and then redirect it to term's standard i/o.
  1891. The advantages of using C-Kermit rather than other communication programs for
  1892. this include:
  1893.  
  1894.  . C-Kermit's script language lets you automate the entire process.
  1895.  
  1896.  . With C-Kermit's REDIRECT command, term sessions are not limited to serial
  1897.    connections, but can work over network connections (TCP/IP, X.25) too.
  1898.  
  1899. Here is an example showing how to set up a term session between two UNIX
  1900. systems with with C-Kermit (assuming the connection has already been made
  1901. by C-Kermit, e.g. by dialing up):
  1902.  
  1903.   C-Kermit> connect
  1904.   login: xxx
  1905.   Password: xxx
  1906.   $ exec term -r -s 38400 -A
  1907.   ^\c (escape back)
  1908.   C-Kermit>redirect term -s 38400 -A &
  1909.   C-Kermit>push
  1910.   $ 
  1911.  
  1912. Now you can run term clients such as trsh and tupload at the local shell
  1913. prompt.
  1914.  
  1915. (12) MISCELLANEOUS
  1916.  
  1917. If C-Kermit has problems creating files in writable directories when it is
  1918. installed setuid or setgid on BSD-based versions of UNIX such
  1919. as NeXTSTEP 3.0, it probably needs to be rebuilt with the -DSW_ACC_ID
  1920. comilation switch (see ckuins.doc).
  1921.  
  1922. Reportedly, when coming into a Sequent UNIX (DYNIX) system through an X.25
  1923. connection, Kermit doesn't work right because the Sequent's FIONREAD ioctl
  1924. returns incorrect data.  To work around, use the 1-character-at-a-time version
  1925. of myread() in ckutio.c (i.e. undefine MYREAD in ckutio.c and rebuild the
  1926. program).
  1927.  
  1928. ------------------------------
  1929.  
  1930. USER REPORTS -
  1931.  
  1932. Date: Thu, 12 Mar 92 1:59:25 MEZ
  1933. From: Walter Mecky <walter@rent-a-guru.de>
  1934. Subject: Help.Unix.sw
  1935. To: svr4@pcsbst.pcs.com, source@usl.com
  1936.  
  1937. PRODUCT:    Unix
  1938. RELEASE:    Dell SVR4 V2.1 (is USL V3.0)
  1939. MACHINE:    AT-386
  1940. PATHNAME:    /usr/lib/libc.so.1
  1941.         /usr/ccs/lib/libc.a
  1942. ABSTRACT:    Function ttyname() does not close its file descriptor
  1943. DESCRIPTION:
  1944.     ttyname(3C) opens /dev but never closes it. So if it is called
  1945.     often enough the open(2) in ttyname() fails. Because the broken
  1946.     ttyname() is in the shared lib too all programs using it can
  1947.     fail if they call it often enough. One important program is
  1948.     uucico which calls ttyname for every file it transfers.
  1949.  
  1950. Here is a little test program if your system has the bug:
  1951.  
  1952. #include <stdlib.h>
  1953. #include <stdio.h>
  1954. main() {
  1955.     int i = 0;
  1956.     while (ttyname(0) != NULL)
  1957.       i++;
  1958.     perror("ttyname");
  1959.     printf("i=%d\n", i);
  1960. }
  1961.  
  1962. If this program runs longer than some seconds you don't have the bug.
  1963.  
  1964. WORKAROUND:
  1965.     None
  1966. FIX:
  1967.     Very easy if you have source code.
  1968.  
  1969. Another user reports some more explicit symptoms and recoveries:
  1970.  
  1971. > What happens is when invoking ckermit we get one of the following
  1972. > error messages:
  1973. >   You must set line
  1974. >   Not a tty
  1975. >   No more processes.
  1976. > One of the following three actions clears the peoblem:
  1977. >   shutdown -y -g0 -i6
  1978. >   kill -9 the ttymon with the highest PID
  1979. >   Invoke sysadm and disable then enable the line you want to use.
  1980. > Turning off respawn of sac -t 300 and going to getty's and uugetty's 
  1981. > does not help.
  1982. > Also C-Kermit reports "?timed out closing /dev/ttyxx".
  1983. > If this happens all is well.
  1984.  
  1985. ------------------------------
  1986.  
  1987. (Note: the following problem also occurs on SGI and probably many other
  1988. UNIX systems):
  1989.  
  1990. From: James Spath <spath@jhunix.hcf.jhu.edu>
  1991. To: Info-Kermit-Request@cunixf.cc.columbia.edu
  1992. Date: Wed, 9 Sep 1992 20:20:28 -0400
  1993. Subject: C-Kermit vs uugetty (or init) on Sperry 5000
  1994.  
  1995. We have sucessfully compiled the above release on a Unisys/Sperry 5000/95.  We
  1996. used the sys5r3 option, rather than sys5r2 since we have VR3 running on our
  1997. system.  In order to allow dialout access to non-superusers, we had to do
  1998. "chmod 666 /dev/tty###", where it had been -rw--w--w- (owned by uucp), and to
  1999. do "chmod +w /usr/spool/locks".  We have done text and binary file transfers
  2000. through local and remote connections.
  2001.  
  2002. The problem concerning uucp ownership and permissions is worse than I thought
  2003. at first.  Apparently init or uugetty changes the file permissions after each
  2004. session.  So I wrote the following C program to open a set of requested tty
  2005. lines.  I run this for any required outgoing line prior to a Kermit session.
  2006.  
  2007.    ------ cut here -------
  2008. /* opentty.c -- force allow read on tty lines for modem i/o */
  2009. /* idea from: restrict.c -- Systsem 5 Admin book Thomas/Farrow p. 605 */
  2010. /* /jes jim spath {spath@jhunix.hcj.jhu.edu } */
  2011. /* 08-Sep-92 NO COPYRIGHT. */
  2012. /* this must be suid to open other tty lines */
  2013.  
  2014. /* #define DEBUG */
  2015. #define TTY "/dev/tty"
  2016. #define LOK "/usr/spool/locks/LCK..tty"
  2017. #include <stdio.h>
  2018.  
  2019. /* allowable lines: */
  2020. #define TOTAL_LINES 3
  2021. static char allowable[TOTAL_LINES][4] = { "200", "201", "300" };
  2022. static int total=TOTAL_LINES;
  2023. int allow;
  2024.  
  2025. /* states: */
  2026. #define TTY_UNDEF 0
  2027. #define TTY_LOCK  1
  2028. #define TTY_OKAY  2
  2029.  
  2030. main(argc, argv)
  2031. int argc; char *argv[]; {
  2032.     char device[512];
  2033.     char lockdev[512];
  2034.     int i;
  2035.     if (argc == 1) {
  2036.     fprintf(stderr, "usage: open 200 [...]\n");
  2037.     }
  2038.     while (--argc > 0 && (*++argv) != NULL ) {
  2039. #ifdef DEBUG
  2040.     fprintf(stderr, "TRYING: %s%s\n", TTY, *argv);
  2041. #endif
  2042.     sprintf(device, "%s%s", TTY, *argv);
  2043.     sprintf(lockdev, "%s%s", LOK, *argv);
  2044.     allow = TTY_UNDEF; i = 0;
  2045.     while (i <= total) { /* look at all defined lines */
  2046. #ifdef DEBUG
  2047.         fprintf(stderr, "LOCKFILE? %s?\n", lockdev);
  2048. #endif
  2049.         if (access(lockdev, 00) == 0) {
  2050.         allow=TTY_LOCK;
  2051.         break;
  2052.         }
  2053. #ifdef DEBUG
  2054.         fprintf(stderr, "DOES:%s==%s?\n", allowable[i], *argv);
  2055. #endif
  2056.         if (strcmp(allowable[i], *argv) == 0)
  2057.           allow=TTY_OKAY;
  2058.         i++;
  2059.     }
  2060. #ifdef DEBUG
  2061.     fprintf(stderr, "allow=%d\n", allow);
  2062. #endif
  2063.     switch (allow) {
  2064.       case TTY_UNDEF:
  2065.         fprintf (stderr, "open: not allowed on %s\n", *argv);
  2066.         break;
  2067.       case TTY_LOCK:
  2068.         fprintf (stderr, "open: device locked: %s\n", lockdev);
  2069.         break;
  2070.       case TTY_OKAY:
  2071.         /* attempt to change mode on device */
  2072.         if (chmod (device, 00666) < 0)
  2073.           fprintf (stderr, "open: cannot chmod on %s\n", device);
  2074.         break;
  2075.       default:
  2076.         fprintf (stderr, "open: FAULT\n");
  2077.     }
  2078.     }
  2079.     exit (0);
  2080. }
  2081.  
  2082. ------------------------------
  2083.  
  2084. (End of CKUKER.BWR)
  2085.