Chapter 22: Maintaining Mac OS X


Although Mac OS X is light years ahead of Mac OS 9 in features and capabilities, it is a much more complex operating system to decipher. New folders are everywhere, no control panels, no extensions as we knew them, fonts everywhere — sometimes it seems as though OS X is a step back. In this Chapter, you find out about the structure of the Mac OS X system architecture, some basic system maintenance, and hopefully learn the importance of a good backup.

Exploring the Mac OS X Library Folders

The core of Mac OS X hangs out in the /System folder. You can look in the /System folder hierarchy, but it is generally unwise to touch the files contained inside, a fact which is evidenced by taking a look at the permissions of the folders contained therein. This file hierarchy belongs to the system, and the only visible item is a Library folder. This folder is one of three Library folders you will be introduced to, but also the one that will be discussed the least, as its contents are beyond the scope of this book It hosts a number of important files that are beyond the scope of this book, and is where the code and resources required for core Mac OS X functionality reside. Make changes to this folder at your own risk.

The second Library folder, and perhaps the most easily located one, is found at the top level of your system disk. This folder is modifiable by those users with administrator access, and where such a user would place items in order to make their functionality accessible to all users. It holds the fonts, sounds, screen savers, and so forth that are available to all of the accounts on your computer. Resources that are required by installed applications, as well as drivers for peripheral devices, such as printers are usually found here.

Yet another Library folder can be found in each user’s home folder. This one stores personal settings, fonts, sounds, and other configuration objects for each user and can only be accessed by the corresponding user or someone with “root” access. Application support files can be stored here as well as in the /Library folder, but these items will only be available to the specific user whose Library folder it is.

Now that you have some idea of the Library folder, you should understand the concept of search paths. Simply stated, a search path is a hierarchically ordered acquisition of system resources. This hierarchy stems from Mac OS X’s security model. In general, most search paths work their way from user-specific resources to system-wide resources. The system first checks the local user Library (path ~/Library) for a resource such as a Preference pane, then checks the main Library (path /Library), and then checks the System library (path /System/Library).

Managing the main Library folder

