|
|
| Put the Dock up Top |
| Written by Bruce Brown | ||||||||||||||||||||||||||||||||||||||||
| Thursday, 01 November 2007 | ||||||||||||||||||||||||||||||||||||||||
|
Down low... Up High...
Errata First things first. One thing that I forgot to mention in my last column on renaming the Trash: After you edit the InfoPlist.strings file (the one that's found in /System/Library/CoreServices/Dock.app/Contents/Resources/English.lproj), the file's ownership and other permissions settings might not be set the same way they were set before you started. To easily correct this, just run Disk Utility > First Aid > Repair Permissions after you've finished renaming the Trash. That'll ensure that the ownership and other permissions settings of the file we modified are set to what they're supposed to be. And, if it so happens that they're already set correctly, running Repair Permissions won't hurt anything. You could set the file's permissions correctly by using the Unix chmod command (or by using one of the third-party utilities that allows you to directly set the permissions). But, running Repair Permissions has the advantage of fixing the permissions of any other files whose permissions might happen to be set wrong, too. Now, on to moving the Dock to the top of your screen. Important Reminder: Be sure you back up your system before making any changes to preferences files or to other system files, or making any other changes that might accidentally damage your system. In addition to backing up your entire system, before you change any individual files, such as preferences files, it's a good idea to make separate backup copies of those individual files, too. Then, if you make a mistake changing a preferences file, you can just delete the copy you changed, then rename the backup copy back to the original file name. Before you delete the "bad" edited original preferences file, though, it's also a good idea to note what the permissions settings are of that original one. Then, after you've renamed the backup copy back to the original name, check its permissions, and, if needed, change them to the way they were when you started. Alternatively, you could run Disk Utility > First Aid > Repair Permissions to ensure the permissions settings are correct. Is this trip really necessary? Why would anyone want to put their Dock at the top of the screen, instead of at the bottom or along one of the sides? Is it "better" somehow to have your Dock at the top instead of along the bottom or sides of the screen? Well, it's a matter of personal preference. And, sometimes, it's a matter of moving the Dock to one of the other edges of the screen--top, bottom, left, or right--just to get it out of the way of whatever you happen to be doing at the moment. One thing's for sure: Having your Dock at the top of the screen does take some getting used to. You be the judge. Use your Mac for awhile with the Dock at the top and see what you think. After that, if you don't like your Dock there, it's easy enough to put it back where it was. To change the Dock back to the bottom or side, just use the Dock command that's in the Apple menu. If you again want to put the Dock at the top, though, you'll have to repeat one of the procedures given here, since "Position on Top" isn't a choice on the normal Apple Dock menu, nor can this choice be found in the System Preferences > Dock preferences pane, either. There do exist third-party utilities that will allow you to put your Dock at the top of the screen. OnyX Dock-At-The-Top, Method #1: Using the Unix Command Line 1. Launch the Terminal application. 2. Change to the Preferences directory in your account (recall that "~" is just standard Unix shorthand that means "Home folder") (Fig. 1): $ cd ~/Library/Preferences ![]() Figure 1. Changing to Your Preferences Directory 3. Make a backup copy of your existing Dock preferences file (Fig. 2): $ cp com.apple.dock.plist com.apple.dock.plist.BAK ![]() Figure 2. Backing Up the Dock Preferences File 4. Using the Unix defaults command, modify the Dock preferences (Fig. 3): $ defaults write com.apple.dock orientation top In the above command, note that there's no ".plist" extension at the end of the preferences file name. That's because the defaults command assumes that files you use with it are .plist files. The command above says to write, or modify, the preferences file specified in the command, setting the "orientation" property in it to the value "top." After entering the defaults command above, you can Quit the Terminal app, if you want. ![]() Figure 3. Modifying the Dock Preferences File 5. Relaunch the Dock. I covered ways to do this in my last column, but it's important enough when changing the Dock preferences that I'll repeat some of that information here: First, realize that the Dock is a computer program, much like any other program, but with some unique characteristics. (And, realize, too, that all OS X applications are programs, but not all OS X programs are OS X applications. This simply means that there are other kinds of programs in OS X besides the applications we all know and use.) We now need to cause the Dock program to read in its modified Dock preferences file. With a "normal" Mac OS X application, we can just Quit that app from within the app itself. But, since the Dock program isn't a "normal" OS X app, we can't just Quit it in that way; there's no "Dock Quit" command in OS X. As in my prior column, there are a couple of ways to accomplish quitting and re-launching the Dock. You could restart your Mac, or you could just log out, then log right back in again. Or, without bothering to log out, you could instead force-quit the Dock using the Activity Monitor utility, as I wrote about before. One of the unique things about the Dock is that the operating system, Mac OS X, tries to keep the Dock running at all times. As an aside, that "keep it running" characteristic is also true for the Finder. In Tiger, it's also true for the Dashboard as well, which is the program that allows you to use Widgets. Once the Dock has been quit via Activity Monitor, OS X will notice that it isn't running anymore, then automatically re-launch it. Any of the methods above will work, in order to get the Dock to read in its new preferences. Regardless of which method you use to re-launch the Dock, when the Dock re-launches, it should then appear at the top of your screen (Fig. 4)! If you've previously turned on Dock Hiding, you probably won't see the Dock at first. In this case, simply move your cursor to just below the white menu bar at the top of the screen, and the Dock then should become visible. ![]() Figure 4. How'd the Dock Get Up There?! Dock-At-The-Top, Method #2: Using the Pref Setter Third-Party Utility 1. Make a backup copy of your Dock preferences file (Fig. 5): In the Finder, open your Home > Library > Preferences folder. Find the Dock preferences file in this folder; it's called com.apple.dock.plist. Single-click on the Dock preferences file to select it. From the File menu, select Duplicate. Now you should have a backup copy of your Dock preferences called com.apple.dock copy.plist in your Preferences folder, along with the original, as-yet-unmodified com.apple.dock.plist file. ![]() Figure 5. The Original Dock Preferences File and Backup Copy 2. If you don't already have Pref Setter installed, download it from 3. If your Dock is currently positioned at the bottom of the screen, set it to either the left or the right side of the screen: Apple menu > Dock > Position on Left. (This forces OS X to create an item in the Dock preferences called "orientation," which we'll be modifying in a later step. If the Dock is at the bottom, the orientation item might not exist in the Dock preferences, because "bottom" is the default setting. It doesn't really matter whether you put the Dock at the left or the right; the idea is to force OS X to record the new Dock position in its preferences file.) 4. Launch Pref Setter (Fig. 6). ![]() Figure 6. The Pref Setter Utility 5. In Pref Setter, navigate to the Dock preferences file and open it (Fig. 7). It's the file named com.apple.dock.plist in the Home > Library > Preferences folder. Be sure you open the original Dock preferences file and not the backup copy of it that you made in step 1 above. (Recall that "Home" is a generic name for your home folder in your OS X account. The actual name of this folder will vary from one OS X account to another, and its actual name will be the same as your Mac OS X login name.) ![]() Figure 7. The Dock Preferences File, with the Orientation Item Highlighted 6. In Pref Setter, in the Dock preferences file, find the item called "orientation" in the left column. At the right end of this line will be the current value of the "orientation" preference; this value controls the location of the Dock. If your Dock is currently at the left side of the screen, the orientation preference will say "left" at the right end of the line. Double-click on the word "left" (or whatever yours says), so that the word is selected, then type in the new value "top" (without the quotes) (Fig. 8). ![]() Figure 8. The Orientation Item Changed to "top" 7. Click away from the "orientation" item, but still somewhere in the Dock preferences window, in Pref Setter. (This causes your change to "stick.") Save the Dock preferences file and Quit the Pref Setter application. 8. You now need to cause the Dock to read in its modified preferences file. For some ways to do this, see step 5, "Relaunch the Dock," in the Unix procedure above. Regardless of which method you use to re-launch the Dock, when the Dock re-launches, it should then appear at the top of your screen (see Fig. 4 above)! If you've previously turned on Dock Hiding, you probably won't see the Dock at first. In this case, simply move your cursor to just below the white menu bar at the top of the screen, and the Dock then should become visible. Other Dock Preferences While we're on the subject of modifying your Dock's preferences, here's another Dock preference you might want to try changing, just for fun: mineffect The setting of this item in the Dock preferences file controls the kind of animation OS X uses when you minimize a window to the Dock. The Dock preferences pane (in the System Preferences) allows you to set this either to "Genie Effect" or to "Scale Effect." By issuing the proper "defaults write" command (Unix method), or, by directly editing the Dock preferences file using Pref Setter, you have a third choice: You can also set the mineffect to "Suck." One advantage of this is that the suck effect runs noticeably faster than the other effects on older, slower Macs. Such a command in Unix would look like this (Fig. 9): $ defaults write com.apple.dock mineffect suck Note that, in typical Unix fashion, all of the allowable values for the mineffect preference setting must be written in all lowercase letters, when entered as part of a command, although they are capitalized differently in the Dock preferences pane. ![]() Figure 9. Modifying the Minimize Effect (mineffect) For reference, here are the three possible values for the "mineffect" preference, when used with the defaults command: genie scale suck Other Defaults Settings; the OS X Defaults System The Mac OS X Defaults System, or Properties System, is how OS X keeps track of your customizations. Most apps will have a single preferences file that stores custom settings for that application. Some apps, however, have more than one preferences file. For these apps, sometimes all of the app's preferences files are in the Preferences folder, but each file will have a slightly different name. The names cannot be exactly the same, because OS X, like most operating systems, doesn't allow two files with the exact same name to exist in the same folder. The preferences for iCal are a good example of this kind of preferences file scheme: In the Preferences folder, there are iCal preferences files with names like com.apple.iCal.alarmsCache.plist, com.apple.iCal.AlarmScheduler.plist, and com.apple.iCal.plist. Other apps that have multiple preferences files have their own sub-folder in the Preferences folder, with all of their preferences files in that sub-folder. The preferences for Apple's Software Update are a good example of this kind of preferences file scheme: In one folder named "Software Update" in the Preferences folder, there are preferences files with names like SoftwareUpdate.plist, SUEngine.plist, and SUUserPrefs.plist. Important: Be very careful when you're playing around with the Defaults System. Make a backup copy of any preferences file before you modify it. Then, make any changes to the preferences file carefully. In addition to third-party application programs, many programs that are part of OS X itself have preferences files. Most of these preferences files, whether from Apple or a third-party, follow a certain file-naming convention (established by Apple). File names of preferences files that adhere to this convention usually often have three parts to their file name. The parts of the file name are separated by periods. The filename of a preferences file begins with the software company's web domain name, but with the order of the two parts of the name reversed. So, for example, if the company's website is "www.abc.com," then the first part of the name of any of their preferences files would be, "com.abc.". For a non-profit organization whose website is "www.xyz.org," the first part of their preferences file names would be, "org.xyz.". Software written by a school or college would have a preferences file whose name begins with "edu.". And so on. The next part of the filename of a preferences file is the name of the application or program to which this preferences file belongs. For example, for the TextEdit app, this part of the preferences file name would be "TextEdit". For the Dock, not surprisingly, this part of the preferences file name would be "Dock," as we've already seen above. The third, and final, part of a preferences file's name is its file extension, which, for a preferences file, is ".plist," which is short for "property list." Here are some examples of some complete file names for preferences files, with the three parts of the filename all put together, just as you'd find them in the Preferences folder: com.apple.Dock.plist The preferences file for the Dock. org.mozilla.firefox.plist The preferences file for the well-known Firefox web browser. de.abcd.coolapp.plist The preferences file for a hypothetical German company called "abcd," that publishes a program called "coolapp." Note that, in this case, the program name part of the filename will probably be in German, not in English as shown here. Note that some preferences files have more than three parts to their name; often, the extra part is there to differentiate them from other preferences files belonging to the same app with similar file names, in cases where an app has more than one preferences file. One example of an app that has multiple preferences files, each with more than three parts to the name, are the iCal preferences files, as mentioned earlier. These files have names like com.apple.iCal.alarmsCache.plist, com.apple.iCal.AlarmScheduler.plist, and com.apple.iCal.plist. Locations of Preferences Files There are two main locations for preferences files, depending on whether the preference file in question is used for all accounts, or is "private" to only one user's account: /Library/Preferences --for system-wide preferences settings; namely, settings that affect all user accounts on that Mac. ~/Library/Preferences --for user-specific preferences settings; namely, settings that affect only one user's account on that Mac. Apple's Property List Editor application You can also use the Property List Editor to edit property list files. The Property List Editor is part of the Xcode Tools, also known as the Developer Tools; this is an optional install with OS X. The Xcode Tools can be installed "on top of" your existing OS X installation. For Tiger, the Xcode Tools software is on the same DVD as the regular OS X installer software. For Panther and earlier OS X versions, the Tools software is on a separate CD that came with your copy of OS X. This separate CD is called either the Xcode Tools CD or the Developer Tools CD. You can also download the Xcode Tools from Apple's website, although it's a pretty big download. In fact, this is probably a better way to get it anyhow, because, just as with printer drivers and other software, the version you download from Apple's site is likely to be more recent than any version that's been sitting around on a CD or DVD for awhile. If you do download the Tools software, be sure to check the system requirements first, and verify that the Mac you plan to install it on meets them. As usual, I'd strongly recommend you back up your entire hard drive before doing an install like this, just to be safe. For Further Help Help with Terminal From within Terminal, select Help > Terminal Help Help with the defaults Command From the Unix prompt, enter man defaults Or, enter defaults Help with the Pref Setter Utility From within Pref Setter, select Help > Pref Setter Help Help with the OnyX Utility From within OnyX, select Help > OnyX Help References OnyX (free; donations accepted) Pref Setter (free; donations accepted) Property List Editor (Part of Apple's Xcode Tools or Developer Tools) Next Time In my next column, we'll play around a little with Unix shell scripts, and see how to make a shell script launch when you log in, among other things.
Write Comment |
||||||||||||||||||||||||||||||||||||||||
| Next > |
|---|
|
|











