It is time to break free of the mundane prison of Mac OS X and make brilliant tweaks to your screenshot preferences you didn’t even know exist.

Terminal is a terminal emulator, a powerful and versatile tool providing direct interaction with the engine room of the OS. Users can execute commands in Terminal to make changes to hidden preferences. Terminal can be taken advantage of to make changes to the hidden screenshot preferences.

It is true that Terminal is a capricious monster that leaves no room for errors. The commands in this article are completely safe. When it comes to making changes to preferences, they are completely reversible. This means it will have no permanent effect.

Let’s pamper the monster into organising and simplifying screenshots!

Change the Screenshot Location

Under the default setting, screenshots are saved to the Desktop for quick access. However, whilst taking screenshots to document something is fun; the Desktop can quickly get so cluttered to the point where files overlay each other. It is a strenuous task to organise the Desktop in this state of chaos.

Advertisement

There is no preference pane within the System Preferences for choosing the location for screenshots to be saved. The ability to organise screenshots was made possible thanks to two basic commands.

Step 1 — Choose New Folder from the File menu or simply press ⇧⌘N and rename it to anything like Screenshots. Press Return (⏎) to apply the changes.

Step 2 — Drag and drop the folder into a location that is easy to access like the Pictures folder. Open the folder to reveal the new folder.

Advertisement

Before proceeding to the next step: Choose New Finder Window from the File menu or simply press ⌘N. This will open a separate window so that the folder in which the new folder was placed won’t go anywhere. In the new window, open the Utilities folder or simply press ⇧⌘U and launch Terminal.

Step 3 — Copy and paste the following command into the Terminal window:

defaults write com.apple.screencapture location

Be sure there is a space after “location”. Do not press Return just yet and proceed to the next step.

Step 4 — Close the Utilities folder and return to the folder in which the new folder was placed. Drag and drop the latter folder into the Terminal window. The action will insert the path of the folder in the command.

Step 5 — Return to Terminal and press Return. Proceed to the next step to apply the changes.

In order to apply the changes, SystemUIServer needs to be Avada Kedavra! by Voldemort. SystemUIServer is a process running in the background controlling a number of aspects of the OS user interface (UI). A killing command will be used to send a signal to terminate the SystemUIServer process. Once terminated, the process will restart instantly, but updated with the path to the new folder. This command will be used several times in this article.

Step 6 — Copy and paste the Unforgivable Curse into the Terminal window:

killall SystemUIServer 

Press Return, and henceforth all screenshots will now be saved to the new folder.

Go ahead and press ⇧⌘3 or ⇧⌘4 to take a test screenshot. It will appear in the new folder.

To reverse the changes: If the new folder no longer does the job, simply copy and paste the following command into the Terminal window:

defaults write com.apple.screencapture location /Users/Username/Desktop/

Replace Username with the username on the Mac and press Return. Repeat Step 6 to apply the changes.

Change the Image Format of Screenshots

By default, screenshots are saved as PNG files. PNG is a versatile image format that provides for lossless compression. This means image quality is preserved while creating optimal file sizes. However, PNG files aren’t widely used in a number of applications such as documents.

Advertisement

PNG can be converted in virtually any image editing software. The question is, why go through the trouble of doing that when the OS can be commanded to save screenshots in a different image format?

The image format of screenshots can be changed from PNG to one of the following supported formats:

  • JPG (Joint Photographic [Experts] Group) — Lossless compressed, resulting in resonably high-quality images and optimal file sizes
  • TIFF (Tagged Image File Format) — Lossless uncompressed, resulting in the highest image quality and larger file sizes
  • GIF (Graphic Interchange Format) — Lossy compressed, resulting in poor image quality but smaller file sizes and faster loading times
  • PDF (Portable Document Format) — Similar to JPG, but optimised for making or viewing PDFs

Like with the location of screenshots, there is no way to choose the image format. This can only be done through the use of Terminal.

Step 1 — Copy and paste the following command into the Terminal window:

defaults write com.apple.screencapture type format 

