Hot answers tagged

47

Preferences are cached in 10.9. See http://hints.macworld.com/article.php?story=20130908042828630. If you edit a plist file directly or replace the plist of an application, the application will keep using the cached version even after you quit and reopen the application. You can run defaults read com.googlecode.iterm2 or killall cfprefsd to apply the ...


35

The following changes worked for me: Remove the following two elements from /System/Library/LaunchDaemons/org.postfix.master.plist: <string>-e</string> <string>60</string> This will stop it exiting after 60 seconds. Add the following element as a child of the <dict>...</dict> element in the same plist file: <key>...


21

plist files are not necessarily plain text so they need to be run through a converter. Finder and Xcode (which has a plist editor) do this without telling the user The binary format is documented in this C code so any application can convert it and someone has written a format description in English and more Apple documentation here but note that it ...


15

The Program key specifies the file to execute, & the ProgramArguments key specifies the arguments which will be passed to the executing process. Strictly speaking you can pass whatever arguments you want to a process, but the convention is that the first one should be the name by which the process was invoked, so most programs ignore their first argument....


12

Having great trouble migrating iTerm2 (2.0.0) plist to my new Mac running Yosemite (10.10.1). What I did to fix that is: Open iTerm2, so a default com.googlecode.iterm2.plist file is created. Quit iTerm2 Deleted all cached preferences for iterm2 by issuing defaults delete com.googlecode.iterm2 Copied the file to the new Mac in the correct location inside ...


10

Preference locations Some system-wide settings are in /Library/Preferences, and some user settings are in ~/Library/Preferences. I say "some" because I have found settings in these locations before, but have not done an exhaustive search. Also, this is what could be called an implementation detail. It's not documented publicly by Apple, is not intended for ...


10

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 ...


10

