Using Linux to provide Macintosh services - Page 2

 By Stew Benedict | Posted Oct 7, 2000
Page 2 of 3   |  Back to Page 1
Print ArticleEmail Article


~                 "Home"
/opt/appleshares        "Apple Group Share"   

This directory should have open rw settings for all users:

chmod gao+rw /opt/appleshares         (as root)

I set the ownership to ftp.users:

chown ftp.users /opt/appleshares     (again as root)

Here is a snippet of /etc/atalk/AppleVolumes.system:
# Last Updated July 8, 1999
# Use at your own risk. No guarantees express or implied.
.        "TEXT"  "ttxt"      ASCII Text                     
SimpleText                text/plain

.mf       "TEXT"  "*MF*"      Metafont                       Metafont
.sty      "TEXT"  "*TEX"      TeX Style                      Textures
.psd      "8BPS"  "8BIM"      PhotoShop Document             Photoshop
.pxr      "PXR "  "8BIM"      Pixar Image                    Photoshop
.sea      "APPL"  "????"      Self-Extracting Archive        Self 
Extracting Archive
.apd      "TEXT"  "ALD3"      Aldus Printer Description      Aldus 
.pm3      "ALB3"  "ALD3"      PageMaker 3 Document           PageMaker

You get the picture. This file is quite large and outlines many of the various file types known to an Apple system.

You also need to verify or add the following lines in /etc/services:

rtmp             1/ddp     # Routing Table Maintenance Protocol
nbp             2/ddp     # Name Binding Protocol
echo             4/ddp     # AppleTalk Echo Protocol
zip             6/ddp     # Zone Information Protocol
afpovertcp         548/tcp # AFP over TCP put
afpovertcp          548/udp

You can also make an entry in /etc/afpd.conf if you like, with a welcome message to users logging on:

--loginmesg "Welcome to OmniBook at AYSNet"

When I bought an iMac, I was somewhat surprised to find that printer drivers for Macintoshes are not commonplace. I already owned an HP693C printer that was perfectly functional, but unfortunately, it had no drivers for Macintoshes. Linux and netatalk proved to be a cheap fix in this case. On the Macintosh end, I selected a color Postscript driver for the Color LaserWriter 12/600. I then configured papd to pass this postscript output through ghostscript and convert it to the native pcl language that the HP printer expected. Because Linux, like other Unixes and Macintoshes, considers Postscript to be the traditional print language, most Linux distributions come with a full complement of conversion tools to convert Postscript to native printer formats.


Nec Silentwriter 95:\
    :pr=|lpr -Psilentwriter:op=imac:\

HP DeskJet 693C:\
    :pr=|lpr -PDeskJet:op=imac:\

These printers have already been set up on the Linux side. What we are doing here is telling the papd daemon the name of the .PPD file the Macintosh is going to use as a printer driver, and which Linux print queue to pass the job to. The PPD files can usually be found on your MacOS CD or from the various printer manufacturers' sites. As you can see, I'm user a color laser printer driver for the DeskJet; ghostscript on the Linux side will take care of converting the postscript to the native language the printer wants to see.

Assuming you have a Red Hat-style init setup, you can start the services with:

/etc/rc.d/init.d/atalk start

Give this a few minutes to start up, as atalkd scans your network initially.

Now you're ready to try things out from the Macintosh side. Assuming you already have AppleTalk and TCP/IP configured on the Mac, open the Chooser and choose AppleTalk. You should see the name of your server in the list on the right hand side, as shown in Figure 1.

Figure 1: Select AppleTalk in the Chooser.

Converting PPD files

I had to convert the PPD files from Mac-style text to Unix style, or papd complained about long lines. The Alpha editor on the Macintosh did this job nicely. (This is a powerful programming editor that can be downloaded from ftp://mojo.cs.umd.edu//Alpha/packages/.) You should have already tested Postscript printing to the device from Linux. printtool on Red Hat-based systems is good for setting up and testing printers. You may have to fine-tune some settings on the Mac side as far as fonts, but for the most part you are ready to go.

Select the server and click OK. After a brief verification, you should see the available shares--in this case, Home and Apple Group Share, as shown in Figure 2.

Figure 2: The available shares.

For the group share, you can log in as guest without a password. But for Home, you need to enter your username and password, used on the Linux system (see Figure 3).

Figure 3: Log in with your username and password.

When you're logging in to the group share, your password must be eight characters or less. I also noticed that the Macintosh would pull up my whole name, rather than my username, so I had to overwrite it.

Comment and Contribute
(Maximum characters: 1200). You have
characters left.
Get the Latest Scoop with Enterprise Networking Planet Newsletter

By submitting your information, you agree that enterprisenetworkingplanet.com may send you ENTERPRISENetworkingPLANET offers via email, phone and text message, as well as email offers about other products and services that ENTERPRISENetworkingPLANET believes may be of interest to you. ENTERPRISENetworkingPLANET will process your information in accordance with the Quinstreet Privacy Policy.