LM 20.1 Cin. 64bit - How to make screenshots without dialog?

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Centauri39
Level 4
Level 4
Posts: 324
Joined: Sun Mar 23, 2014 2:20 pm

LM 20.1 Cin. 64bit - How to make screenshots without dialog?

Post by Centauri39 »

On my LM 20.1 Cin. 64bit there's gnome-screenshot installed, which usually is in interactive mode, which I think is very annoying. if I want to make several screenshots in a short time.

Now, I'm looking for a way to make screenshots without any dialog at all, I mean, I want to press the PRINT key (or another one, if that's necessary) and then the screenshot is automatically created and saved in a predefined folder, lets say /Pictures/Screenshots.
I also want it to have the file name screenshot followed by the date and time of that screenshot.

And then I want it to do the screenshot only from the content of the right monitor. My monitors are called DP-0 (the main monitor on the right) and HDMI-0 (the 2nd one on the left).

Does anybody know how to do this, please?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Centauri39
Level 4
Level 4
Posts: 324
Joined: Sun Mar 23, 2014 2:20 pm

Re: LM 20.1 Cin. 64bit - How to make screenshots without dialog?

Post by Centauri39 »

I just found out, I can press Ctrl+Alt+Print on the active window to make a screenshot of it.
Now, I want to get rid of the dialog, so I'm looking for a way to automatically click the "Save" button of that dialog.

Any ideas?
ajgreeny
Level 7
Level 7
Posts: 1640
Joined: Mon Nov 19, 2007 3:27 pm

Re: LM 20.1 Cin. 64bit - How to make screenshots without dialog?

Post by ajgreeny »

In the past I used Lubuntu (when it was an LXDE distro) and that used scrot for screenshots, saving the image automatically with no dialogue shown at all.

I can not now remember how the images were named, but I think they were saved in my home folder automatically.
Might be worth investigating for your situation.

EDIT:
I have Lubuntu 20.04 running as a VM and it still uses scrot (as well as something called screengrab) but command

Code: Select all

scrot
will automatically save a full screen image in your home named scrot-date/time to differentiate between images, so you can create a keyboard shortcut to scrot and you'll get your image with no dialogue to deal with.
Centauri39
Level 4
Level 4
Posts: 324
Joined: Sun Mar 23, 2014 2:20 pm

Re: LM 20.1 Cin. 64bit - How to make screenshots without dialog?

Post by Centauri39 »

I'm dealing with two issues here at once, because it is a two monitor system.

1. I want to get rid of this dialog (it's just a waste of time and if the target folder is selected once, that dialog is totally useless).
And what kind of screenshot (which monitor, entire screen, active window,...), this should be adjustable by according keyboard shortcuts.

2. I want to be able to select which one of the two screens I want to take a screenshot from.

I already tried scrot, but, so far, I wasn't able to find the right syntax to build the wanted command to select the wanted monitor, and to add date and time into the resulting filename.
I know there's something like "display=", but I don't know what to add there for the display type, number or name.
If I add :0, both monitors are selected together.
If I try :1, no monitor is found at all (DP-0 or HDMI-0 don't work either) and the tool is telling me something about widescreens being not supported.
I mean, what?
Wide screens are already around for many years now, how come they are still unsupported (if I understand that message right).
User avatar
Flemur
Level 20
Level 20
Posts: 10097
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: LM 20.1 Cin. 64bit - How to make screenshots without dialog?

Post by Flemur »

Centauri39 wrote: Tue Jun 15, 2021 6:07 am I already tried scrot, but, so far, I wasn't able to find the right syntax to build the wanted command to select the wanted monitor, and to add date and time into the resulting filename.
I get the date/time in the filename like this:

Code: Select all

scrot /mnt/DATA/download/scrot.'%Y.%m.%d_%H.%M.%S.png'
or, to delay 5 seconds to include menus and mouse pointer,

Code: Select all

scrot -d 5 -p /mnt/DATA/download/scrot.'%Y.%m.%d_%H.%M.%S.png'
Internet search will show you how to (perhaps) get the correct monitor, like this:
https://stackoverflow.com/questions/581 ... separately
scrot -u, --focused = use the currently focused window.
...also mentions a tool called mss which has a not-user-hostile (=not X) way to define which monitor to use.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Locked

Return to “Beginner Questions”