Search code examples
macososx-elcapitan

OSX 10.11.1 - editing Keyboard-xx.plist gives "Operation not permitted"


I am trying to edit keyboard layout and I'am getting Operation not permitted on saving file.

So far I've tried few things without success:

cd /System/Library/Input Methods/PressAndHold.app/Contents/Resources
sudo chmod u+w Keyboard-pl.plist
vim Keyboard-pl.plist

and

sudo chflags nouchg Keyboard-pl.plist 
sudo chmod u+w Keyboard-pl.plist
vim Keyboard-pl.plist

Any idea how can I edit it?


Solution

  • In fact, on El Captain files under /System (and other locations) are protected. In order to edit it you will need to disable the protection:

    To disable System Integrity Protection, you can do the following:

    1. Boot into the Recovery HD by restarting whilst holding ⌘R.
    2. Open Terminal (from the Utilities menu).
    3. Run the following command in Terminal:

      csrutil disable

    4. Restart.

    Source here: https://georgegarside.com/blog/osx/package-incompatible-installer/ and https://apple.stackexchange.com/questions/208911/the-keyboards-plists-of-pressandhold-also-can-no-longer-be-modified-to-add-the