- This topic has 4 replies, 4 voices, and was last updated 16 years, 8 months ago by
larkost.
-
AuthorPosts
-
August 5, 2008 at 7:49 pm #373637
[email protected]
Participanthi,
For the creation of deployment dmg’s i started to use InstaDMG.
The idea of manipulating things using pkgs is somewhat harder to implement but it’s a lot more ‘recyclable’ in other deployment scenarios.By harder to implement i mean: how can we know which default to write for a particular setting? is there a public list available? for example, i want a different keyboard layout by default. how do you guys figure out which default to change to which value?
August 5, 2008 at 9:31 pm #373639larkost
ParticipantThe specific answer to the question is that I think that this is set in:
/Library/Preferences/com.apple.keyboardtype
To the more general question, a lot of it is experience. After a while you get a feeling about where programmers are going to put things, and most of the time I can guess the plist that something is going to go in, or at least be able to guess the appropriate plist given the list of plists. As a case in point, I went to /Library/Preferences and looked for plists that had “key” in their name. Then I read out the plist, and decided that this was probably the one.
If that does not get the proper result, then another approach is to use fs_usage and then set the setting through the GUI. Then you filter through the files that got modified and then look in the files to find the likely changes. fs_usage is a bit of firehose, so I generally run it a few times first, each time I add a number of processes to a long list that I call with the “-e” flag to exclude them from the list. I still usually have a couple of pages of output, but a little experience will allow you to scan through this quickly for what you are looking for.
August 7, 2008 at 8:48 am #373672thomasb
ParticipantTry [url=http://www.macupdate.com/info.php/id/19141]fseventer[/url] 🙂
That will easily show you what files gets changed.
1. Download, install and open fseventer
2. Open System Preferences > International > Input Menu
3. Go back to fseventer and hit the play button
4. Go back to System Preferences and change the keyboard layout
5. Go baack to fseventer hit the pause button and see what files got changedOpen the files you see got changed in i.e. [b]Property List Editor[/b], and make sure the settings you want are there.
August 14, 2008 at 2:37 am #373742Patrick Fergus
ParticipantTo expand on using fseventer, you can it to determine what file was changed–but how do you pick out the preference that was changed? To do this, figure out what file gets changed and execute the following:[code]defaults read /path/to/com.company.program > ~/before.txt[/code]Make your change, and execute:[code]defaults read /path/to/com.company.program > ~/after.txt[/code]You can then see the differences by the following:[code]diff -c ~/before.txt ~/after.txt[/code]or use TextWrangler to compare the files.
– Patrick
August 14, 2008 at 5:44 am #373746larkost
ParticipantOr you can use FileMerge. It is part of the Developer Tools, and is a pretty good front-end to diff.
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed