|
Page 3 of 3
Next, you edit the file. Since this file, like many system files, has its permissions set to prevent users from accidentally changing or deleting it, we can't just edit it as-is. Instead, we need to have "root" privileges to allow us to modify this file. Remember in my last column I mentioned that there are several ways to do this, and listed four of those ways? Well, here, we're going to use Method 2 from that list: Launch a GUI text editor with root privileges. Let's pick TextEdit for this editing job, although you could also use TextWrangler or almost any other GUI text editor just as well.
$ sudo open -a /Applications/TextEdit.app InfoPlist.strings
|
In the above command, "sudo" is the "SuperUser DO" command. This means to run, or "do," the following command (in this case, the "open" command) with "Superuser," or "root," privileges. The "-a" option tells the open command that the following item in the command, the thing we want to open, is an application, not just a document or data file. The "/Applications/TextEdit.app" tells "open" what application to launch. Finally, the "InfoPlist.strings" item in the command is the file we want to open with TextEdit. You could optionally omit this last item; in that case, TextEdit would simply launch without opening a specific text file; you could then open a text file from within TextEdit.
Once you enter the above command, you'll be prompted for your password. Enter it, and hit Return. Then, TextEdit will launch with root privileges, and open the text file, ready for you to edit it.
As you look at the InfoPlist.strings file in TextEdit, it's pretty obvious where the Dock gets the name for the Trash icon. Just change that string of text "Trash" between the quotes to something else. Here in this example, I've changed it to "Wastebasket". When editing, be careful not to delete the quote characters. Also, be careful not to alter anything else in this file.
Now, in TextEdit, use the "File > Save As..." command to save the file to your home directory. Quit TextEdit.
Now we need to replace the original copy of the file with the modified copy that's currently in our Home directory.
$ sudo mv ~/InfoPlist.strings
|
The "mv" command moves a file from one location (directory) to another. The "~" character in this command is just a Unix shorthand meaning "your Home directory." So, "~/InfoPlist.strings" means "the copy of InfoPlist.strings in the Home directory." The "." character at the end of the command is another Unix shorthand meaning "here," or "the current directory." So, putting this all together, the entire command line means, "As the root user, move the file InfoPlist.strings from the Home directory to the current directory."
As before, enter your password when prompted for it. (Note that the "mv" command also can be used to RENAME a file, though that's not how we're using it here.)
We're almost done. All that's left to do now is somehow to cause the Dock to take note of our newly-changed file. There are a couple of ways to do this. One way is just to log out of your OS X account, then log right back in again. That causes the Dock to quit, then re-launch when you log back in. Another way is to simply restart the Mac. Now ou have a newly named trash can!
In my next column, you'll learn how, without using any third-party utilities, you can put your Dock at the top of your screen, instead of at the sides or bottom! Why would we want to do this? Because we can! And, because it's very easy, requiring only a single Unix command! Till then, keep up that alternative moddin!
|