Apple - How do I unlock a .plist file so that I can change it?
Before you do this make sure there are no running instances of TextEdit on your system.
Using The Finder
Select the plist file in the Finder and doing File > Get Info. At the bottom of the file info window you'll see a section called Sharing & Permissions. You want to make sure you're in that list and that you have Read & Write
level access to the file.
Before you can add yourself to the access permissions on the file though, you'll need to unlock it. Click the little lock icon (1) in the lower right hand corner and enter your password. If you're not an administrator on the machine, you won't be able to proceed past this step.
Once you've unlocked the file you can change your permissions to Read & Write
. If you're not shown in the list of people who can access the file, click the +
button below the list and find yourself in the Users & Groups
list that pops up.
The changes are applied to the file as soon as you make them in the File Info window.
You should now be able to open, edit and save those edits to the file.
Using The Command Line
Open a Terminal window.
Change to the place where the plist file is located:
cd ~/Library/Preferences/
Change the ownership and permissions on the file so you can read and write it:
sudo chown $USER aomDSP.plist
sudo chmod u+w aomDSP.plist
You probably don't need sudo
on the second call there, but it can't hurt. You'll need administrator access to the machine to do this.
If you want to edit the file (as you describe above), you don't necessarily have to unlock it. If you're fine with working on the command line, you may edit the file using the command line tools provided by Apple. Prepend the commands with sudo
to gain the required rights to modify the file (you will need to enter your admin password).
Namely these programs are defaults
and PlistBuddy
(run as sudo /usr/libexec/PlistBuddy
).
While defaults
is a more direct way of modifying the file, PlistBuddy
has an interactive mode wich lets you preview your changes before saving.
Documentation for defaults
Documentation for PlistBuddy
If required, you can also use plutil
to convert between the different formats.
Remember that you can get help about all of these commands on the command line by typing man <command>
(e.g. man defaults
).