Mac-Terminal(1).pdf

(22 KB) Pobierz
The MacTerminal MINI-HOWTO
The MacTerminal MINI−HOWTO
The MacTerminal MINI−HOWTO
Table of Contents
The MacTerminal MINI−HOWTO. ................................................................................................................1
Robert Kiesling. .......................................................................................................................................1
1. Introduction. ........................................................................................................................................1
2. Setting up a serial link.. .......................................................................................................................1
3. Client−server connection with kermit.. ...............................................................................................1
4. Logging in via kermit. .........................................................................................................................1
5. Conclusion.. .........................................................................................................................................1
1. Introduction. ........................................................................................................................................1
2. Setting up a serial link.. .......................................................................................................................2
3. Client−server connection with kermit.. ...............................................................................................3
3.1 Macintosh resources. .........................................................................................................................4
4. Logging in via kermit. .........................................................................................................................4
4.1 Other Mac terminal programs.. ..........................................................................................................5
5. Conclusion.. .........................................................................................................................................5
i
184432155.002.png
The MacTerminal MINI−HOWTO
Robert Kiesling
v1.4, 9 November 1997
This mini HOWTO describes the 1,002nd use for a dead Macintosh (grin): how to configure the Mac for use
as a Linux terminal. Configurations using getty and the terminal program kermit are described, as well as
using kermit peer−to−peer networking between between Linux and a Macintosh. This document may be
reproduced freely, in whole or in part, provided that any usage conforms to the general copyright notice of
the HOWTO series of the Linux Documentation Project. See the file COPYRIGHT for details. Send all
complaints, suggestions, errata, and any miscellany to kiesling@terracom.net , so I can keep this document as
complete and up to date as possible.
·
·
This mini−HOWTO should give you some Insanely Great ideas for how to make your Macintosh work with
Linux. Unfortunately, I have been very busy, and so I haven't been able to include even half of what I wanted
to include, like using MacTCP and Open Transport to connect to your Linux box via a PPP line. That will
need to wait for future versions.
This mini−HOWTO doesn't cover networking with LocalTalk and AppleTalk, either. I might explore these
avenues if there's enough interest in, say, printing to a LaserWriter printer from Linux. Otherwise, it seems to
me that such applications, being more trouble than they're worth (not to mention pricey), are beyond the
scope of this document.
I don't plan to cover MkLinux in this document, either. It's more than adequately documented elsewhere.
The MacTerminal MINI−HOWTO
1
184432155.003.png
The MacTerminal MINI−HOWTO
So if you have ideas for this document, drop me a line at the e−mail above. Both systems embody a lot of the
beginner's mindset as well as technical prowess, and in my opinion they don't talk to each other nearly
enough.
To set up a serial link between a Mac and a Linux machine, you will need, on the Linux side, either a DB9
Female−to−DB25 Male serial cable or a DB25 Female−to−DB25 Male serial cable, depending on your serial
port. On the Macintosh side, you will need a DIN9−to−DB25 Male high−speed modem cable.
Make sure that the cable is labeled a "high speed" cable, because some older Macintosh cables are configured
with their handshaking lines tied high, which makes them useless for high−speed serial connections.
You will also need a null modem adapter, available at Comp USA, Radio Shack, and similar outlets, and a
DB25 Female−to−DB25 Female serial gender changer to connect the two serial cables.
I have heard that Mac printer cables are really null modem cables in disguise, but I can't confirm this. Some
of them are DIN9−to−DIN9 anyway, and wiring one into a serial link would be more trouble than it's worth.
If this sounds like Greek to you, read the Serial−HOWTO for details of RS−232 cable configurations and
data transmission protocols.
Before connecting the Mac and the Linux machines, you should determine that you have a working serial
port on both machines, either by connecting a modem and dialing out to another computer with
minicom (Linux), ZTerm (Mac), kermit (either), or the communications program of your choice.
The latest version of minicom is available from sunsite.unc.edu/pub/Linux/apps/serialcomm/dialout and
mirror sites.
ZTerm is a complete, easy to use comm program. Unfortunately, it's shareware. A current version is available
from mac.archive.umich.edu and outlets like it.
The kermit program has been ported to every computer and operating system in existence. The archives are
You should strongly consider using kermit on both machines at this stage at least, because 1) it's free
(although it's not covered by the Free Software Foundation's General Public License); and 2) it's a lot less
confusing to have kermit on both machines than two completely different communications programs.
If you have another way to determine that the serial ports of the two machines are operational, feel free to use
that. The point is to ensure that both machines have working serial ports.
Making the actual serial connection should be easy, given the directions above. In case it isn't, the connection
looks like this:
Linux PC DB9− or DB25− Null Gender DIN9−to− MacBox
−−−−−−−−− to−DB25 male Modem Changer DB25 Mac −−−−−−−−
| | serial cable. | | | | Serial Cable | |
| |−−−−−−−−−−−−−−−−−| |−−| |−−−−−−−−−−−−−−−−−| |
2. Setting up a serial link.
2
184432155.004.png 184432155.005.png
The MacTerminal MINI−HOWTO
| | | | | | | |
−−−−−−−−− Adapter −−−−−−−−
This is the most transient of all the configurations described here. It requires the least amount of system
configuration, although in operation, it is the more difficult to use of the systems described here.
In brief, you start kermit on both the Linux machine and the Mac, and place one of them in server mode. It
doesn't matter which machine is the client ant which is the server, because this is a peer−to−peer connection.
However, the Linux kermit can take advantage of Linux's superior scripting abilities, so it seems logical (to
me at least) to designate the Linux−side kermit as the server, because this is the more readily automated
task.
You should ensure that kermit is installed correctly on both the Mac and the Linux PC. Follow the
instructions in the respective kermit distributions. On the Linux machine type kermit at the shell prompt to
start it. You may need root permissions in order to set the port and baud rate.
kermit , the recent POSIX versions for Unices, supports baud rates up to 115 Kbps. The more recent
Macintosh versions support serial port speeds up to 57.6 Kbps. This should be more than sufficient for any
dumb tty−type application, but if you need a higher−speed connection, you're s.o.l, as far as kermit and
serial lines are concerned. However, kermit provides facilities for communication over a TCP/IP link, but I
haven't been able to test it. See the alternative in the following sections. Just remember, especially on the Mac
side, to use a different port for kermit serial connections than your TCP/IP connections, because Mac
kermit will rudely hose a serial port that is already in use.
With that in mind, your .kermrc file would contain something like this:
echo Executing site initialization file /usr/local/bin/ckermit.local.ini....
set prompt Chanel3 >
set line /dev/ttyS0
set baud 38400
set send packet−length 2000
set receive packet−length 2000
set block 3
set file type binary
Then, in your ~/.kermrc file, you would have a line like
take /usr/local/bin/ckermit.local.ini
On the Macintosh side, set the same communication parameters for bps, stop bits, parity, and word length.
Some older versions of Mac Kermit do not support 2k packets, so you might need to set a smaller packet size.
Howerver, kermit sets the communication packet length based on the receive packet−length setting, so you
need to set a shorter packet size on the Linux end, too.
To actually communicate over the link, you need to enter server mode on either the Mac or Linux side. It
doesn't matter which. See the kermit docs for details of server mode.
3. Client−server connection with kermit.
3
184432155.001.png
Zgłoś jeśli naruszono regulamin