The main Library folder (path /Library) is the repository of all the files required to make your Mac OS X user experience work. This folder is the closest thing you can find to the System Folder of Mac OS 9 or the Windows directory on a PC. It contains all the files that support the applications installed in the Applications folder (path /Applications) as well as any preference settings that apply to the Mac as a whole. The following list is not a complete list of the folders found within the main Library folder, but rather ones that you have the greatest chance of interacting with.

  • Address Book Plug-Ins: This folder is not populated by default but can be used by a third party.

  • Application Support: Contains shared libraries used by installed applications, such as Palm hotsync libraries, Adobe application support files, Shockwave libraries. Applications sometimes store files here so that other applications can share capabilities.

  • Audio: A repository for sounds used systemwide and sound-related plug-ins. If you want to make an alert sound available, save it as an AIFF sound and put it in the Alerts folder of the Sounds folder in this Audio folder (path /Library/Audio/Sounds/Alerts).

  • Caches: Holds temporary and permanent cache files used by applications.

  • CFM Support: Carbon applications will store some plugins and application specific support files here.

  • ColorSync: Holds the ColorSync profiles for a wide variety of devices and monitors in the Profiles subfolder and support AppleScripts in the Scripts subfolder. You can save some space by removing profiles for devices you don’t have.

  • Contextual Menu Items: Where you can place contextual menu items, such as QuickImageCM, that third parties have developed to extend the operating system.

  • Desktop Pictures: A collection of the TIFF and JPEG files available for use as a background picture for the Desktop. Items placed in this folder are available to all users. Each user can set a Desktop picture by using the Desktop pane of System Preferences.

  • Documentation: Holds user manuals, help files, and copyright information for installed applications and services.

  • Fonts: Contains the various font files that are not required by the System but that are available to all users of your Mac. As discussed in Chapter 12, Mac OS X supports a wide range of font formats. The Fonts folder (path /Library/Fonts) is where you install fonts you want all users to be able to access, and if there are fonts in here that you do not wish to use, you can remove them. Having said that, certain fonts (such as Arial, Helvetica, Times New Roman, and Courier New) are default fonts for a number of applications, and you should probably leave those in place.

  • Frameworks: Frameworks are another kind of shared library that is dynamic: only loaded into memory when being used. Frameworks are similar to System Extensions in OS 9.

  • Image Capture: Contains a Scripts folder in which the AppleScripts that perform the Image Capture application’s hot-plug actions (see Chapter 23) reside.

  • Internet Plug-Ins: Holds the plug-ins that add functionality to Web browsers and other Internet applications. Examples include the QuickTime Plug-in, which allows you to watch QuickTime movies in your Web browser.

  • Java: Contains, by default, an alias to the Java support files and libraries in the Library folder hierarchy of the System folder (path /System/Library). It also contains Java libraries installed for use by various Java applications.

  • Keyboard Layouts: Where keyboard layouts (analogous to keyboard scripts under OS 9) can be stored. Detailed information can be found in Apple Technical Note TN2056, http://developer.apple.com/technotes/tn2002/tn2056.html.

  • Logs: Holds the log histories (viewable with the Console utility — see Chapter 22) for applications that send debug and status information to the system console.

  • Modem Scripts: A collection of files describing the characteristics and capabilities of a wide variety of modems. You can feel free to remove the files for modems you don’t have. If you acquire a new modem, you might have to reinstall its modem script into this folder.

  • Perl: Where the scripting language Perl is installed by default on OS X.

  • Preference Panes: Where third-party System Preference panes are stored so that all users can access them. This folder is not created by a default install; an installer or system administrator can create this folder to make extra functionality accessible.

  • Preferences: Holds the .plist (property list) files describing preference and state settings for system-wide services. For example, com.apple.loginwindow.plist contains the user number (as maintained in NetInfo) for the last user to log into Mac OS X, whether that user is currently logged in; and com.apple.PowerManagement.plist contains the settings made for Energy Saver in System Preferences.

  • Printers: Contains the printer drivers and PPD files used by Print Center in recognizing, configuring, and enabling your printers.

    Cross Reference

    More on printers in Chapter 9.

  • QuickTime: Where additional codecs and other QuickTime support files should be installed. For example, Roxio Toast includes a QuickTime codec to convert to VCD MPEG (VideoCD-ready MPEG-1) format, and that file is installed here.

  • Receipts: Contains files left by the Installer application describing the changes to your Mac OS X installation after a package has been installed.

  • Screen Savers: A folder you can fill with screen saver modules to be available to all users of your Mac via the Screen Saver pane of Systems Preferences.

  • Scripts: Contains folders of AppleScript scripts that are available to all users of your computer. The scripts in this folder appear in Script Runner’s pop-up menu and in the menu of the Script Menu icon, as described in Chapter 23.

  • User Pictures: Contains folders of small pictures suitable for assigning to user accounts. Each user account can have a picture that appears in the login window’s list of user accounts. Pictures are assigned to user accounts in the Users pane of System Preferences.

  • WebServer: Holds the CGI (Common Gateway Interface) scripts that enable add-on Web server functions, such as forms submittal, for Mac OS X Web Sharing. (Turn on Web Sharing in the Sharing pane of Systems Preferences.) This folder also contains the documentation for Apache, the software that turns your Mac into a Web server.

Exploring your personal Library folder

Located in your home folder you see another folder titled Library. Many of the sub-folders in this folder have the same names as those discussed earlier in this Chapter (“Managing the main Library folder”). When you encounter a folder with the same name, it has the same functionality, except that it contains items specific to your use of the Mac rather than items for all users. As an example, you install fonts for your personal use in the Fonts folder of the Library folder in your home folder (path ~/Library/Fonts) if you aren’t making them available to other users of the Mac. Similarly, alert sounds or screen savers that aren’t shared would go in a folder of your personal Library folder.

