
Scrot Lite Weight Screen Shot Software for Linux
The above was taken with the scrot-feh program below.
Note this works with any Debian type Linux system. To begin install scrot and feh:
~ $ sudo apt-get install scrot feh
Scrot Simple Screenshots for Linux
Scrot is a minimalistic command line screen capturing application. Scrot enables taking screenshots from the CLI (terminal) and offers features such as a user-definable time delay. Unless instructed otherwise, it saves the file in the current working directory.
$ scrot -t 20 -d 5
The above command saves a dated .png file, along with a thumbnail (20% of original), for Web posting. It provides a 5 second delay before capturing in this instance. You can also use standard date and time formatting when saving to a file. e.g.,
$ scrot ~/Pictures/%Y-%m-%d-%T-screenshot.png -t 20 -d 5
The above saves the screenshot in a filename with the current year, month, date, hours, minutes, and seconds to a folder in your home directory called "Pictures" after a delay of 5 seconds. Make sure the directory is actually there!
A Better Way
The following bash file will allow screenshots that will open up the image with feh. The image will be stored in directory /home/pi/sshot along with a thumbnail image. Directory sshot will be created if not present.
In this case I've created a bash script that can be called from a pin board or Linux menu.
A "bin" folder is already mapped into the system on the latest Raspbian/Debian distributions in one's home directory.
The advantage is low system resource use and fast operation. Save as sshot.sh in /home/pi/bin. Open a terminal window in the folder:
~ $ sudo chmod +x sshot.sh
Now the file will execute. Call from terminal or add to menu, etc.
Put in your home bin folder or copy to /usr/local/bin.
#!/bin/bash
# screenshot opened with feh or viewnior picture viewer.
# check if X display is working if not exit.
[ -z ${DISPLAY} ] && echo "Requires X" && exit 1
# check for ~/sshot make if not there.
[ -d "$HOME/sshot" ] || mkdir -p "$HOME/sshot"
# to save to directory ~/sshot
#filename=~/sshot/pic_`date "+H%M%S"`.png
filename=~/sshot/pic_`date "+%m%d%H%M%S"`.png
# -d is delay in seconds.
# -t is thumbnail in percent
scrot -d 3 -t 50 $filename
# use feh to display screen shot at reduced size
# -d draws the file name
# -g sets size to no larger than 640x480 or 800x600
feh -g 800x600 $filename
# comment out feh above and use alternate viewer
#viewnior $filename
exit
- Main Light Fast Linux Desktops with Openbox, JWM
- Test Reuse Surplus PC Power Supplies
- Add WBAR Launch Dock to Raspberry Pi
- Add MPG123 Terminal Music Player to Raspberry Pi, Linux
- Basics of Alsamixer Audio Control for Linux
- Add Solid State Hard Drive to Raspberry Pi
- Beep a PC Speaker Add Beeper to Raspberry Pi
- Using FEH Wallpaper Setter Under Linux
- Scrot Lite Weight Screen Shot Software for Linux
- Using Light Weight Beaver Text Editor
- Install Viewnior Image Viewer for Linux
- Zmixer ALSA Sound Control Tutorial
- Tutorial Xinitrc Desktop Manager Control for Linux
- Setup Raspberry Pi Using JWM Window Manager
- Using FEH Wallpaper Setter, Picture Viewer Under Linux
- Web Master
- Gen. Electronics Homepage
- YouTube Channel
- Current Control Circuits
- Design LM317 Constant Current Circuits
- Constant Current Circuits with the LM334
- Experiments with TL431A Shunt Regulator
- Transistor Circuits
- H-Bridge Motor Control with Power MOSFETs
- Insulated Gate Bipolar Transistor IGBT Circuits
- ULN2003A Darlington Transistor Array with Circuit Examples
- Power Supply Basics
- Basic Power Supply Rectification Tutorial
- Basic Triacs and SCR Projects and Circuits
- Transistor-Zener Diode Regulator Circuits
- Arduino Microcontroller
- Arduino Code Examples
- Rotary Encoder Using Arduino Hardware Interrupts
- Raspberry Pi Single Board Computer
- Raspberry Pi Openbox Linux System
- ADS1115 4-Channel ADC Uses I2C with Raspberry Pi
- Microchip PIC Controllers
- Microchip PIC12F683 Programming Circuits Tutorial
- Microchip PIC16F628A Assembly
- WiringPi and Pulse-Width-Modulation with Raspberry Pi
- WiringPi for Raspberry Pi and MAX6675 thermal-couple sensor
- WiringPi Blink an LED Demo
- Interface I2C LCD to Raspberry Pi in C
- ADS1115 4-Channel ADC Uses I2C with Raspberry Pi
- MCP4725 12-Bit DAC Interface to Raspberry Pi
- Raspberry Pi with PCF8591 Analog To Digital Control in C
- Raspberry Pi PCF8591 AD-DA Sensor Python Interface
Web site Copyright Lewis Loflin, All rights reserved.
If using this material on another site, please provide a link back to my site.