Make prt scr button save a PNG and not open dialog box?

randomguy2543

New Member
Joined
Feb 16, 2021
Messages
2
Reaction score
3
Credits
18
I want to set the default action of the prt scr button on my keyboard to instantly save a date/time stamped .png in the background, without opening up a dialog box.

Any help is appreciated.
I'm on linux mint 20
 


Install scrot(sudo apt install scrot),go to your desktop environment's keyboard settings -> application shortcuts. Then create a shortcut that uses that printscreen button and then make it run the scrot command with the desired options which you can find by man scrot. I did a quick peek in the man for you and "scrot -m" should probably do what you are looking for, it captures your screen and saves it to a png image file.
 
Last edited:
I didn't know if you had a multi-monitor setup, the -m is for multi heads so you can probably just leave out the -m if you only have one screen or only want to capture one screen if you have a multi-monitor setup. You can also give it an option to save all the screenshots into a specific directory and other options, just check the man page if you are looking for something specific.
 
Last edited:
To add to this, even though you've already got a perfectly good solution, I use Shutter to do this.

I first remove the default print screen software, regardless of distro.

I then set the shortcut keys of Print Screen to take a full screenshot (command shutter -f) and Shift + Print Screen is set to selection, which is shutter -s.

Why? Because Shutter has a nifty upload function and can be cropped and edited from within the same application. It lets me draw arrows and text, all from within the Shutter application.

This is admittedly bloated and more than necessary - but Shutter is remarkably light and my personal use means that it's actually open anyhow, or will be open eventually.

This being Linux, there's more than one way to skin a cat.
 

Staff online

Members online


Latest posts

Top