Archived - Mac OS: Rebuilding Desktop File and icon recovery
This article describes the Desktop file, when and how to rebuild it (such as when icons appear as "generic" document or application icons), why the Desktop file will not rebuild sometimes, and what to do in this case.
This article applies to Mac OS 9 and earlier, and to the Classic environment in Mac OS X 10.0 through 10.4 on PowerPC-based Macs.
Note: Generic icons in System 7 through Mac OS 9 are normal in certain views. When viewing a window in List View at the smallest icon size selected under View Options (or Views control panel in System 7) the icons appear in their generic forms. This is normal and no troubleshooting should be done to try to recreate the detailed icon. To see the full icon, change the icon size to any of the larger sizes under View Options. If the icon still appears in its generic form, then follow the other steps listed in this article. This occurs only when viewing "as List" (or "by Name" or other list view in System 7) under the View menu for a given window.
What is the Desktop File?
The Desktop file is an invisible file found in the main level of your hard disk in Mac OS 9 or earlier. It is the file that keeps track of all the documents and applications that are on your disk. System 7.0 and later versions use the invisible files named Desktop DB and Desktop DF.
When to rebuild the Desktop File
Occasionally, your Desktop file may become too large or may become unusable. It is generally a good idea to rebuild your Desktop file once a month or so in Mac OS 9 or earlier.
Symptoms of an unusable Desktop File
One symptom is that the computer reports that the application that created the document cannot be found When double-clicking a document.
Another symptom is that icons on your desktop appear as "generic" rather than "custom" icons. Rebuilding the Desktop file may solve this situation.
The Desktop file manages all icons on a particular hard disk or floppy disk. When you insert a new or customized icon, the Desktop file may not load it or may load a previous version of the icon. To have the special icon appear on the desktop, the Desktop file must be rebuilt to update the Desktop file and register the icon.
Icons change to generic document (Figure 1) or application (Figure 2) icons for several reasons, including the following:
- Utilities such as compression or security software can alter icons.
- Custom icons become damaged or are deleted.
- The Desktop file is unusable.
- Applications that create files may not assign icons to the files.
- An application that created a file and assigned an icon may no longer be available.
- A file may have lost the bit that indicates a custom icon (this is known as the bundle bit).
Figure 1 Generic Document Icon
Figure 2 Generic Application Icon
Symptoms of a large Desktop File
If the Desktop file becomes too large, the computer may have difficulty reading it efficiently and speedily. This can cause the Finder to access files very slowly in Mac OS 9 or earlier. Rebuilding the Desktop file can clean up old information and speed up Finder access.
You can also make a file-by-file backup of the disk, reinitialize the disk, and then restore the files. This regroups all the files, unfragments them, and increases the efficiency of the disk.
How to rebuild Desktop File
Rebuilding the Desktop file relinks documents to their correct applications and rewrites the Desktop file itself.
Before rebuilding the Desktop file, be sure that you have some room available on the hard disk. The Desktop rebuilding process requires hard disk space, and cannot successfully complete without it. A good guideline is to always have 5 percent of the hard disk or other volume available as free space.
This procedure only works when the Finder is loaded. Applications like At Ease don't load the Finder, so you must turn them off prior to rebuilding the Desktop file.
Note: Be aware that when you rebuild the Desktop file that if the computer has system software earlier than System 7.5 Update 2.0, you will lose any notes you have typed in the comment box in the Get Info windows of your files.
System 6 through System 7.1.2
You can rebuild the Desktop manually by holding down the Option and Command (Apple) keys while the computer starts up. (See Figure 3.) Click OK when you see the message "Are you sure you want to rebuild the Desktop file on the disk "your disk"? Comments in info windows will be lost."
System 7.5 through Mac OS 9
1. Before you rebuild the Desktop file, use the Extensions Manager to save a record of the extensions that are turned on. To do this, open the Extensions Manager control panel. Then choose Save Set from the Sets pop-up menu. When the Save Set dialog box opens, type a name for the selected extensions such as "My Extensions". When you close the dialog box, the name of your set is added to the Sets pop-up menu.
2. Turn off all extensions--Click on the Sets pop-up menu again and choose All Off.
3. Use the step appropriate for your system software version.
- - System 7.5 through System 7.5.5
- Turn on the Macintosh Easy Open control panel -- Find it in the list of control panels, click it to put a checkmark beside it.
- Turn on the Mac OS Easy Open control panel -- Find it in the list of control panels, click it to put a checkmark beside it.
- Turn on the PC Exchange control panel -- Find it in the list of control panels, click it to put a checkmark beside it.
- Turn on the File Exchange control panel -- Find it in the list of control panels, click it to put a checkmark beside it.
4. Restart your computer while pressing the Command and Option keys. (See Figure 3.)
Figure 3 Command and Option keys
5. When you see a dialog box with the message, "Are you sure you want to rebuild the Desktop file on the disk "your disk"?," release the keys and click OK. (With system software earlier than Mac OS 7.6, you may see a message about comments in Get Info windows being lost.)
6. When the Desktop file is rebuilt, Choose Control Panels from the Apple menu.
7. Open the Extensions Manager control panel.
8. Turn your extensions back on--Click on the Sets pop-up menu and choose the name you gave your set of extensions in step 1.
9. Restart the computer.
Mac OS X 10.0 through 10.4.x
In Mac OS X, rebuilding the Desktop file is only applicable to the Classic environment:
- 1. Choose System Preferences from the Apple Menu.
2. Click the Classic icon.
3. Click the Advanced tab.
4. Click Rebuild Desktop.
Why the Desktop File sometimes may not rebuild
There are several reasons why you may have difficulty rebuilding the Desktop file.
A Conflicting System Extension
A system extension can sometimes interfere with rebuilding the Desktop file in Mac OS 9 or earlier. To resolve the situation you can try the following:
For versions of System 6, remove all non-Apple extensions from the System Folder. Then rebuild the Desktop file by holding down the Option and Command keys while starting the computer. (See Figure 3.)
For System 7 through 7.1.2, rebuild the desktop with extensions off following these steps:
- 1. Hold the Shift key down while the computer starts up.
2. As soon as you see "Welcome to Macintosh Extensions Off", release the Shift key and hold down the Command and Option keys. (See Figure 3.)
3. Continue pressing the Command and Option keys until the dialog asks you if you are sure you want to rebuild the Desktop file.
4. Release the keys and click OK.
For System 7.5 and later use the procedure in the previous section which utilizes the extensions manager.
If you have used compression or security utilities, and the preceding solutions do not work, contact the vendors for a solution.
Not enough memory to Rebuild
Changing the size of the Finder's partition should not be necessary under System 7, as was sometimes necessary under System 6. The only way to change the size of the Finder's partition under System 7 is either by using ResEdit or by starting up with System 6.0.x, and changing the partition there.
The Finder needs to do a little different work under System 7 than it did under System 6.0.x. The system is using the Desktop Database, rather than the Resource Manager, which relieves that bottleneck in the system. The Finder can get some additional memory from other places, like the System Heap, if necessary.
There really is no reason that you should need to alter the partition size of the Finder under System 7.
Increasing the Finder's partition sets aside more memory for the Finder and increases the size of your System Heap. In doing this, you set aside the memory for the System Heap but decrease the amount of memory for applications.
If you want to try changing the partition by starting up with System 6.0.x, here are the instructions. (Doing this requires you to start up from a System 6.0.x disk, and most Mac computers introduced after the release of System 7, including Quadra and PowerBook computers, are not able to use this option.)
Here are the steps for Macintosh computers that can start up under System 6.0.x:
- 1. Restart your Macintosh from a startup floppy disk that has System 6, like the 800K Disk Tools disk from the Personal Upgrade Kit (not the high-density Disk Tools disk, which contains System 7).
2. Locate and click the Finder file in your System Folder on your Macintosh hard drive (not the Finder on the floppy).
3. Choose Get Info from the File menu and increase the amount of memory allocated to the Finder in the Current size box.
4. Close the Get Info window.
5. Restart your Macintosh (from the hard drive) under System 7 once again.
What to Do If Rebuilding the Desktop Does Not Restore Your Icons
If rebuilding the does not restore your icons, run Disk First Aid to see if there is something you can fix. If you have specific files (other than custom icons) that became generic icons, there are these possibilities:
- You may not have the applications that originally created them.
- These files may have lost their bundle bit. If running Disk First Aid does not correct the problem then third party tools such as Norton Utilities, TechTool Pro, and other disk utilities can correct lost bundle bits.
- The application that created them may simply not assign an icon to them; check with the application's vendor.
- You may be using custom icons, which the Desktop file cannot rebuild. For more information, see this article.