Instant screenshot

Forum rules
Before you post please read how to get help
Post Reply
Gekoncze
Level 2
Level 2
Posts: 63
Joined: Wed Aug 10, 2011 11:41 am
Location: Czech republic

Instant screenshot

Post by Gekoncze » Tue Jun 27, 2017 12:36 pm

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?
Packard bell Easynote TJ71;
Linux mint Debian 64-bit (dual boot with fedora 17)

User avatar
xenopeek
Level 24
Level 24
Posts: 23220
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Instant screenshot

Post by xenopeek » Tue Jun 27, 2017 1:40 pm

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 16
Level 16
Posts: 6291
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Instant screenshot

Post by Flemur » Tue Jun 27, 2017 1:51 pm

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?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

Gekoncze
Level 2
Level 2
Posts: 63
Joined: Wed Aug 10, 2011 11:41 am
Location: Czech republic

Re: Instant screenshot

Post by Gekoncze » Wed Jun 28, 2017 6:10 am

Thanks for help :) It works!
Packard bell Easynote TJ71;
Linux mint Debian 64-bit (dual boot with fedora 17)

User avatar
diacad
Level 1
Level 1
Posts: 26
Joined: Sun Mar 02, 2014 9:43 am

Re: Instant screenshot

Post by diacad » Sun Jan 07, 2018 11:45 pm

Tried all suggested here, none of the above works for me. Explain a little more fully for us newbies.

User avatar
jimallyn
Level 18
Level 18
Posts: 8556
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: Instant screenshot

Post by jimallyn » Mon Jan 08, 2018 12:23 am

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?
Image

“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

Post Reply

Return to “Xfce”