Netatalk, Linux and the Macintosh

With Netatalk, you can drag and drop files from Linux to Mac and back, share system resources and more.

Unix workstations, PCs running Windows 3.x/95/NT/Linux, FreeBSD, and other systems must be able to communicate seamlessly and share data whether they are in an engineering, business or home environment. More than one type of computer platform existing on the same network is a fact of life. Fortunately, with programs such as Netatalk it's easy to get Apple Macintosh computers and Linux systems to coexist and share resources. This article describes what Netatalk is, what it does, where to get it, and how to install, configure and test it. We also included a short technical description of how Netatalk works.

If you have a Mac and want to run Linux, you can use MkLinux (see LJ #31, page 55). If you have a PC and want to run MacOS, you can use Executor (see LJ #19, page 40). However, if you have both machines and want to let each do what it does best, use Netatalk. Netatalk lets you keep the operating systems separate while enabling you to transfer files and share printer resources. I paid my dues to wear a Linux T-shirt—I love Linux. I also love my Mac—for entirely different reasons. Since I use the two systems for different purposes, it is often necessary for the two to communicate.

You can transfer small files with a floppy disk (a.k.a. SneakerNet). When the file size exceeds the 1.44MB floppy limit, however, the solution is FTP—fast and efficient, but cumbersome when moving multiple directories containing subdirectories. The ideal solution is to mount the Linux file system on the Mac desktop, then drag and drop files and directories as you do under the normal MacOS. This is exactly the solution that Netatalk gives you. You can also use Netatalk to send print jobs to the Linux printer from the Mac, thereby sharing other system resources.

Figure 1. Linux Files and Directories on the Macintosh Desktop

At the time of this writing, the most recent version of Netatalk is 1.4b2. Don't let the beta suffix scare you; Netatalk is stable, especially for the PC platform. Current development emphasizes new platforms (see Table 1) such as FreeBSD and Solaris—hence the beta appellation. The primary Netatalk host site and directory is: ftp://terminator.rs.itd.umich.edu/unix/netatalk/. From that address all you need to do is download the single file netatalk-1.4b2.tar.gz. You can uncompress and untar Netatalk with normal Linux commands such as:

gunzip netatalk-1.4b2.tar.gz
tar xvf netatalk-1.4b2.tar

or:

tar xzvf netatalk-14b2.tar.gz

Figure 2. One of Several Netatalk Web Pages

Note that prior to the release of Linux 2.x, installation of Netatalk required that the Datagram Delivery Protocol (DDP) software be integrated into the kernel. Now that DDP is part of the Linux kernel, all you need to do is make sure that you turn on Appletalk during kernel configuration. Do this by specifying the kernel configuration option as:

CONFIG_ATALK=y

You should always use the README files that accompany the Netatalk distribution as the ultimate authority for installation instructions. Since Netatalk is offered for several platforms, as shown in Table 1, there are actually several different README files. Each operating system has its own defaults for file locations. For this reason, the Makefile that comes with Netatalk provides user-defined variables that you can change to alter the installation and ultimately the file structure. For the Linux installation, I used the default values and the installation worked flawlessly.

The DESTDIR variable in the Makefile points to the directory where binaries are placed. The default for this directory is /usr/local/atalk and does not need to be altered. Note that setting DESTDIR causes all installation-relative pathnames to be set correctly. The other important variable is MANDIR, by which you can specify the location of the man pages. The default for this directory is /usr/man, and again does not need to be changed.

Installation to make all binaries begins with the ubiquitous command:

make

To install the binaries at the root of the source tree, type:

make install
Pretty easy! Now let's go on to configuration.

______________________

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState