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
 


f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,916
Reaction score
4,408
Credits
43,483
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:

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,916
Reaction score
4,408
Credits
43,483
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:

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
9,022
Reaction score
7,681
Credits
73,620
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.
 
MALIBAL Linux Laptops

Linux Laptops Custom Built for You
MALIBAL is an innovative computer manufacturer that produces high-performance, custom laptops for Linux.

For more info, visit: https://www.malibal.com

Members online


Latest posts

Top