Welcome to the final installment of the tutorial series that covers everything you ever wanted to know about .plist files. So far, the series has explored what .plist files are, how to interpret the content of .plist files, how to edit these files (including working with "hidden" settings), how to troubleshoot .plist file problems, and what you should know about .plist files located outside your home directory. For all the details, see Parts I & II, Part III, Part IV, Part V and Part VI.
Over the course of this series, I have described some of the more useful or just-plain-fun things you can accomplish by making modifications to various .plist files. These include getting widgets out of Dashboard, disabling Guest access for file sharing, turning off the requirement to provide a password in the Finder for certain actions, adding a Quit item to the Finder, and changing the magnification size of Dock icons. For this last installment, I offer a list of five more of my favorite .plist "tricks." And they are all easy to do! However, if any of the steps below seem insufficiently explained, check with earlier installments of this series for needed details.
Make invisible files visible. I am surprised I did not mention this one already, but it appears I did not. This change let's you see all the files and folders on your drive that are otherwise invisible. Among other uses, it is ideal for easy access to Mac OS X's Unix directories.
If you wish, you can accomplish the effect without having to "manually" edit the relevant .plist file. Instead, you can choose from among an array of utilities that do the "dirty work" for you. My personal favorite is Show Hide Invisible Files. Just launch it, click the "Show the Invisible files" button and you're done. Click the toggled button again to reverse the effect. You don't even have to relaunch the application to go in reverse, as you do with most competing one-trick ponies.
Alternatively, if your prefer the economy of one utility for a variety of tasks, you still have a healthy selection from which to choose. I recommend TinkerTool. Making invisible files visible is just one of several dozen things it can do. To use it for this function, click the Finder icon in its toolbar, enable the "Show hidden and system files" checkmark, and click the "Relaunch Finder" button.
Of course, the point of this series has been how all of this works at the .plist file level. So, here's the deal for invisibility status: All of the relevant utilities work by doing the same thing?modifying a property in a .plist file. And, of course, you can bypass these utilities and make the modification yourself:
- Launch Property List Editor and open the com.apple.finder.plist file (located in ~/Library/Preferences).
- From the list of properties, find the one called AppleShowAllFiles. Note: If the property does not exist, create it and assign Boolean as its class.
- Change the value of the property from No to Yes.
- Save the change.
- Relaunch the Finder, by holding down the Option key and selecting the Relaunch command form the Finder's Dock icon menu.
That's it. Now all the invisible files on your drive will magically appear. Change the property's value back to No to undo the change.
Eliminate the Desktop. This unusual option makes all the icons on your desktop disappear. Assuming no windows are open, all you will see is your Desktop background picture and the Dock. This doesn't have much everyday value, but it can be useful in a public setting where you want to make the icons more difficult to access. To make this change, you can once again call on TinkerTool. To do so, select Finder from its toolbar, enable the checkmark for "Disable Desktop features" and click to Relaunch Finder.
If you prefer the "hands-on" approach, launch Property List Editor and return to the com.apple.finder.plist file. Next, find a property called CreateDesktop (or create the Boolean property if it does not exist) and change/set its value from Yes to No.
Change the "Finder." With this trick, you get Mac OS X to believe that the application it considers to be the Finder is something other than the Finder itself. Admittedly, while it is impressive to see this in action, it has limited practical value. As one possible use, some Unix geeks might prefer Terminal to be the "Finder." If so, here's what you need to do:
- Launch Property List Editor and open com.apple.loginwindow.plist.
- Click the disclosure triangle next to the word Root, to reveal the list of properties. With Root still selected as the highlighted property, click the New Child button.
- A new property named "New Item" will appear. Change the name to "Finder." Leave its Class as "String."
- Now the key step: For the Value, enter the absolute path for the application you want to be the Finder. For example, if you want it to be Terminal, enter: /Applications/Utilities/Terminal.app.
- Save the change.
For the change to take effect, you'll need to log out of your account and log back in. When you do, Terminal will launch instead of the Finder. You can still access the real Finder at any time by clicking the Finder icon in your Dock. To undo the switch, go back the .plist file and delete the Finder property.
Change the screen capture default format. When you use Command-Shift-3 or Command-Shift-4 to save a screen capture, it saves the picture as a PNG file by default (at least it does so in Tiger; older versions of OS X saved screen captures in other formats). But no matter what the default format of the screen capture, you can change it to a different one. Do you want screen captures saved as a PDF document, or a TIFF image, or a JPEG file? No problem. TinkerTool comes to your aid one more time. Simply select the General icon from its toolbar and select the format you want from the "Screenshot file format" pop-up menu. The change takes effect after you log out and log back in.
Or, as should be no surprise by now, you can do the change yourself. This time, you'll modify a .plist file called com.apple.screencapture.com.plist, again located in ~/Library/Preferences. The property whose value is changed is called "type." But there is one additional hassle here: Because the property is not Boolean (with only Yes and No as possible values), there isn't a predetermined set of choices for the value. This means you have to know what values are accepted as valid. In general, they are what you would expect (and as listed in TinkerTool); the most common values are PNG, TIFF, JPEG, PDF or PICT.
Another potential problem is that this .plist file may not yet exist in your Preferences folder. If so, you will need to create it. While you can do this with Property List Editor, this is an occasion where using Terminal might be easier. For example, to change the default format for screen captures to TIFF, enter the following in Terminal (pressing Return when you are done):
defaults write com.apple.screencapture type -string TIFF
That's it. This creates the .plist file in your Preferences folder (if it does not already exist) and creates a property called "type" with a class of string and a value of TIFF.
Manage Login Items. This last item is involves a bit more work than the others. But it solves a practical troubleshooting problem. The issue is this:
You have a list of Login Items. These are items that launch automatically each time you log in. You can view the list by opening your Accounts System Preferences pane, accessing your account and selecting the Login Items tab. However, suppose one of these items is causing a problem, perhaps a crash at login. You want to determine which item is the culprit. As one approach, you could delete items one-by-one, logging out and back in after each deletion. When the crash disappears, the most recently deleted item is the likely cause. But now what? Suppose you discovered the culprit item after deleting seven Login Items. How do you get the six harmless but deleted items to return to the list? Even if you know the names of the deleted items, it can be difficult to locate where they are on your drive (especially if they are hidden inside application packages, as is sometimes the case). Ideally, Mac OS X should provide better tools for handling Login Items. But it doesn't.
Still, a solution is readily at hand. Here's what to do:
- Go to the ~/Library/Preferences folder and locate the file called loginwindow.plist (not com.apple.loginwindow.plist). This file contains the list of login items that determines what you see in your Accounts System Preferences. Make a copy of the file, with a different name -- such as loginwindow copy.plist. Leave it in the Preferences folder.
- Do the troubleshooting, as described above, to identify the culprit item. When you are done, quit the System Preferences application.
- Return to the ~/Library/Preferences folder. Delete the loginwindow.plist file and rename the copy with the name of the now deleted file: loginwindow.plist.
- Go back to the Accounts System Preferences pane. Your complete list of Login Items will be restored to what it was prior to your troubleshooting. You can now delete just the one Login Item you identified as the problem.
That's it. You now have removed the offending item without losing any others.
If you want to get a bit more fancy, you can go even further. For example, you cannot change the order of Login Items from the list in the Accounts System Preferences pane in Tiger. There has been debate as to whether or not this matters, as the load order of these items is probably not affected by the list order. Still, if you want to change the order, you can do it. However, to get this to work most easily, don't use Property List Editor. Instead, use a third party utility such as Pref Setter. Unlike Property List Editor, Pref Setter allows you to cut and paste individual properties. Here's what to do:
- Open the loginwindow.plist file in Pref Setter. [Note: Always have a copy of the file as a backup before making any changes, just in case you need to "undo" your work.]
- Locate the array property called AutoLaunchedApplicationDictionary; click its disclosure triangle to view its contents.
- You will see a list of numerically-named items starting from "object 1." Each one represents a Login Item, where the listed order is the same order they appear in your Login Items list.
- To relocate any item, either (a) drag the item to its desired new location or (b) cut the item and paste it in its desired location. In either case, the numbering of all items is automatically adjusted so that the items are still listed sequentially. For example, if you move the object 9 item to position 2, it will be renamed as object 2 and all object items below it will be renamed accordingly.
- Save your changes.
If you now go to the Login Items list in Accounts System Preferences, you will see that the new order is already in effect.
One last tip: Each "object #" property is a Dictionary item, with sub-properties. If you click the disclosure triangle of any of these object items, you will see that one of the revealed properties is called "path." Its value is the absolute path of the login item. You can use this to (a) identify the name of the login item associated with each "object #" and (b) see where on your hard drive each login item is stored.
As I am sure you have guessed by now, this hardly exhausts all of the things that can be done with .plist files. A search of MacFixIt (as well as other sites that post hints and tips) will reveal many more. But, if you have followed along in this series, you now know more than just the how-to steps for a collection of tips. You understand how all of it works. You can explore the frontiers yourself and perhaps be the first to make a new .plist discovery. Let me know if you do!
Ted Landau is the author of Mac OS X Help Line: Tiger Edition, now also available as a PDF download, where you can learn all the dirt on .plist files and everything else related to troubleshooting Mac OS X.
Like what you've found in this tutorial? Get more troubleshooting guidance (updated daily) by subscribing to MacFixIt Pro.Resources