Posted on 06-27-2022 04:20 AM
Hello to all ;)
I hope, someone can help me to find a solution for my question:
We use an app, based on Java®. There are some settings for this app configured at ~/Library/Preferences/com.apple.java.util.prefs.plist.
Now, we have to modify some settings. To do this, I wrote a small script, that works very well. The file is modified and stored with the new entries. BUT: If I start the app, the file will be reset to the old values.
I have no idea, where the "old version" comes from. I guess, that there is a backup version somewhere, maybe in a cache and a system process restores the original version of the plist.
Does anyone have an idea, how I could fix this?
Solved! Go to Solution.
06-27-2022 07:00 AM - edited 06-27-2022 07:01 AM
Hello all :)
I was able to solve it by myself.
For those, who are looking for a solution for this theme, here is the trick:
It seems to be necessary to kill the plist deamon before modifying the plist file. There is a command to do this:
killall cfprefsd
Running this command before editing the plist file is preventing from "restoring" the file to its older version.
06-27-2022 07:00 AM - edited 06-27-2022 07:01 AM
Hello all :)
I was able to solve it by myself.
For those, who are looking for a solution for this theme, here is the trick:
It seems to be necessary to kill the plist deamon before modifying the plist file. There is a command to do this:
killall cfprefsd
Running this command before editing the plist file is preventing from "restoring" the file to its older version.
Posted on 06-27-2022 05:45 PM
Just wondering how you modified the plist in your script? Was it using the defaults command?