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

3 Answers 3

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.

5
  • 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!!!!!
    – Tinu1976CH
    Feb 3, 2019 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, 2019 at 12:44
  • @ benwiggy : my problem is that I want to change the format of the date after the filename (not the filename). So there is still no answer to my question how I change from "Screenshot 2019-08-07 um 17.02.08" to "Screenshot 20190807_170208"
    – Tinu1976CH
    Jan 22, 2020 at 9:54
  • If you need that specific format for further processing of the files, then you would be best served by running a script that changes the filenames as part of whatever you do with them.
    – benwiggy
    Jan 22, 2020 at 9:58
  • @ benwiggy : so I did it the last months... but I hoped to solve it "the easy way"... I think I will give up for finding a possibility to simply get the file as wished... thanks for your great help
    – Tinu1976CH
    Jan 23, 2020 at 10:05
-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
4
  • heath-raftery, did you tried to edit the mentioned files in macOS Sierra 10.12?!?
    – Tinu1976CH
    Apr 25, 2018 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. Apr 25, 2018 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
    – Tinu1976CH
    Apr 25, 2018 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. Apr 25, 2018 at 15:50
-1

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.

You must log in to answer this question.

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