xfce: Take screenshot without user interface immediately?

All Gurus once were Newbies
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. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
Bas King
Level 1
Level 1
Posts: 17
Joined: Mon Jan 20, 2014 2:38 am

xfce: Take screenshot without user interface immediately?

Post by Bas King »

When I press 'printscreen', I get a popup user interface. I can set a delay starting from one second.
This is not what I want: I want the screenshot to be made AT ONCE, and saved to clipboard or ~/Pictures/ without any further user interface.
I figured out the correct place to set the command-line (settings, keyboard, application shortcuts)
It says on a fresh mint install:
xfce4-screenshooter

Google says there used to be a command-line option for this in xfce4-screenshooter: -h. But that only shows the help now.
Then there was -v (verbose), but that just gives an error.
The help does not mention any option like -h or -v to make a screenshot without the user interface.

But I cant work an user interface when I am in game. What mostly bugs me is the delay, which HAS to be 1 second or more, which is, including the user interface part, taking so long, it ALWAYS makes me miss the event I wanted to screenshot.

The 'best' result I could get was with the fullscreen and clipboard flags,
xfce4-screenshooter -f -c
that did not show the dialog (good), but when I pasted the clipboard in GIMP it just waits and waits and waits, and no clipboard is ever pasted.

This is what I want: in game event happens, I press print-screen: DONE. Screen captured. That must be possible, right?
(Version: xfce4-screenshooter 1.8.1)
Perhaps another screenshooter? (Must be xfce compatible though...)

User avatar
karlchen
Level 21
Level 21
Posts: 12718
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: xfce: Take screenshot without user interface immediately

Post by karlchen »

Hello, Bas King.

Provided you can wait for a few hours then I can look up the commandline options known by xfce4-screenshooter tonight on one of my xfce systems. They all use xfce 4.10.0 or 4.10.2.
Hm, maybe you do not have to wait: Using xfce4-screenshooter via command-line

Cheers,
Karl
Image
Linux Mint 19.2 64-bit Cinnamon, Total Commander 9.22a 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)

User avatar
Flemur
Level 18
Level 18
Posts: 8390
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: xfce: Take screenshot without user interface immediately

Post by Flemur »

This almost does what you want:
$ xfce4-screenshooter -f -s /path/to/save

You still have to hit the 'Save' button after the screen capture because they weren't smart enough to allow for defining the file name, just its location.

Edit:
$ scrot /path/to/filename.jpg
works silently (also with .png extension). 'scrot' is in repositories.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?

Bas King
Level 1
Level 1
Posts: 17
Joined: Mon Jan 20, 2014 2:38 am

Re: xfce: Take screenshot without user interface immediately

Post by Bas King »

xfce4-screenshooter -f -s /path/to/save
Is a working workaround: The screenshot is taken immediately (it just lingers to save it)
Still, it is not the perfect solution, since pressing 'save' on the interface still takes some time and the interface will obscure part of the game during that period... I can live with that though! Pressing 'printscreen', then 'enter' is pretty fast.

Bas King
Level 1
Level 1
Posts: 17
Joined: Mon Jan 20, 2014 2:38 am

Re: xfce: Take screenshot without user interface immediately

Post by Bas King »

I think the reason
xfce4-screenshooter -f -c
did not work is because I have two screens with different sizes, together as one desktop, both on one X-screen :0.0 (so setting the --display option did not help). The interface handles this somewhat correctly. I can see both screens on one large rectangle, with garbled data where 'no screen is'.

Gimp is not happy with the data in the clipboard. I guess because the clipboard does not hold all the data for a complete rectangle.

User avatar
DrHu
Level 17
Level 17
Posts: 7524
Joined: Wed Jun 17, 2009 8:20 pm

Re: xfce: Take screenshot without user interface immediately

Post by DrHu »

This is not what I want: I want the screenshot to be made AT ONCE, and saved to clipboard or ~/Pictures/ without any further user interface..
Missed that part of your post, for your function you will definitely need a screenshot program, that would allow you to send or rename the file(s) into your desired directory/folder..
http://www.cyberciti.biz/open-source/li ... gram-tool/
--an example screenshot program (manager..)
  • The at once option is a problem, how will you manage file naming !
http://tips.webdesign10.com/how-to-take ... untu-linux
--a few ways of taking a screenshot..

