Finding out property list (plist) attributes and/or processes
Apple’s own web page indicates how to Edit property lists in Terminal on Mac. However is there a way to guess/find out an attribute or a process that I would like to modify but I don’t know the existence of?
In the case of the Dock position, I would have had to:
- Figure out that such a
plist
file exists (in this casecom.apple.Dock.plist
), - Then I would have had to find the correct
key
(in this caseorientation
), - Finally I would have had to find out the possible
values
(in this caseleft
butright
anddown
would also have been possible).
Then the whole command would have been (or is, in this case): defaults write com.apple.dock orientation left
(then in terminal type killall Dock
in order for the change to take place).
My questions:
- If I would not have known that the dock position on the screen could be modified with the Terminal command
defaults write com.apple.dock orientation left
, would I have been able to figure it somehow out? - Is there a way to find a plist attribute or process by searching say for keywords?
- If yes, how/with what tool?
- Is there (or could we figure out) some kind of a step-by-step procedure to do that (preferably in Terminal)?
Each application can choose what to store in their plist files. The names of the keys and the different possible values are determined by the application, which can be developed by Apple or by any third party, and there is no standard.
To find different combination of keys/values usable in a plist file, you can do the following:
-
Read the documentation. But often Apple doesn't provide full documentation.
-
Find existing plist file and modifiy them, by deducing and trying different keys/values.
-
Run the command
strings
on the executable to dump out all text. (Thanks to mmmmmm for this). -
Look at the source code if the application is open source, reverse engineer it otherwise.