Besides the Dock, the Desktop is one of the other highly used and customized items in OS X. People can change the background, what items are displayed on it, and how they are arranged. Each of these features is controlled by a separate set of preferences, which may frustrate troubleshooting efforts when one setting goes awry and does not stick.
Backgrounds
The desktop background is set in the "Desktop & Screen Saver" system preferences, but can also be set through various programs (ie, Safari) by right-clicking a picture and choosing the option to "Use image as Desktop picture". These settings for the desktop are stored in the "com.apple.desktop.plist" file that is located in the /username/Library/Preferences/ folder.
While you can change the background settings for individual Finder windows, unlike the desktop these settings are stored in the hidden .DS_Store file for the respective Finder folder.
Items on the Desktop
The specific items that are displayed on the desktop can be somewhat customized as well. By going to the "General" section of the Finder's preferences (in the "Finder" menu) you can check the options to show internal drives, external disks, removable media and iPods, and connected network servers on the desktop. These settings are stored in the "com.apple.finder.plist" file that is stored in the /username/Library/Preferences/ folder.
Arrangement of items
The last desktop customization area is how items are arranged, which is set in the "view" options for the desktop. While the desktop is a special item in OS X, it is still in large part treated just like any other folder in OS X. The view options for all folders are stored in the hidden .DS_Store files for those folders, and the desktop is no different. Like other folders, it has its own .DS_Store file which holds the settings for grid size, arrangement, icon size, font size, and label placement.
If there is a problem with the behavior of the desktop in any of these three areas, you can usually fix the problem by removing the respective settings file and then restarting the Finder by either logging out and back in, by forcing the Finder to quit and relaunch, or by restarting the computer.
While the preference files for the desktop background and what items are displayed on it can be easily accessed and removed through the Finder, the hidden .DS_Store file for the desktop will need to be removed through other means. The easiest method is to use the following Terminal command to directly remove the file (copy and paste into the Terminal):
rm ~/Desktop/.DS_Store
If the terminal is too intimidating, you can use a utility like "OnyX" to remove the .DS_Store file from a specified folder, including the Desktop. Once removed, these files will be replaced by new ones that contain default settings. Keep in mind that the Finder preference file also contains other settings, such as the Finder sidebar items, which will also be reset to default settings if you remove it.
Other Approaches
Beyond just targeting the aforementioned files for deletion, clearing system caches may also help how items are displayed on the desktop. This can be done by booting into Safe Mode (holding shift at bootup) and then running a number of system cache cleaner utilities including OnyX, [Snow] Leopard Cache Cleaner, MacCleanse, and Cocktail.
Questions? Comments? Post them below or email us!
Be sure to check us out on Twitter and the CNET Mac forums.