Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Change Safari and Firefox homepage through ARD

First of all, I'm sorry if this is the wrong place to pose this question.

I need to deploy a homepage setting change to a large amount of mac users in our enterprise... I'd like to accomplish this with ARD if possible. The change needs to affect all users on any given machine for both Safari and Firefox.

I have been able to make this change using write defaults to safari, but the change is only per user on each machine. I have not yet been able to do this with Firefox because I don't believe the setting is in a plist file.

I know the best route will probably be to write an apple script... but I'm a scripting novice.

Any suggestions?

Thank you,
Ken

400+ Clients spread across different locations, 3 Xserves, Mac OS X (10.5.1)

Posted on Jul 1, 2008 10:39 AM

Reply
8 replies

Jul 8, 2008 12:36 PM in response to Ken_Edgar

I'm going to reply to my own posting as this may be of interest to others out there.

I have not developed a script, and the change will only work on a per logged in user basis.

With Safari I'm just sending the command: defaults write com.apple.Safari Homepage 'http://homepage.com'

In Firefox I edited /Applications/Firefox.app/Contents/MacOS/browserconfig.properties to reflect my homepage change. Then I will remove the user preferences for Firefox to force it to the default I just set in the file. rm ~/Library/Application\ Support/Firefox/Profiles/*.default/prefs.js

I will mark this solved.

Jul 31, 2008 12:10 PM in response to Ken_Edgar

Taking another look at this (We haven't deployed the change yet) I think re-deploying the app is a bit of a harsh way around this problem. Along with one of my colleagues, we have come up with a perl script that will find the prefs.js file in each user profile and change only the homepage setting in those files. This will be run as root and will work even if a user is not logged in. I have tested this and it works well. I would be happy to share this with someone if anyone is interested.

Aug 6, 2008 9:08 AM in response to wafi

Hey man, With the help of one of my colleagues, we have written two different perl scripts in order to change the homepage for Safari and Firefox for all users on a given machine. Firefox was the easiest to do, but Safari interestingly enough, was the biggest pain.

It turns out that with Safari, you can't change other users' preferences even if you are root. This was news to me... we ended up having to figure out the uid number of each user on the box... and running the command as each user to change each of their preferences. This script is pretty evil in what it does, and I don't think I should post it here.

I haven't tested either script on a mass model yet, I have only tested it on a couple Leopard machines. Basically you will have to copy the script to a location on each machine using the copy feature of ARD... then when you want to deploy it, you just call that script from the send UNIX command in ARD.

We only wrote the Safari script yesterday, and I need to go through and comment things and clean it up a bit. Please feel free to e-mail me directly if you want to take a look at the scripts... as said earlier, I don't feel like this is a good place to post some of this stuff as it could be dangerous. I also want to let you know that I don't want to be responsible for what these scripts may mess up. I think they are good, but like I said, I haven't done a lot of testing yet.

Change Safari and Firefox homepage through ARD

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.