Home Forums Software InstaDMG which default to write

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #373637
    [email protected]
    Participant

    hi,
    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?

    #373639
    larkost
    Participant

    The 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.

    #373672
    thomasb
    Participant

    Try [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 changed

    Open the files you see got changed in i.e. [b]Property List Editor[/b], and make sure the settings you want are there.

    #373742
    Patrick Fergus
    Participant

    To 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

    #373746
    larkost
    Participant

    Or you can use FileMerge. It is part of the Developer Tools, and is a pretty good front-end to diff.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Comments are closed