How To Take Screenshots Without an Image Editor
If you don't want to start up an image editor like GIMP to take a screenshot, you can use the convert utility from ImageMagick from a shell prompt, or you can assign it to a key or menu in your window manager.
The command format is: convert X: screenshot-name.png
If you want to take screenshots and save each to a unique file automatically, you can write a shell script to save them sequentially, by time, or by some other criteria.
I wrote a script that snaps and saves screenshots sequentially. If you want to use it, copy and paste it into a new file, give the file execute permission, and point a keybinding or window manager menu command to run the script whenever you want to take a snapshot of the screen.
#!/bin/sh
#
# snapshot-screen
#
# Author: Ariel Millennium Thornton
# Date: 2016-04-03
#
# Snap a screenshot and save it automatically. The pointer arrow will
# change to a crosshair. Click on a window to snap a shot of that
# window without WM decorations, or click on the root window to snap a
# shot of the whole screen.
#
# Requirements:
#
# ImageMagick for the `convert` utility.
# feh for post-snapshot preview.
#
# Edit this variable to point to the directory where you want your
# screen snapshots to live.
#
snapshotdir="${HOME}/pictures/snapshots"
# If you want your snapshots to be named something other than
# "snapshotXXX.png" then change this variable. You don't need to.
#
prefix="${snapshotdir}/snapshot"
# # # # # # # # # # # # # # # # # # # #
mkdir -p "${snapshotdir}"
# Save in lossless PNG and reasonably-compressed lossy JPG formats.
suffixpng=".png"
suffixjpg=".jpg"
i=1
# Cycle through numbers to find the first not used.
freenamepng=""
while [ -z ${freenamepng} ]
do
filenamepng="${prefix}${i}${suffixpng}"
filenamejpg="${prefix}${i}${suffixjpg}"
# Check if the filename with either suffix already exists.
if [ ! -e "${filenamepng}" ]
then
if [ ! -e "${filenamejpg}" ]
then
# If neither one exists, use these names.
freenamepng="${filenamepng}"
freenamejpg="${filenamejpg}"
else
# Cycle to the next number if either one is already used.
# It doesn't matter if one is used and the other not.
i=$(( ${i} + 1 ))
fi
#
else
i=$(( ${i} + 1 ))
fi
#
done
echo "Snapshot filenames: ${freenamepng} and ${freenamejpg}"
convert X: ${freenamepng}
convert ${freenamepng} ${freenamejpg}
# Preview screenshot. Comment out or delete this command if you don't
# want a preview or don't have feh installed.
feh -g 800x450 -. ${freenamejpg}
# # # # # # # # # # # # # # # # # # # #
#
# Copyright (c) 2016, Ariel Millennium Thornton
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the
# distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#