Shell Account Enhancements


Welcome to old-style Internet access -- souped up for your surfing pleasure! In this chapter I take you on a fast flight through the few Macintosh programs that can work over a Unix command-line interface (usually known as a Unix shell account).

I do not tell you how to use Unix in this chapter, or for that matter in any chapter. For those of you who have seen previous editions of Internet Starter Kit for Macintosh, I removed that section from this chapter. Why? Several reasons. First, with PPP and SLIP accounts now commonplace, it's much less likely that you will have to suffer with a Unix shell account. Second, and I'll be honest here, I didn't feel that my treatment was sufficiently complete. There are many other books that cover the topic more completely, and I decided that I should stick to my strength -- Macintosh software. Third and finally, by reducing the page count of the book, I'm hopefully saving a few trees.

A book that has been recommended to me in regard to learning Unix is Dave Taylor's Teach Yourself UNIX in a Week (Sams Publishing, 1994, ISBN 0-672-30464-3), mostly because analogies both to DOS and to the Macintosh are included throughout. For those that know and dislike Unix, you owe it to yourself to check out The Unix-Haters Handbook by Simson Garfinkel, Daniel Weise, and Steven Strassmann (IDG Books, 1994, ISBN 1-56884-203-1). Those already on the Internet with access to a Web browser (one wonders if they need much help with Unix at that point) might also check out the popular Internet Roadmap online class at:

http://www.brandonu.ca/~ennsnr/Resources/Roadmap/Welcome.html

Note: How can you tell if you have a shell account? Simple. If you use a terminal emulator like MicroPhone or ZTerm to connect, and once you're connected if you type Unix commands on a command line, then you're using a shell account.

Creating a program to act like a monkey and type the appropriate commands on the Unix command line is quite a bit more difficult than it might sound. The main problem is that a surprising number of variations of Unix exist, and even different sites running the same flavor of Unix may have their machines set up differently. The situation worsens when new versions of Unix programs appear with slightly different commands or slightly different results to old commands. It's a programmer's nightmare.

Thus, the few programs that can exist in this harsh environment have evolved some similar methods of coping. Almost without exception, they work by relying on the user to get them properly connected to the remote system, and from there they take over, usually connected directly to the appropriate server port for email or news or whatever. I say "whatever," but in fact, with one exception, the only two types of programs that work on Unix shell accounts are email programs and newsreaders. The exception is Homer, a client program for IRC, or Internet Relay Chat.

Actually, there is one other application, Pipeline's Internaut, that provides graphical Internet access without MacTCP or standard SLIP or PPP. Pipeline provides access to a number of Internet services, although not all the ones you might want to use, and requires a specific sort of account that isn't all that common.

However, the main solution to the problem of the Unix shell account is a program that has seriously shaken up the Internet world, The Internet Adapter, or TIA. Let's look at it first, and then at Eudora, which is another useful solution, before we spin through the remaining programs that can pretty up a Unix shell account.


The Internet Adapter


On occasion in the past, I've seen postings in which people wonder why someone hasn't written a program to enable graphical programs that normally require a MacTCP-based connection to work with a normal shell account. There are a number of graphical Internet programs, such as Pipeline's Internaut (see chapter 12, "Commercial Services") on different platforms that use a proprietary protocol for talking to the host machine, which means that you can't use the standard Macintosh Internet programs such as Eudora, Anarchie, and MacWeb. Instead you must use the limited graphical client software provided by the same people who created the proprietary protocol.

I don't approve of this method of providing Internet access for two reasons. First, and most importantly, you're seriously limited in your choice of software for any particular task. With a full MacTCP-based connection, I can choose between Anarchie and Fetch, Netscape and MacWeb, Eudora and VersaTerm-Link, NewsWatcher and InterNews and Nuntius. In fact, I may even use multiple programs for the same thing -- I like and use both Anarchie and Fetch for different types of FTP tasks. You lose that flexibility when you're locked into a proprietary solution. Second, the Internet is a vast and fast-moving place, and new capabilities appear all the time, generally supported first, and often best, by freeware and shareware programmers. If you're locked into a specific proprietary program, there's no way you could use Cornell's Internet videoconferencing software, CU-SeeMe, play Stuart Cheshire's wonderful Bolo tank game, or check the weather with Chris Kidwell's MacWeather. All of those programs depend on the standard TCP/IP protocols that the Internet relies on, and these proprietary programs, useful as they may be, don't give you a standard TCP connection to the Internet.


