6 news ways to take screenshot in Linux | gnome-screenshot script GUI and Terminal

June 03, 2021
Hello and welcome back to Uk2blogger EFX Tv. In this blog we are going to learn

5 new ways to take screenshots in Linux

For this tutorial, I'm going to use Ubuntu 20.4.
So why do we need Screenshots and ways to take screenshots in Linux?
Taking screenshots can be the best idea to save your work in a single frame and, you can share it with others without sharing the source content. Sometimes screenshots are necessary when you try to hide something from the public. Many tools provide the functionality to take the partial screenshot by selecting the desired area using Mouse. In this blog the 5 new ways to take screenshots on Linux, we will explore various Linux commands to take screenshots on our Linux machine.

There are special Keys in our Linux/windows keyboard that perform various actions according to our needs. For example, when we require to copy something we use control + c in windows, control shift +c in Linux, similarly we long press on text to select and copy in the Mobile devices. The same way we use shift for typing capital characters. We use a combination of shift, alt, ctr, with other keys to push some specific shortcuts created by the system or users. Another example is when you press ctrl + alt + delete you push a shortcut that tells the system to run the task manager. In this blog, we will be talking about the print screen key as (GUI) and if you don't have access to GUI you can use server commands to take a Screenshot in Linux (gnome-screenshot script GUI and Terminal). We are going to discuss them one by one.
1 By pressing keys on the keyboard (shift, alt, ctr, + SctScn)
PrtScr – Fullscreen, Screenshot.
Shift + Ctrl + PrtScr – Copy the selected area screenshot to the clipboard.
Ctrl + Alt + PrtScr – Copy the same window screenshot to the clipboard.
Alt + PrtScr – screenshot of the current window.
Ctrl + PrtScr – Copy the full-screen screenshot to the clipboard.
Shift + PrtScr – Save a screenshot of a specific area.

2 Screenshot using gnome-screenshot shell script command line
$ gnome-screenshot

Capture Only the Current Window
$ gnome-screenshot

Capture a Screenshot of the present terminal Open the screenshot tool using the command line
$ gnome-screenshot -i

Capture Only the Current Window
$ gnome-screenshot

Capture screenshot including mouse pointer
$ gnome-screenshot -p

Capture screenshot of the present terminal
$ gnome-screenshot -w

Capture screenshot of the present screen using -d delay time
$ gnome-screenshot -d 2

Capture screen short of the present terminal using -d delay time
$ gnome-screenshot -w -d 2

Screen shot for the selected area
$ gnome-screenshot -a

Screen short for selected area to clipboard (most useful)
$ gnome-screenshot -ac

Screen short with a terminal window along with border
$ gnome-screenshot -w -b

3 Screenshot using ImageMagick
First install ImageMagick using command written below:
$ apt-get install imagemagick

Run the command to take the screenshot
$ import -window root Pictures/Image5.png

Capture selected area screenshot
$ import hello.png

Take a screenshot and resize it according to your need
$ import -window root -resize 640 -pause 4 Pictures/myimage.png

4 Ubuntu screenshot tool for screenshots in Linux

1st- Kazam Is a screen recorder application for Linux. It can also be used for taking screenshot. To Install Kazam on your Ubuntu machine run the command written below.
$ sudo apt install kazam
2nd lookit Another one of the best screenshot applications. This is a git-based application that uses python to run the setup. To install lookit run the command written below.
$ git clone https://github.com/zachtib/lookit.git
$ sudo add-apt-repository ppa:lookit/daily
$ sudo apt-get update
$ sudo apt-get install lookit
$ python setup.py install

3rd Gimp
Gimp is an image editing tool, which can also click the screenshot sufficiently and export them in different formats. Run the command to install Gimp.
$ sudo snap install gimp

4th tool Shutter The shutter is the well-known and best tool for taking screenshots in Linux. To install the Shutter use the command written below
$ sudo apt-get install shutter

5th tool known as Scrot
Another command-line tool to take the screenshot in Linux. I use it most f the time. Wec an use Scrot to take multiple scren shorts using while loop command. The command will click the images after every 5 seconds. To install it use the command written below.
$ sudo apt-get install scrot
$ while true; do scrot -d 5 '%Y-%m-%d-%H:%M:%S.png' -e 'mv $f ~/Pictures/'; done

5 Create custom gnome-screenshot shortcut to take screenshots in Linux

Now we will learn How to create custom gnome-screenshot shortcut to take screenshots in Linux on Ubuntu 20.4. Ubuntu Linux GUI Terminal supports this feature by default. You can click the shortcut for a selected area by pressing keys SHIFT + PrtScn. In my system, it was not there, so I'll show you how to get that in your Ubuntu Linux.
To Create a Shortcut for a selected area screenshot in Linux follow the steps: Step 1 Go to settings

Step 2 Scroll down and click on Keyboard Shortcuts

Step 3 Scroll down and Click on + Icon at the very end of the screen

Step 4 Fill in the same details shown in the image below

Step 5 Click on the Set shortcut and press the keys Shift and PrtScn together.

Step 6 Click on Add you are set to go. Now, whenever you press shift and PrtScn you will see your mouse icon will change to the plus icon. Click anywhere on the screen and drag it to the area you want to save as screen short. That is it. The screenshot will be automatically saved to Picture.

NOW ITS TIME TO SHOW YOU A BONUS TRACK. Let me show you how to create another shortcut that will help us to close the stuck program any time when you press the key and point out the mouse on the program to close. It will close the program with a single click.
Follow the steps once again. Steps from 1 to 3 will be the same. Come to step 4 by repeating all the previous steps. See the image and enter the same test in the boxes in front of you.

Now click on add Shortcut.
6 Trick Create scripts to take screenshots in Linux

To take the screenshots using custom scripts you need to download the script from our GitHub repository. There are various options (tool uses gnome-screenshot command line scripts) you might have not thought of. You can utilize all the scripts in a single click for free. All the available options are shown in the image attached below.
1 Click options
2 Click screen no mouse ponter
3 Click the Active terminal
4 Click screen + mouse ponter
5 Click the sellected area
6 Click delay 2 seconds
7 Click sellected area to clipboard
8 Click active terminal to clipboard
9 Click and compress sellected area


This was it for the day, if you want further explanations on the article please watch the video on our YouTube channel. For now, take care and have fun. See you in the next article.

Uk2blogger