Instant screenshot

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Gekoncze

Instant screenshot

Post by Gekoncze »

I'd like to be able to take screenshot instantly after pressing the print screen button, saving it automatically to some folder. I'd use it mostly for taking screenshots in games where I don't have time to deal with a popup window. Is there any way to do it in xfce?
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.
User avatar
xenopeek
Level 25
Level 25
Posts: 29614
Joined: Wed Jul 06, 2011 3:58 am

Re: Instant screenshot

Post by xenopeek »

xfce4-screenshot can't save a screenshot without user intervention. I'd personally just install gnome-screenshot and add a new keyboard shortcut (in Settings > Keyboard > Application Shortcuts) for this command:
bash -c "gnome-screenshot -f \"$HOME/Pictures/$(date '+Screenshot from %Y-%m-%d %H-%M-%S %N.png')\""

That will save a screenshot in the Pictures directory in your home directory and name it something like "Screenshot from 2017-06-27 17-37-17 619567105.png". The last number in that filename are the nanoseconds. I added that because else if you take two screenshots within the same second the last one would overwrite the first one. If you don't plan to take screenshots that quickly you can remove the " %N" from the above command.

You can save to any directory. Just replace "$HOME/Pictures/" with the full path (and a trailing slash!) of the directory where you want the screenshots saved.
Image
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Instant screenshot

Post by Flemur »

Gekoncze wrote:Is there any way to do it in xfce?
I use 'scrot'; with no params you get a .png image of the whole screen.

~/.fluxbox/keys (key 107=PrintScreen):

Code: Select all

        107 :Exec /usr/bin/scrot
Control 107 :Exec /usr/bin/xfce4-screenshooter
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Gekoncze

Re: Instant screenshot

Post by Gekoncze »

Thanks for help :) It works!
User avatar
diacad
Level 1
Level 1
Posts: 35
Joined: Sun Mar 02, 2014 9:43 am

Re: Instant screenshot

Post by diacad »

Tried all suggested here, none of the above works for me. Explain a little more fully for us newbies.
User avatar
jimallyn
Level 19
Level 19
Posts: 9075
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: Instant screenshot

Post by jimallyn »

It might be better if you start your own thread. It is usually suggested that if a thread is 6 months old, you should start your own, and not just add on to an old thread. In any case, more information will be needed for anyone to be able to help you, like which version of Mint are you using? 17.x? 18.x? And which desktop environment? XFCE? MATE? Cinnamon? KDE?
“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan
Locked

Return to “Xfce”