Some of the other folders you may see in your personal Library folder include:

  • Application Support: Contains shared libraries used by applications you installed when not acting as an administrator. For example, the folder for information from your Address Book was located in Library as Addresses, but in Mac 10.2, the Addresses folder has moved to inside the Application Support folder.

  • Assistants: Contains files used by various Assistants. For example, if you were unable to connect during your initial setup to register Mac OS X, a file named SendRegistration.setup (a .plist file) is saved here with your registration information and preferences.

  • Audio: Sounds and plug-ins you install when not acting as an administrator.

  • ColorPickers: Where you find additional ColorPickers to augment the collection Apple provides.

  • Documentation: Holds user manuals, help files, and copyright information for installed applications and services that you have installed. Like the other files associated with applications installed by you when not acting as an administrator, these are not accessible to other users on the system.

  • Favorites: Where your Favorites are stored.

  • FontCollections: Where your choices for font collections (see Chapter 12) are cached.

  • Frameworks: Where the support frameworks (shared program libraries) for personal applications are stored.

  • Internet Search Sites: Contains folders for each of your Sherlock channels, each containing the search-site plug-in files for that channel. See Chapter 7 for more about Sherlock and its channels. You might not see this folder until you’ve performed at least one Internet search in Sherlock.

  • Keyboards: Contains any custom keyboard layouts you’ve installed.

  • Keychains: Holds your Keychain files (see Chapter 10 for more information about the Keychain).

  • Mail: Your personal mail folder. The Mail application (see Chapter 6) keeps its databases and other files here.

  • Preferences: Your personal preferences folder. Where applications store their preferences independently of other users, so that each user can customize the system and his applications to his heart’s content.

  • Recent Servers: Contains the URL files to the servers that you’ve recently used. These are the servers that show up under Recent Servers in the Connect to Server dialog’s pop-up menu.

  • Scripts: The repository for your personal AppleScripts, if you have any. This is one of the locations Script Runner and Script Menu check by default when you use them.

  • Stickies Database: Although not a folder, the Stickies database is found in your personal Library folder.

Depending upon what other applications you have installed or run, other folders can be found in your personal Library folder, such as OmniWeb, if you’ve installed that Web browser.

Tip

You may find at times that an application is not functioning normally. It may not open correctly, or it may just be acting strangely. One of the first actions to take is to go to the ~/Library/Preferences folder, and move any items that look like they pertain to the misbehaving application to the desktop. The application will recreate a preference file according to its default preferences. All of your changes to its settings (such as user names, save locations, or other customizations) will be lost, but the application may be restored to its normally functional state. If the application is still acting strangely, place the removed preferences back where you found them, and try some of the other suggestions found later in this Chapter. Most applications follow Apple’s preference-naming convention and will look something like com.applicationname.plist, though some create their own folders or use the software maker’s name instead of the application name.

start sidebar
One User, Multiple Accounts

Always have at least two — yes, two — user accounts on any machine. Make sure that they are both administrators, especially if there are no other users on the machine.

An important troubleshooting step when things go strange with Mac OS X is to log in as a different user, and see if the problem still occurs. If it doesn’t, then you know that the problem lies only with the first user, and is not a system-wide issue.

You may someday (we hope you never do), wake up to find that your user account will not let you log in. It tries to let you in, but you get a blue screen, or perhaps the spinning beachball of death. If you have only one user, it won’t be very fun to try and clean the mess up, but if you have another user, you can log in and try cleaning out the broken user’s Library (path ~/Library) folder to revive the user. (You can also try restarting from a second hard drive or a CD.)

end sidebar




Mac OS X Bible, Panther Edition
Mac OS X Bible, Panther Edition
ISBN: 0764543997
EAN: 2147483647
Year: 2003
Pages: 290

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net