Read Me About Mr Prefman

Mr Prefman is a utility to assist multiple users sharing the same Macintosh. Mr Prefman allows you to create multiple preference sets and then easily swap those sets into and out of the Preferences folder. The act of swapping sets is effectively switching your user identity.

The salient features of Mr Prefman include:

Installation and Use

Using Mr Prefman is relatively easy. The first thing to do is to run the Mr Prefman application. The first time you run the application it displays the Welcome New User dialog, shown below.

This dialog lets you enter the original user name, that is the user that owns the preferences that are currently in the Preferences folder. The original user name defaults to the Macintosh owner name, as set in the Sharing Setup dialog.

Mr Prefman then displays the main window, shown below.

The User popup menu shows you the current user and allows you to select any other user that Mr Prefman knows about. At the moment the user list contains only of the original user name you entered in the Welcome New User dialog. The New, Rename and Delete buttons let you modify the user list of users in a fairly obvious way.

If you want to share your Mac with another user you can click the New button and enter their user name into the resulting dialog. Mr Prefman will immediately make them the current user, switching out your preferences and switching in theirs. [Of course they don't have any preferences yet so there are none to switch in.] When you want to switch back to your preferences, simple run Mr Prefman again and select yourself from the User popup.

Things to Know

This section describes a pile of important things you should know about Mr Prefman.

Essential Preferences

Mr Prefman works by switching the preference files in to and out of the Preferences folder. This is OK for applications that fetch their preferences when they are run but it's a problem for other programs, like the Finder or any system extensions, that keep their preferences open all the time.

Mr Prefman gets around this by labelling such preferences as "Essential" (in the same way you would using the Finder's label menu) and never switching out any Essential preferences.

When you first launch Mr Prefman it automatically labels most of the common system preference files as Essential, so you won't need to do this yourself unless you have installed any strange extensions. If you decide that a specific preference file is used by a system extension and should not be swapped, you can simply use the Finder to label it Essential and Mr Prefman will no longer swap it.

What About My Eudora Folder?

If you are using Eudora, a very common Internet mail program, you will find that it creates a "Eudora Folder" in your System Folder (not in your Preferences folder) that holds all of your mail settings and content. Under normal circumstances this would mean that your Eudora Folder wouldn't be swapped when you change users. Mr Prefman has a special case to deal with this. It will look for a Eudora Folder in the System Folder and swap it along with the other preferences.

Preferences and Running Applications

Most applications sample their preferences when you launch them. For this reason it's not a good idea to swap out the preferences of running applications. You should quit all running applications before running Mr Prefman.

Single Operation User Changes

It's likely that you will want a single icon that you can double click to switch preferences with no fuss. The best way to do this is to create an AppleScript applet that quits all of the running applications and then switches the current user using Mr Prefman. Mr Prefman is scriptable for just this reason. There is an example script (called "Login as Quinn") that demonstrates this included in the distribution. This script requires System 7.5.

How It Works

Mr Prefman creates its own preferences folder, called "Mr Prefman Folder" inside the Preferences folder. Inside this folder it creates a "Mr Prefman Prefs" file, that records the current user and a user folder for each user it knows about. The arrangement is shown in the following diagram.

The current user's preferences are held in the Preferences folder. When called upon to change the current user, Mr Prefman moves all of the current user's preferences to their user folder and then moves all of the preferences from the new user's user folder into the Preferences folder.

Duplicate Preferences

It is possible under some strange circumstances to get duplicated preferences. Mr Prefman deals with these in a different way depending on the circumstances:

  1. If there is a preference in the Preferences folder and Mr Prefman attempts to move a preference with the same name from a user folder then Mr Prefman leaves the duplicate in the user's folder.

  2. If there is a preference in a user's folder and Mr Prefman attempts to move a preference with the same name from the Preferences folder then Mr Prefman moves the preference into the Trash beforehand.

  3. If there is a preference called "Eudora Folder" in the Preferences folder and Mr Prefman attempts to move it and the Eudora Folder from the System Folder into the user's folder then the Eudora Folder from the System Folder takes precedence and the other Eudora Folder ends up in the Trash.

Note that Mr Prefman never deletes any files. If a file gets in the way, it moves the offending file into the Trash. If it can't do that it will fail and display an error.

Aliases

Mr Prefman allows you to use an alias in place of the "Mr Prefman Folder" or any of the user folders. The user name of an alias to a user folder is the name of the alias, not of the destination folder. Also all aliases must be to an item on the same disk as the Preferences folder. [Why? Because otherwise Mr Prefman would have to copy the preferences, instead of moving them, and that's just too hard.]

Preferences in the System Folder

A number of applications store their preferences in the System Folder, either because they're old and haven't be revised for System 7, or because they're stupid. Mr Prefman has specific provisions for dealing with the most common of these, the Eudora Folder, but you can extend this functionality using ResEdit. The 'STR#' resource with ID 132 contains a list of items that, if they're found in the System Folder, are considered preferences, suitable for swapping. The program ships with one entry in this resource, the "Eudora Folder". You can use ResEdit to extend this resource to included other System Folder preferences.

Wrapup

The Future

Mr Prefman has a number of obvious extensions that I'm reticent to embark upon because I'm unsure as to whether the time taken to implement them is justified. These include:

If you have a special need for these features, please drop me a line and tell me about it.

Version History

Mr Prefman was originally prototyped in FaceSpan as an exercise in learning how to use this outrageously cool environment. Unfortunately Mr Prefman, due to its high reliance of AppleScript and the Scriptable Finder, was a little slow (it took about 5 minutes to launch when you had 100 items in your Preferences folder) so it had to be rewritten. FaceSpan worked really well though!

Version 1.0b1 is the first released version.

Credits

Mr Prefman was written by Quinn "The Eskimo!" in an attempt to stop people haranguing him about Internet Config's lack of support for multiple users on the same machine. Although IC provides API level support for such a feature, building something on top of this API would only solve the problem for IC aware applications, which obviously aren't in the majority.

The latest version of Mr Prefman should be available from <http://anarchistturtle.com/Quinn/WWW/>

Mr Prefman is distributed as Freeware. If you like it, please drop me a line.

Share and Enjoy.

Quinn "The Eskimo!"
<http://www.AnarchistTurtle.com/Quinn/WWW/>
<http://www.AnarchistTurtle.com/Quinn/WWW/>
7 Sep 1995