I mentioned a lot of tips and tricks on this site which involve changing preferences. Take a quick look through the Terminal Tag section of this site you can see what I am talking about. What I am going to mention today is a method of finding out which preferences for a program you can change. It again uses Terminal but enables yourself to take what you have learnt for the Mac just that little bit further.
Programs will only accept certain variables for the preferences of apps. It will only look for certain items in the preference file and then run them. We are in luck. We can easily read all of this information and then use it to out own devices. Take for example Mail. If I type the following into Terminal:
defaults read com.apple.mail
I get the following:
Note the command. “defaults” is the Terminal program we are using. It is called defaults for some reason. The read section is to read the file. It will then promptly display everything in the Terminal window. You will have to do some searching through the output since it will display everything, usually read is replaced by write in most Terminal tips. The final section is the preference file you want to read. You can change this name to anything you want.
The next section is to look through the file and find anything useful that you want to change. You can then change the preference file using:
defaults write preference.name item n
Making sure you include the name of the preference item you want to change the the value.
Its quite interesting looking through the file to see what is availble. Most of the items are very specific to the program and changing them will not yield any useful results. You can also read specific items from the file by typing in the following, making note to change the file name and the preference name.
defaults write com.apple.mail RSSPollTime
This will then display some text which is the preference value.
A semi-useful tip which you can use see what exactly you can change in a preference file. You can then change your programs to your hearts content. I may spend a bit looking through some common programs and seeing what preferences I can play around with.
If you want to take your skills with Terminal a bit further I recommend you check out the Terminal Category on this site. If you fancy reading a book there is a couple on Amazon that I regularly see mentioned and recommend, O’reilly Unix Geeks and Unix Under the Hood both are designed for Mac OS X and take Terminal further.