Replace format with an image format to switch to: jpg, tiff, gif or pdf. Press Return and proceed to the next step to apply the changes.

Step 2 — Yell Avada Kedavra! into the Terminal window:

killall SystemUIServer 

Press Return, and henceforth all screenshots will now be saved in the selected image format.

Advertisement

To reverse the changes: In order to have the OS save screenshots as PNG files, simply repeat Steps 1 and 2 (replace format with png in Step 1).

Disable the Drop Shadow Effect on Window Screenshots

When a screenshot of a window is captured, it will have a drop shadow to give it a floating effect. The drop shadow effect uses a lot of pixels that are not needed. It is cumbersome to crop out drop shadows to give window screenshots a clean look. All it takes is two commands to make it possible to elimate drop shadows from window screenshots while maintaining an actual size reproduction of the window’s contents.

Step 1 — Copy and paste the following command into the Terminal window:

defaults write com.apple.screencapture disable-shadow -bool TRUE

Press Return and proceed to the next step to apply the changes

Step 2 — Shoot the glowing green streak of death into the Terminal window:

killall SystemUIServer

Press Return, and henceforth all window screenshots will now be free of unwanted drop shadows.

Go ahead and take a test screenshot. Press ⇧⌘4 followed by the spacebar to toggle the camera mode, in which the cursor turns into a camera. Hover and click the camera over a window to capture it.

The result will look like that on the right—clean and free of the drop shadow effect. The window screenshot is immediately ready for use without any need to crop out the drop shadow.

Advertisement

To reverse the changes: To revive the drop shadow effect, simply repeat Steps 1 and 2 (replace TRUE with FALSE in Step 1).

Other Tips:

  • If you cock up a command, Terminal will display a “Command not found” message. Remain calm, it doesn’t mean the Mac was harmed in any way.
  • Unfortunately, there isn’t a known command to customise the screenshot file name. Simply select a screenshot and press Return to rename it.
  • Here are the keyboard shortcuts to take screenshots:
    • ⇧⌘3 — saves pictures of the screen as files
    • ⌃⇧⌘3 — copies pictures of the screen to the clipboard
    • ⇧⌘4 — saves pictures of the selected area as files
    • ⌃⇧⌘4 — copies pictures of the selected area to the clipboard
    • ⇧⌘4 followed by the spacebar — saves pictures of the selected window as files
    • ⌃⇧⌘4 followed by the spacebar — copies pictures of the selected window to the clipboard
    Note — ⌃ is the Control (CTRL) key
  • It is not necessary to create a new folder for screenshots to be saved. An existing folder like the Pictures folder can be used. Simply drag and drop the existing folder into the Terminal window as shown in Step 2.
  • If you are in a hurry and don’t have time to change the location and image format of screenshots, you can use this simple command:

screencapture ~/Desktop/filename.jpg 

  • (...continued) You can rename filename to anything and/or replace jpg with a different supported image format: tiff, gif, pdf or png. Press Return, and a screenshot will appear on the Desktop. This is only temporary.
  • Like the last command, if you need to take a quick screenshot in a specific image format, but without the Terminal window in sight, it is possible with a timer. You can use this command:

screencapture -T 10 ~/Desktop/timedscreenshot.jpg 

  • (...continued) The -T represents time, and it needs to be followed by a number representing seconds. You can replace 10 with a lesser or greater number, rename timedscreenshot and/or replace jpg with a different supported image format. Choose a number that gives you plenty of time to press ⌘H to hide the Terminal window before the screenshot is taken. The countdown will start when you press Return. Once it is taken, the timed screenshot will appear on the Desktop.
  • If for some reason you have trouble finding your username to revert back to having screenshots saved to the desktop, use this command instead:

defaults write com.apple.screencapture location ~/Desktop

  • (...continued) The squiggle (~) represents the Home folder, which is named after your username. Press Return, and Terminal will take care of everything.
  • If the Mac has multiple users (i.e. family computer), use the one originally used to change the screenshot location. Each individual user has their own preferences for screenshots.