When you have problems to empty the trash, rm -rf ~/.Trash/* in the terminal does the job for you. Edit : You have to keep in mind that there might be multiple .Trash directories. For example on a USB stick or a external Drive, OSX will create another .Trash at the root of the drive. So you might need to use rm -rf /Volumes/DriveName/.Trash.*


9

The settings are stored in /Library/Application Support/com.apple.TCC/TCC.db: $ sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db 'select * from access' kTCCServiceAccessibility|com.apple.ScriptEditor2|0|1|0|�� kTCCServiceAccessibility|com.red-sweater.FastScripts|0|1|0|�� kTCCServiceAccessibility|com.apple.AccessibilityInspector|0|1|0|�� ...


9

You can use defaults or plutil command line tools. For defaults it looks like this: defaults write /absolute/path/to/Info.plist CFBundleExecutable -string <Executable> For plutil: plutil -insert CFBundleExecutable -string <Executable> Info.plist Value after -insert is a key path separated by .. For example plutil -insert ...


9

Not everything counts from 1970. Its the standard time of Unix. Unix time, or POSIX time, is a system for describing points in time, defined as the number of seconds elapsed since midnight proleptic Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds. Unix Time Early versions of unix measured system time in 1/60 s ...


9

There are a few caveats with creating launchd .plist files. I'll summarize them below: Each Weekday must be a entry specified in an placed in the StartCalendarInterval dictionary entry. Weekdays go from 1 to 5. Sunday is 0 and 7 (I know, right?) You have to know how you want your item to run and place the .plist in the appropriate directories/folders: ~...


9

I have used Pref Setter in the past to edit .plist files graphically. brew cask install pref-setter Any text editor (including Text Edit) will work if the file is non-binary. If you right click on any .plist file and click "Get Info", under "Open With" there should be an option to change the default editor for it, which you would then change to Pref ...


8

I was so sick of this, so I decided to write a fix once and for all. You can use the following AppleScript to resize the column widths when you notice the column is too wide. It works by resizing the Finder window really large, then back to it's original size, triggering a fluid layout resize. tell application "Finder" tell the front Finder window --...


8

The first few lines should be <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> Your file (as well as the one in the linked answer) is missing the <plist version="1.0"> part.


7

This is not a trivial task, if I recall correctly people run the strings utility at the command-line against an Application, and look for things that match a structure similar to com.domain.FeatureName. (com.apple.iTunes, ch.cyberduck.CyberDuck, com.panic.Coda, etc.) The likely easiest way to manage these overrides is by a System Preferences Pane by the ...


7

~/Library/LaunchDaemons isn't a valid location for either launch agents or launch daemons. You are misunderstanding the terminology. LaunchDaemons are system-wide processes, while LaunchAgents are run per-user. From the launchd man page: ~/Library/LaunchAgents Per-user agents provided by the user. /Library/LaunchAgents Per-user agents ...


7

Dug up my notes from when I first modified the user template in our base images. Ran back through the process, changing the default Dock to have about 15 items, on a fresh Mac and these steps worked. I did a lot of this from the command line, so as to not fuss with changing/reverting permissions using Finder. Arrange your Dock however you would like for ...


6

Launchd will run your jobs next time the mac wakes from sleep. So if you shut down your mac, this won't work. You will need to put your mac to sleep to get your daily script to run when the mac wakes if the last time it should have run was during the sleep duration. man launchd.plist: If the system is asleep, the job will be started the next time ...


6

It can be caused by a great number of things, but I believe the most common cause is where the file is being written to, and the application terminates before it's finished writing the file. This could be caused by system overheads being too great for a successful write at the time. Hardware errors with the hard disk, or memory could also cause data errors, ...


6

You could also create an XML or old-style property list and convert it with plutil: plutil -convert binary1 test.plist It modifies files in place by default. You can specify a different output file with -o or print to stdout with -o -.


6

That error is usually shown when there is a syntax error when checking with plist command. In this case: label should be Label, and: <!DOCTYPE plist PUBLIC "-//Aple//DTD PLIST 1.0//EN"> should be: <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">


6

Based on the man page for exec(3), it seems that the first program argument should be the path to the executable: The execv(), execvp(), and execvP() functions provide an array of pointers to null-terminated strings that represent the argument list available to the new program. The first argument, by convention, should point to the file name associated ...


6

You can also add the file by following the commands below. This command will find the Bundle Identifier for the application you are trying to add to Assistive Devices. /usr/libexec/PlistBuddy -c 'Print CFBundleIdentifier' /Applications/enterapplicaitonnamehere.app/Contents/Info.plist Let's say the application you were trying to add was SKYPE. You would ...


6

I haven't had to deal with this "for real" yet, but I think the best solution is to: Copy the .plist file into /Library/LaunchDaemons. Rename it (e.g. by adding "local." to the beginning of the filename), and edit its Label value to match. If you don't change this, launchd is likely to get confused between this and the original. Make whatever other edits ...


6

I had this problem following upgrades to Google Drive on 29 July 2016. To fix it I had to Change Google Drive settings to 'Show sync file status items and right click menu' (in Advanced tab) Restart the Finder. Of course the setting no longer worked, but you can see if you are synced from the Google Drive menu in the top bar.


5

Modifying the Info.plist of an app usually invalidates its code signature, so it's not allowed to access the keychain automatically. You can see if the code signature is valid with for example codesign -vv /Applications/Sparrow.app. An invalid signature can be replaced with sudo codesign -f -s - /Applications/Sparrow.app.


5

Found a website dedicated to these Mac OS X defaults write commands, some handy commands for Mac OS X Lion & Mountain Lion. http://www.defaults-write.com


5

There really isn't a notion of "available" keys. The application is free to read whatever keys it wants. Most people discover "secret" defaults keys by using strings to look through the application binary to see what keys it will try to read.


5

I had this same idea a few months ago. I came up with a solution that works, using Ruby. I use this gist to parse the Safari Reading List plist file: https://gist.github.com/andphe/3232343 Then I use the ruby Pocket gem to add each item to Pocket. In the end, I went with Pinboard instead of Pocket, and I have a working project up on github that does ...


Only top voted, non community-wiki answers of a minimum length are eligible