(back to index)

Configuring Mac OS X 10.2 (general, hosts, sendmail, X11, Fink)

DO NOT USE THIS INFO FOR MAC OS X 10.3 "PANTHER"!!! Read "Configuring Mac OS X 10.3" instead.

After installing MacOS X, the Unix user will notice that nothing works.

This has to do with the fact that some of the most important features are not configured correctly, or not installed correctly.

Note that I cannot and do not guarantee that this actually works. It's only what I did and it worked on mymachine. I do not know whether it will work on your machine. Try it or don't, it's your choice and your risk. I don't think it will break anything though.

(Modified June 9th 2002 to take into account the release of MacOS X 10.1.5 and newer versions of XFree86.)

(Modified October 16th 2002 to take into account the release of MacOS X 10.2.)

(Modified October 2nd 2003 for revisions.)

General Info

Check /etc/hostconfig. You might want to make sure everything is the way you want it, like the machine's name etc.:

"sudo open -e /etc/hostconfig" (or "sudo emacs /etc/hostconfig)

(Always remember that the "sudo" command asks for your own password, not a root password.)

This file is usually configured by the system control panels, but the system control panels do not let you configure everything.

Specifically, you might want to change the machine's hostname. Assuming you want to name your machine "charlie", replace

HOSTNAME=-AUTOMATIC-

with

HOSTNAME=charlie

SSHSERVER, WEBSERVER, and APPLETALK_HOSTNAME are modified by the System Preferences Sharing panel. Do it there.

Also check the xinetd folder (/etc/xinetd.d) and consider whether you want Telnet and RLogin to run:

/etc/xinetd.d/login

service login
{
        disable         = no
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/libexec/rlogind
        groups          = yes
        flags           = REUSE
}

/etc/xinetd.d/shell

service shell
{
        disable         = no
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/libexec/rshd
        groups          = yes
        flags           = REUSE
}

/etc/xinetd.d/telnet

service telnet
{
        disable         = no
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/libexec/telnetd
        groups          = yes
        flags           = REUSE
}

But do remember that all three of them are potential security risks (if somebody with evil intentions happens to be able to access your network).

/etc/xinetd.d/ftp

(is configured by System Preferences)

Now continue to configure /etc/hosts (if you require it) and configure sendmail (see below). Then install XFree86 and Fink. Have fun!


Configuring /etc/hosts

Making MacOS X consult /etc/hosts before the DNS server seems rather difficult. In fact, even making MacOS X consult /etc/hosts AT ALL seems rather difficult.

MacOS X uses NetInfo instead of flat files, or it at least wants to do so. In order to get /etc/hosts to work and be consulted first, you should do this:
Footnotes:

[1] This will load the input into NetInfo. "hosts" is the format, "." is the current machine, "</etc/hosts" is what is used as the input. Note that this is actually redundant. It accomplishes the same goal as the next steps do. But continue anyway.

[2] FFAgent is "flat file agent", aka /etc/hosts. NIAgent is NetInfo, DNSAgent is the DNS server.

[3] If you don't know what HUP means, reboot the machine instead. Reboot the machine anyway, since lookupd can become messy when HUPped.


Configuring sendmail

Upgrade to MacOS X 10.2.

See /private/etc/mail/README.

Follow its instructions. Remember that you have to be root (or use sudo) for the nicl instructions to work. Also, add the line

define(`confDONT_BLAME_SENDMAIL', `GroupWritableDirPathSafe')

to yourdomain.mc.

Modify /System/Library/StartupItems/Sendmail/Sendmail and replace

/usr/sbin/sendmail -bd -q1h
/usr/sbin/sendmail -C /etc/mail/submit.cf -q1h

with

/usr/sbin/sendmail -OdontBlameSendmail=GroupWritableDirPathSafe -bd -q1s
/usr/sbin/sendmail -OdontBlameSendmail=GroupWritableDirPathSafe -C /etc/mail/submit.cf -q1s

Start Sendmail with

sudo -b /System/Library/StartupItems/Sendmail/Sendmail start

Also make sure /var/mail has 1777 permissions: "sudo chmod 1777 /var/mail".

You can make it start automatically when you start the system by modifying /etc/hostconfig. Change -NO- to -YES- in the mailserver line. Unless you want to run a mail server you might not need that. If you are afraid of security risks, leave it with -NO-.


Configuring X11


You can find XFree86 here:
Download both packages and install them.

You might also want to modify /etc/csh.cshrc to contain the following lines:

setenv DISPLAY localhost:0.0
setenv PATH "${PATH}:/usr/X11R6/bin"
setenv MANPATH "/usr/X11R6/man:/usr/local/man"
source /usr/share/init/tcsh/rc

(If that doesn't work, add the lines to ~/.cshrc.)

X11 should now be installed correctly.

I wrote a script that can help you to launch and shutdown XFree86.

It requires that XDarwin.app and the OroborOSX folder are installed in /Applications. XDarwin.app should be configured to run in fullscreen mode.
The script should be placed (as root) in /usr/X11R6/bin.

Don't forget to chmod +x the script.

"testx help" will display some sort of help.

(Please look at the script before you install or run it. I do not guarantee that the script works or even that it does not break anything.)

I also wrote a System Preferences panel that controls the above script. Both the script and the preferences panel are released under the GNU General Public Licence, which means you can modify them as you like but must not give anybody the source code without giving him these same rights as well.
Place the preferences panel ("TestXPane.prefPane") either in ~/Library/PreferencePanes or in /Library/PreferencePanes. Note that the first folder might not yet exist on your system; but you can simply create it if you like.

Note that the preferences panel requires the script to be correctly installed (in /usr/X11R6/bin).

All the documented parameters of the test script should work and can be used safely. The undocumented parameters (like "testx element") should not be used unless the preferences panel says so; they exist for the preferences panel to work with the file.



Installing Fink

You can go to the Fink homepage or download Fink immidiately. It's always possible that the filename of the current release changes. In that case, follow the first link and click on "Download" and download Fink from there.

Fink is an online-installer for GNU and other Free software. It does for MacOS X what YaST does for SuSE Linux (except the system configuration). Other than that Fink is also the related project that brings Unix and GNU software to MacOS X. And distribution-aware software installed via Fink will then identify itself as being part of the "Fink" distribution.

Fink can also be used to install XFree86 and OroborOSX but I found it is better to install both of them manually. The Fink installer can manage by installing an empty package that represents the XFree86 package to the distribution.

Do read the readme files that come with the Fink installer!