same link as above, printscreen options..
http://tips.webdesign10.com/how-to-take ... -revisited
http://www.thegeekstuff.com/2012/08/screenshot-ubuntu/
  • 1. Use Print Screen
    This is the most common method to take screenshots. Pressing the “Print Screen” button will take the screenshot of the “Entire Visible Screen”.
    When we want to take a particular window, we can use “Alt+Print Screen”. Alt+PrintScreen will take only the particular window which is currently active.
--if you use printscreen to get a screenshot, it is the whole screen you are looking at, however once taken, kit could be edited via gimp or other program of your choice.

Obviously for a quick/fast screenshot (once, otherwise it gets overwritten..), a printscrn function is best..

grizzler
Level 5
Level 5
Posts: 652
Joined: Wed Jun 15, 2011 5:19 pm
Location: The Hague, NL

Re: xfce: Take screenshot without user interface immediately

Post by grizzler »

@Bas,

My solution to get a quick screen shot of the currently active window was to assign the command xfce4-screenshooter -wo scrshot to the keyboard shortcut Ctrl+Print. This creates a screenshot file in /tmp, which is offered to the 'application' scrshot. This application is actually a very small shell script I created in /usr/local/bin, with nothing more than

Code: Select all

#!/bin/bash
mv -t "/data/schermafbeeldingen" "$1"
Now when I press Ctrl+Print, a screenshot of the current window appears in the desired directory.

Should be easy to modify all that for what you want.

Bas King
Level 1
Level 1
Posts: 17
Joined: Mon Jan 20, 2014 2:38 am

Re: xfce: Take screenshot without user interface immediately

Post by Bas King »

Ok, I have something that is 99 percent ok:

Code: Select all

sudo apt-get install shutter
attach in Settings:Keyboard:Application Shortcuts to the 'print' button this command-line:

Code: Select all

shutter -a -e -n -o /home/YOURNAME/Pictures/Screenshot_%y-%m-%d_%T.png
Pressing 'printscreen' will now put a file named 'Screenshot_14-05-12_22:43:17.png' in that folder without any user interface.
these are the options I use:
-a (active window), could use -f, but that captures both my screens, I only want my gaming screen. (It works fine with f though. It handles the 'noscreen'-area as 'transparent' in gimp. Nice!)
-e (exit shutter after screenshot has been saved)
-n (no shutter session has to be started)
-o (output file) Using a ~ does NOT work. You HAVE to write the full path out. But thats ok. In the name, you can use year/month/day/time indicators. Dont use option %NN (increasing number), it gives an 'error determining filename' (at v 0.90 Rev.1252)

The only minor disadvantage of this time-based naming is that it only allows one screenshot per second.
But that is plenty for my purpose.

Bas King
Level 1
Level 1
Posts: 17
Joined: Mon Jan 20, 2014 2:38 am

Re: xfce: Take screenshot without user interface immediately

Post by Bas King »

Grizzler. yes, your solution seems best:

keyboard shortcut Print:

Code: Select all

xfce4-screenshooter -wo scrshot

Also works correctly with f(ullscreen) in stead of w(indow) option, btw. It fills the 'no screen area' with garbled data, but who cares.

Sudo gedit a file in /usr/bin named scrshot

Code: Select all

#!/bin/bash
mv -t "/home/YOURNAME/Pictures" "$1"
Use full path, not tilde. chmod +x that file.

Done. Press printscreen: Presto. File saved. It uses a date-time based naming, so only 1 screenshot per second also.

But works like a charm. Very fast. Out of the box. The preferred solution imho.
Last edited by Bas King on Wed Sep 10, 2014 6:27 am, edited 1 time in total.

Bas King
Level 1
Level 1
Posts: 17
Joined: Mon Jan 20, 2014 2:38 am

Re: xfce: Take screenshot without user interface immediately

Post by Bas King »

This overcomes the 'one screenshot per seconds' limitation, it still uses a datetime based naming, but it also includes milliseconds. Thus enabling thousand screenshots per second :D

Code: Select all

#!/bin/bash
date_time_ms=$(date +%F_%T:%3N)
cp "$1" /home/YOURNAME/Pictures/Screenshot_$date_time_ms.png
rm "$1"

Post Reply

Return to “Newbie Questions”