1

Is there a possibility to edit the following files in macOS 10.12 Sierra:

/System/Library/CoreServices/SystemUIServer.app/Contents/Resources/German.lproj/ScreenCapture.strings

and

~/Library/Preferences/com.apple.screencapture.plist

I want to change the following things of the Screenshot-Files:

  • Filename
  • Location
  • Date and time Format in file name (no, that could NOT be done via System Preferences!)

Previous naming scheme: Screenshot 20161004_162222.png

Naming scheme now: Screenshot 2017-08-07 um 17.02.08.png

I want to revert to the previous scheme.

My problem is, that I can edit both files, but only on the second I can also save them. BatChmod nor chmod in terminal can change permissions on first file

ls -la /System/Library/CoreServices/SystemUIServer.app/Contents/Resources/German.lproj/ScreenCapture.strings
-rw-r--r--  1 root  wheel  1390 Feb  2  2017 /System/Library/CoreServices/SystemUIServer.app/Contents/Resources/German.lproj/ScreenCapture.strings

sudo chmod 777 /System/Library/CoreServices/SystemUIServer.app/Contents/Resources/German.lproj/ScreenCapture.strings
Password: ***
chmod: Unable to change file mode on /System/Library/CoreServices/SystemUIServer.app/Contents/Resources/German.lproj/ScreenCapture.strings: Operation not permitted
1

There is no need to disable SIP and hack /System files to change the filename and location of screenshots. Use the following Terminal commands to set your preferences:

#SCREEN CAPTURE
# Show/ Don't show date in Screenshot filename
defaults write com.apple.screencapture include-date -bool false

# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
defaults write com.apple.screencapture type -string "png"

# Save Screenshots to location:
defaults write com.apple.screencapture location ~/Desktop/Screenshots

# Disable Screen capture's shadow
defaults write com.apple.screencapture disable-shadow -bool true

# Change the filename
defaults write com.apple.screencapture name [yourFilename]

You may need to quit and relaunch the SystemUIServer, (or restart).

If you need a more specific workflow, then you can modify or process the files with a Folder Action script, to run when they are created.

  • thanks for your examples I already know. but how to change the Filename?!? On english machines it is "screenshot", on german systems it is "Bildschirmfoto"... but how to define my own without make this changes to this files?!? btw: with your terminal commands you also hack the system files!!!!! – TinuCH1976 Feb 3 at 10:54
  • @TinuCH1976 I have added the command for changing the name. And these command do not "hack the system". You are not modifying files in /System. You are using Apple's designed protocol for changing user preferences, by saving a file to the user's Library. Not /System. – benwiggy Feb 3 at 12:44
  • @ benwiggy ups... sorry... I overread that :( soooorrryyyy – TinuCH1976 Feb 4 at 13:42
0

Operation not permitted

This is due to Mac OS X System Integrity Protection or SIP.

In short from Apple:

System Integrity Protection is a security technology in OS X El Capitan and later that's designed to help prevent potentially malicious software from modifying protected files and folders on your Mac. System Integrity Protection restricts the root user account and limits the actions that the root user can perform on protected parts of the Mac operating system.

This was/is still a pain for developers, since it's release.

How to disable listed here.

The most detailed on how to disable or customize your SIP is here. Scroll about ⅔'s the way down for examples.

More Info: Here, Here & Here.

-1

Sure, go ahead.

They are XML files, so you can just use a text editor, or an XML editor. XCode in particular has specialised support for plist files.

When you're done, remember to restart SystemUIServer using Activity Monitor or the Terminal command:

killall SystemUIServer
  • heath-raftery, did you tried to edit the mentioned files in macOS Sierra 10.12?!? – TinuCH1976 Apr 25 '18 at 8:28
  • No. But I did the equivalent in 10.13. I had to rename the .strings file to .plist for XCode to interpret it correctly (it's a binary file format, so not raw XML). Any of the plist files in ~/Library/Preferences open fine in XCode with a double click. – Heath Raftery Apr 25 '18 at 9:26
  • open isn't the problem... saving the ScreenCapture.strings-File is my big Problem / perhaps in 10.13 it's now possible again. But 10.12 won't let me save – TinuCH1976 Apr 25 '18 at 14:25
  • Sounds like a permissions issue. Perhaps try asking a specific question on that issue. I think my -1 answer addresses the current question. – Heath Raftery Apr 25 '18 at 15:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .