A Better Way To Take Screenshot on Linux using PMSS

PMSS (Poor Man's Screenshooter) is a command line utility which makes capturing screenshots a piece of cake. It is a small, freeware, easy to use shell script which hardly consumes any system resources. It uses well know Linux command line utility, Scrot , on the backend. In order to understand the effectivity of PMSS, lets first understand how Scrot works. Scrot is an open source tool which is already included in the repositories of all popular Linux Package Managers, however taking screenshots using this tool requires you to specify multiple command line parameters. Scrot is a great tool but it is not very user friendly. The creators of PMSS have used the functionality of Scrot along-with a new but extremely easy to use command line interface. PMSS also requires another command line tool called xdotool (A utility to stimulate keyboard inputs or mouse movements). You can do alot of stuff with PMSS, you can:

  • Capture the screenshot of your system's entire screen.
  • Screenshot the particular window in focus.
  • Capture the screenshot of the specific area of the screen selected via mouse.
  • Easily upload  your captured screenshots to imgur.
  • Get the image upload links in various formats.
  • Review the logs of the upload operations performed by this utility.
  • Easily empty your screenshot directory by using a single keystroke.

In this article, we will discuss its installation and usage process on modern day Linux operating systems, Ubuntu 16 and CentOS 7, please be advised that same set of instructions will work for any older versions of these Linux flavors, too. Ready ? Great, lets get started on setting it up on Linux system.

How to Install PMSS on Ubuntu 16 and CentOS 7

Installing Dependencies

As already mentioned in the introductory paragraph of this article, it runs on the basis of following two components.

  • xdotool
  • Scrot

If you try to run PMSS script without installing Scrot , you are expected to see following error message on your terminal.

Scrot

Run following command to install it on Ubuntu system.

sudo apt-get install scrot

Following YUM command will install this dependency on CentOS system.

sudo yum install scrot

"xdotool" can be installed using following commands on Ubuntu and CentOS system respectively.

sudo apt-get install xdotool

sudo yum install xdotool

If you try to run PMSS without installing xdotool, you are supposed to run into following error message on your system's terminal window.

xdotool

Setting up PMSS

Alright, all required dependencies have been installed now, lets go ahead with setup of PMSS. On your Linux system's terminal, run following command to download the zipped contents for this tool.

sudo wget https://github.com/hakerdefo/pmss/archive/master.zip

It should take hardly a minute to download, once download process is complete, extract the downloaded file using following command.

sudo unzip master.zip

unzip pmss

Now go into the extracted directory.

cd pmss-master
Copy the "pmss" executable/binary file located here to "/usr/local/bin" directory. We need to perform this setup so we may be able to run PMSS from anywhere on our system, otherwise we will have to specify exact path each time we need to run it.
sudo cp pmss /usr/local/bin/
We are almost there, simply assign exectuable permissions to the binary file so that our Linux system should be able to run it properly.
sudo chmod 755 /usr/local/bin/pmss
That's it, PMSS has been setup now. Run following command to start using this utility.

pmss

How Use PMSS

As soon as you run "pmss" command on the terminal, it will immediately display the following menu. All the tasks it can perform for you are listed here, right on the main menu.

PMSS

Enter "E" To Take The Screenshot Of The Entire Screen
Enter "W" To Take The Screenshot Of Window In Focus
Enter "A" To Take The Screenshot Of Area Selected By Mouse
Enter "D" To Empty Screenshots Directory
Enter "L" To Manage Upload Log
Enter "Q" To Exit

Let's demonstrate an example; press E on your screen and it will immediately capture the screenshot of your system's entire desktop screen. But interestingly, before performing the screen capture, it will present you with two modes ( as shown in the following screenshot) ; Clean Mode and Dirty Mode. Clean mode saves screenshots in a better format and with detailed logging.

screen capture mode

Screenshot has been captured successfully, it will prompt you to choose whether you want to upload this screenshot to imgur.

upload to imgur

Choose "Y" and it will upload the file and provide you with Download Link, HTML, Mark down and URL to delete this image from imgur. You can use these URLs in your blogs, github, forums, websites etc.

PMSS imgur

Isn't it an extremely easy to use script?

Conclusion

In this article, we have reviewed the features of PMSS (Poor Man's Screenshooter), its setup and usage process on Ubuntu and CentOS operating systems. It is a useful utility for both desktop and command line users of Linux operating systems. It works flawlessly on all popular Linux distributions like Ubuntu, Debian, CentOS, Fedora, RHEL etc. Try it today, you will enjoy the simplicity and power of open source.  You can also download its source code from GitHub.

About Aun Raza

Professional Linux administrator with a passion for Linux web blogging. I have been administrating Linux servers from last seven years and have been involved in Technology blogging from last five years. I love traveling, playing indoor games and watching movies.

Author Archive Page

Have anything to say?

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.