TIA Basics


Such is not the case with The Internet Adapter. TIA is a relatively small (about 250K) Unix program that you run on your normal Unix shell account, and it acts as a SLIP emulator. In other words, after you install TIA on your shell account, running TIA turns your shell account into a SLIP account for that session. Although a TIA emulated-SLIP account is not quite the same as a real SLIP account, TIA's SLIP emulation is completely standard in terms of working with MacTCP-based software on the Mac (or WinSock if you use a Windows machine). Version 1.1 of TIA, which should be out by the time you read this, will support PPP as well, which will be even better.

Just to repeat myself then, with the addition of a single Unix program which Cyberspace Development sells to individuals for $25 (although 1.1 will go up to $35 to help feed the TIA support staff) or sells to providers for more money, you can turn your plain old shell account into a whizzy SLIP account and use all of the MacTCP-based software I discuss in this book. I realize this all sounds a bit like a Ginsu knife commercial (did I mention how TIA can cut beer cans too?), but TIA has proven itself since its release in the summer of 1994 with over 10,000 singe user licenses sold and over 400 host and site licences. Cyberspace Development estimates that over 100,000 people now connect to the Internet via TIA.

Note: To use the graphical software I discuss later on in the book with a TIA account, you must still have MacTCP and a version of SLIP (or, once TIA 1.1 is out, PPP) installed. Don't worry about it because MacTCP, InterSLIP, and MacPPP come with this book.

TIA has become popular at sites that either aren't commercial or don't have much money to buy the expensive terminal servers that make real SLIP accounts easily possible. Since Cyberspace Development sells TIA to individuals, suddenly individual users have the choice of whether or not they get a SLIP account. Whereas in the past, if the machine didn't support SLIP, that was the end of the story. I heartily applaud putting power in the hands of the individual wherever possible; with TIA it's possible!

TIA created a huge fuss when it was first released, primarily on the part of Internet providers who felt that TIA endangered their business model, but for the most part all that fuss seems to have disappeared. A very few providers have banned TIA, but for the most part it has become a fact of life for Internet users previously limited to Unix shell accounts.


TIA Details


Note: The details that follow about how TIA turns your shell account into a SLIP account may not make much sense if you haven't looked through the chapters in part IV yet. Don't worry about it -- just skip the following section unless you're interested in how TIA works.

When you use TIA, you do not get your own IP number that uniquely identifies your Mac on the Internet while you're connected, as you do with a real SLIP account. Instead, TIA uses the IP number of the machine your shell account is on, and "redirects" traffic back to you (this is the magic part). If you must enter an IP number in some software, any number like 1.1.1.1 should do fine -- it's just a dummy address.

Note: The fact that you don't get your own IP number means that you cannot set your Mac up as an FTP server, for instance, because there's no IP number for an FTP client somewhere else to connect to.

TIA's performance is reportedly good, faster than normal SLIP in fact, and about as fast as Compressed SLIP, or CSLIP. Future releases will support CSLIP and even PPP, and will reportedly increase speed by 10 to 20 percent. TIA doesn't create much of a load for the host machine, although slightly more than a real SLIP account, mostly because when you use SLIP, you're not usually running programs on the host machine, but are just using the network connection.


Installing TIA


