Forum Replies Created
-
AuthorPosts
-
jamesnp
ParticipantCheers for the information, gneagle. That’s exactly what I was looking for.
In the mean time I worked out my own work around. I compiled an applescript that runs the defaults command. This postflight.app is copied to /tmp/postflight.app, and the postflight script launches the applescript. The postflight then pauses 2 seconds and deletes the postflight.app from /tmp.
It’s a but rough and ready, but it does work. Is there any reason I shouldn’t use this method? Is applescript inherently insecure or should I be worried about this solution on any level.
I will never be deploying this script via remotedesktop, it’ll always be a local user installing. So, nothing to worry about there!
Cheers again guys,
jpjamesnp
ParticipantCheers again for your help.
Unfortunately, it doesn’t seem to work. It places a new NSGlobalDomain.plist file in the user’s preferences folder, but that doesn’t seem to be the actual user’s NSGlobalDomain being used by the system.
I’ve done a little bit more digging and called ‘defaults read NSGlobalDomain’ from the actual installed. The installer log file then gave me the output of the NSGlobalDomain. It appears that the settings are being saved, but for a different user, I presume root.
Does NSGlobalDomain have an actual location where it saves itself for each different user? I presume so if it is non-volitile. Is there anyway to address a particular user with ‘defaults write’.
Again, many thanks for any help!
-jp
jamesnp
ParticipantYep. Basically it’s just an installer that drops two dictionary files into /System/Library/Spelling to add support for Irish Language spell checking.
Once the two files are installed, I run a script to configure system spelling settings as I don’t want the user to have to manually go into Language & Text -> Text and manually select Irish from the list. The above script deactivates the “Automatic by Language” setting, adds Gaeilge (ga_IE) to the NSPreferredSpellServers list and then sellects Gaeilge (ga-IE) as the language.
I used the echo ‘Current script owner: ‘ . get_current_user(); to see what user the script was running as, as I thought it may have been root, but it returned my username. That ended up confusing me even more! haha
The settings really only need to be applied for the current user.
Your help is really appreciated!
-jp -
AuthorPosts
Recent Comments