Safely alter the plist on Calendar.app

calendardockplist

I want to add <key>LSUIElement</key> <true/> to the plist of Calendar.app like I would other apps because I don't want it in the dock or my task bar. This being a super-special Apple app, I need special permission. Could anyone tell me how to safely do this?

Best Answer

To safely alter the file just make a copy or backup of the file and then work with the original:

  • To modify the file log-in as a sudoer (usually an admin account) and open Terminal.

  • Enter the following to backup the file:

    sudo cp /Applications/Calendar/Contents/Info.plist /Applications/Calendar/Contents/Info.plist.backup
    

    you have to enter your password then.

  • Open nano to modify the plist content:

    sudo nano /Applications/Calendar/Contents/Info.plist
    
  • now add

    <key>LSUIElement</key>
    <true/>
    

    after the line containing <dict> (usually the 5th line).

  • Hit ctrlo to write the changes to file. Then hit Hit ctrlx to quit nano.

  • Open Calendar and check if it works. (It doesn't work, Calendar crashes immediately)
  • to revert the changes enter:

    sudo rm /Applications/Calendar/Contents/Info.plist
    sudo mv /Applications/Calendar/Contents/Info.plist.backup /Applications/Calendar/Contents/Info.plist
    

    to remove the modified file and rename the backup file.

  • Enter exit and quit Terminal

  • Change the icon of Calendar to a more pleasurable one.