Installing TIA on your Unix shell account is not a completely trivial task, since you must install the proper version for the version of Unix running on your host machine. Cyberspace Development has ported TIA to a number of versions of Unix and more appear all the time (send email to [email protected] for a full list). If you don't know what version of Unix is running on your shell account, Cyberspace Development has a simple program that can find out the information for you. Current ports include those in table 14.1.

          Table 14.1: Operating Systems Supported by TIA

            Hardware       Operating System

            Sun Sparc      Solaris 2.x 
            Sun Sparc      SunOS 4.1.x 
            Sun 3          SunOS 4.1.x
            386/486        BSDI 1.0
            386/486        BSDI 1.1
            386/486        SCO
            386/486        Linux
            DEC MIPS       ULTRIX versions 4.3a (also works with 4.2, 4.4)
            DEC ALPHA      OSF/1 2.0 (also works with 3.0)
            IBM RS6000     AIX 3.2
            SGI            IRIX 4.0 (also works with 5.2)
            HP             HP-UX 9.0 (also works with 7.x)

Essentially then, you retrieve the proper version of TIA via FTP, Gopher, or the Web, and then launch it. (For evaluation purposes, you can get a free version and test it for a while -- contact Cyberspace Development for an evaluation code.) Once TIA is running, you need to enable SLIP on your Mac, which means having MacTCP and InterSLIP properly configured.

Note: Actually, unlike most shareware, for which you download the program first, then register, TIA is generally easier to register first, then download (because of how the license codes work). Cyberspace Development recommends getting an evaluation license code from marketplace.com (via email or the Web -- details following). The code comes with complete instructions for obtaining the proper version of TIA for your flavor of Unix from marketplace.com via FTP.

In normal usage you use a script -- a gateway script if you're using InterSLIP -- for your SLIP program to log in to your shell account and then run TIA to start up the SLIP emulation. But it is possible to do it manually as well. In InterSLIP, you'd leave the Dialing and the Gateway menus set to Direct Connection, log in to your shell account with a terminal emulator, start TIA, and then quit the terminal emulator, making sure that the terminal emulator doesn't hang up the phone on quit. Luckily, others have created scripts that work with TIA, so you may not have to do all the work yourself. Look for this file or others with TIA in the name in the same directory:

ftp://ftp.tidbits.com/pub/tidbits/tisk/tcp/scr-interslip-tia-netcom.txt

