dock problem

Not applicable

John,

Don't know if this will help, but here is another iteration to try. I think
you definitely want to run the defaults command as the user, so using su .
In my experience when doing that, I have always used the following syntax
(your kidspiration iteration is closest to what I have used):

if [[ -e "$kidspiration" ]]; then
su - "$user" -c 'defaults write
/Users/$user/Library/Preferences/com.apple.dock
persistent-apps -array-add
Œ<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString
</key><string>/Applications/Kidspiration 2/Kidspiration
2.app/</string><key>_CFURLStringType</key><integer>0</integer></dict></dict>
</dict>''
fi

Don't know how the single/double quotes will come across in the email, but
basically, here is what I suggest trying:

add a dash between su and $user
add the ­c flag after $user.
put the entire defaults command in double quotes
put single quotes around the <dict>....</dict> directive within that
command

Again, that's real close to what you have tried, so it may not make a
difference, but that would be the next thing I would try.

-- Charlie Butters
Shopko Stores
charlie.butters at shopko.com

Date: Wed, 27 May 2009 16:07:12 -0400

5 REPLIES 5

jmclaughlin
New Contributor

Thanks so much for the help. I will try that.

John McLaughlin
Technical Support Specialist
Newton Public Schools

tlarkin
Honored Contributor

Sorry if this is way off, but why not capture it with composer and then
have it fill existing users and make it self healing so it can't be
altered?

What is stopping the users from deleting these preferences?

Just a thought.

Tom

mbond
New Contributor II

I'm working on a new image for 10.6 (upgrading from 10.5 on our 75 public macs). I'm hitting a problem with the Dock that i've not seen before.

I have the dock as a package (used composer to pull the current users dock, and added a couple extra files in for icons and such). It doesn't get copied over to the machine during imaging (dock settings or files in the package).

If i send it over manually with casper remote it works fine.

Any ideas?

Michael Bond
Professional Technologist
WVU Libraries
Office.: 304-293-0340
Cell....: 304-282-0640
Email.: Michael.Bond at mail.wvu.edu

rmanly
Contributor III

For student machines since I am using Casper to do the MCX and using the
dock array xml stuff is a pain, what I do is just send the Dock to FEU and
FUT like 1x / week to a few labs. That way students can change them around
but eventually they get reset back so they don't lose/forget where things
are or how to get to them (we put springers for file shares etc that have
long URIs).

Ryan M. Manly
Glenbrook High Schools

tlarkin
Honored Contributor

Make available off line, and set it to self healing. Every log in/out and reboot they will get that dock regardless if they can hit the JSS or not.