You can order TIA on the Internet itself if you wish (and the Web forms at marketplace.com are reportedly the easiest method, even via Lynx, a character-based Web browser that runs on Unix shell accounts). Other mechanisms are available for those who dislike ordering on the nets. A company called SoftAware sells various versions of the TIA package along with installation help and consulting (useful for those of you who aren't familiar with Unix). If nothing else, I suspect working through SoftAware will be the easiest way for individuals to buy a complete package and be up and running quickly. Contact SoftAware at [email protected] or 310-305-0275. For those who wish to try setting up and configuring TIA alone, there are several help files available on the nets. Look for:

ftp://ftp.tidbits.com/pub/tidbits/tisk/info/how-to-tia.txt

ftp://ftp.tidbits.com/pub/tidbits/tisk/info/tia-faq.hqx

In addition, Cyberspace Development has created a vast array of informational files which you can request via email. The easiest way to find out what they have available is to send email to [email protected]. For more basic information about TIA, send email to [email protected] or connect to marketplace.com over the Web or via Gopher, FTP, or Telnet:

http://marketplace.com/

gopher://marketplace.com/

ftp://marketplace.com/tia/

telnet://marketplace.com


Eudora


Steve Dorner's free Eudora email program is among the most flexible of communications programs ever. Eudora was designed to work with MacTCP (and works best in that environment), so I don't explore the details of using the program until chapter 21, "Email." I also mention it in chapter 15, "UUCP Access," because it can work with a UUCP transport program to read and write email using UUCP. But for the moment, if your Unix host supports protocols called POP (Post Office Protocol) and SMTP (Simple Mail Transport Protocol), Eudora can work with the Communications Toolbox that is standard in System 7 to dial up your Unix host and send and receive email.

Note: Although the Communications Toolbox (CTB) code is built into System 7, the CTB tools necessary to use Eudora and many other CTB-aware programs are not included with System 7. You can get them from your Apple dealer, with many communications programs like SITcomm or MicroPhone II, or on the Internet in:
ftp://ftp.support.apple.com/pub/apple_sw_updates/US/mac/n_c/comm_toolbox_tools/

The Basic Connectivity Set (BCS) is in disk image format, which is best handled by a disk image utility called ShrinkWrap, available in:
ftp://ftp.tidbits.com/pub/tidbits/tisk/util/

However, let's go over the details of setting up Eudora to work over the modem. You might also want to refer to the excellent Eudora documentation available at:

ftp://ftp.qualcomm.com/quest/mac/eudora/documentation/

Also be sure to poke around in the folder dedicated to storing preconfigured plug-ins for different providers (which would enable to you avoid the hairy part of the configuration process) and types of server hardware at:

ftp://ftp.qualcomm.com/quest/mac/eudora/dialup/


Installation and Setup


There are two drawbacks to using Eudora with the Communications Toolbox. First, it's slower than via MacTCP. Second, it's flakier, thanks to the reliance on the modem without PPP or SLIP controlling things. But if it's a choice between suffering with the Unix mail program or putting up with a few Eudora connection problems, I'll take Eudora any day.

Ask your system administrator if your Unix host supports POP for receiving mail and SMTP for sending mail, and if so, if she knows of anyone using Eudora on the Macintosh already. Once one person has customized Eudora to work on a specific machine, the customized file can work for everyone. Assuming that you're a pioneering sort and the first one to attempt this task, read on.

To modify Eudora to work over a CTB connection, you first need a template called Unix Navs which you can edit and place in your Eudora Folder, which normally lives in the System Folder. It's available at:

ftp://ftp.qualcomm.com/quest/mac/eudora/dialup/servers/unix.hqx

This template contains the conversation Eudora expects to have with your Unix host to set up everything. Such send-and-expect conversations are generally called chat scripts and are most heavily used in the UUCP world. Unfortunately, you must use ResEdit, Apple's free resource editor, to edit the Unix Navs file. If you don't have ResEdit, you might be able to get it from a power user friend, your Apple dealer, or in:

ftp://ftp.support.apple.com/pub/apple_sw_updates/US/mac/utils/

Launch ResEdit and from the File menu select Open. Open the Unix Navs file. Double-click on the lone STR# resource, then double-click on the Navigate In resource, and the third window you see should have strings that you can modify (see figure 14.1).

Figure 14.1: Eudora Unix Navs configuration in ResEdit.

If you have the Eudora manual, you can see that my settings differ from the standard ones that Steve Dorner provides. My Unix machine provided a different prompt, so I had to change the third string, and the program named srialpop in his example is named spop on my machine. You may or may not need to change those lines -- I imagine most people don't.

The first line says Eudora should send two returns (the \r strings) and then expect (the \e string) to see the login: string. The second line says that Eudora should send your username (the \u string, determined from a setting inside Eudora itself) and a return, and then expect to see ssword:, which is of course the tail end of "Password:." The third line says that Eudora should send your password (\p, again determined inside Eudora) and three returns, then expect to see the > sign at the end of the prompt (that's what my prompt looks like anyway; your prompt may look different). The \b tells Eudora not to send your password to the Progress window, should anyone be watching. Once Eudora sees the prompt, you're properly logged in. The fourth line says that Eudora should execute the spop program by sending exec spop and a return. You must ask your administrator what the name of the spop or srialpop program is on your machine if neither of those possibilities work.

Note: You might be able to determine if your Unix machine uses either of these programs. Log in normally, and when you're at the Unix prompt, type srialpop or spop. If the machine complains "Command not found," you know that's not it. If it does something, such as change the prompt, you may have hit on the right program.

If necessary for your system, you can add another line by clicking on the five asterisks after a number and going to the Resource menu and choosing Insert New Field(s). After you have configured these four strings to match your login procedure, save the file and quit ResEdit.

Next, launch Eudora. Go to the Special menu and choose Settings (see figure 14.2).

Figure 14.2: Eudora CTB settings.

The main part to worry about in this dialog is the radio button for Communications Toolbox, since you want to connect via modem to a Unix shell account rather than via MacTCP. (Check the Eudora discussion in chapter 21, "MacTCP-Based Email," for information on how to configure the standard parts of Eudora and use the program in general.) Click on the OK button to save the changes. From the Special menu again, choose Communications (see figure 14.3).

Figure 14.3: Apple Modem Tool configuration.

Eudora displays the standard Connection Settings configuration dialog. First, from the Method pop-up menu, choose Apple Modem Tool. If you don't have it, get it from a friend, your dealer, or the Internet, because it's supposedly the only one that works with Eudora. It's hidden in with the Communicate Lite demo in:

ftp://ftp.tidbits.com/pub/tidbits/tisk/term/

ftp://ftp.support.apple.com/pub/apple_sw_updates/US/mac/n_c/comm_toolbox_tools/

Type your host machine's phone number in the Dial Phone Number field. From the Modem pop-up menu, choose your modem or, if it's not listed, one from the same manufacturer, and failing that, one from Hayes. If all else fails, you can choose the Custom option in that pop-up menu and configure it yourself (this means figuring out the proper initialization string with the help of your modem manual). Finally, check the Port Settings to make sure your modem is talking at the right speed with No Parity, 8 Data Bits, 1 Stop Bit, and the appropriate Handshaking for your modem and cable (usually DTR & CTS or CTS Only). After you're done, click on the OK button to save your settings.

Note: Three things are important for using Eudora in dialup mode. First, you must have a modem with either hardware or software error correction. Dropping a single character at the wrong time can kill the POP and SMTP protocols on which Eudora relies. Second, the remote host must have hardware flow control that actually works, which isn't always true, and unfortunately you have little or no control over this. Third, you must configure the Mac properly and know your model's limitations. Steve Dorner suggests using software error control, even if the modem supports hardware error correction on PowerBooks with high-speed modems using the Apple Modem Tool 1.5, because the small hardware buffer in the serial chip can overflow at times.

Now comes the fun part -- troubleshooting. From the File menu, choose Check Mail to make Eudora to dial out and retrieve your mail. Eudora displays a progress dialog at the top of the screen that shows what's happening, one line at a time. Those lines flash by quickly, though, so watch carefully so you can see where it might get stuck (if your host actually requires more information during login, for instance). If you're lucky, it works on the first try, but don't count on it. If it works, you should read the section on Eudora in chapter 21 to figure out how to use the rest of the program. If it doesn't work, retrace your steps, try to figure what's going wrong, and if all else fails, try asking on the newsgroup comp.sys.mac.comm because many experienced Eudora users hang out there.

There's also a Eudora mailing list you can join, which is probably the best place to ask for help if you're having trouble. To subscribe, send email to [email protected] with subscribe mac-eudora-forum in the body of the message. Make sure that your return address is correct -- it's the address that will be added to the mailing list.


A Major Kludge


If all else fails, long-time Macintosh user and net citizen Murph Sewall posted this extremely clever suggestion. It's a major kludge, but if it works for Murph, it might work for you. First, download Tim Endres' Termy terminal emulator. It's in:

ftp://ftp.tidbits.com/pub/tidbits/tisk/term/

Then, configure both Termy and Eudora to use the Serial tool (not the Apple Modem Tool, as Eudora would normally want). When you want to connect, launch Termy, open a terminal window, and dial your modem by hand to connect with your Unix host. Proceed through the login normally until you get to the prompt that wants you to telnet to your POP server. Close Termy's terminal window. Since you're using the Serial tool, the modem should stay connected, and if it doesn't, check your modem initialization string to make sure the modem ignores DTR (usually something like &D0). After you close Termy's window, switch to Eudora and use it as you normally would. Murph notes that you may have to use ResEdit to modify a resource that controls the format the Telnet command -- the instructions for that are in the appendix of the Eudora manual.

When you're done, either you can open a new terminal window in Termy to log out or you may be able to get the Eudora NavigateOut resource properly configured to log out for you (but if you could do that, one would think you could get the NavigateIn resource properly configured as well). The more I think about it, the more I think this is a serious hack, but you might even be able to automate it with a program like QuicKeys if you have to use it.