Xfce Wiki

Sub domains
 

This is an old revision of the document!


xfce4-screenshooter - Usage

Open the user interface

To launch the application, use the Screenshot item in the Accessories category of Xfce's main menu.


Taking a screenshot

xfce4-screenshooter Main Dialog Window
xfce4-screenshooter Main Dialog Window


Region to capture

The Region to capture section allows you to set what the screenshot will be taken of:

Entire screen
Takes a screenshot of the whole screen as you see it.
Active window
Takes a screenshot of the active window. This will be the one that was active before this dialog appeared, or if you set a delay, the one that is active after the delay.
Select a region
Allows you to select a region to be captured by clicking and dragging a rectangle over the area of screen that you wish to capture, before releasing the mouse button. You can also press Ctrl while dragging to move the rectangle.
Capture the mouse pointer
This option allows you to select whether the screenshot will include the mouse pointer.
Capture the window border
This option allows you to select whether the screenshot will include the window border. Only available for the Active window region.

For an explanation about Preferences, please consult Custom Actions.

Delay before capturing

The Delay before capturing section allows you to set the delay that will elapse between pressing the OK button and screenshot being taken. This delay will allow you to open menus or to perform whatever action you require to see displayed in the screenshot.

Back to Top


After capturing

After pressing the OK button a second window will be displayed:

xfce4-screenshooter Action Window
xfce4-screenshooter Action Window

Preview

The Preview section displays a thumbnail of the screenshot.

Action

The Action section allows you to choose what should be performed on the screenshot.

Save
The Save option will save the screenshot to a file. A save dialog will be displayed. You will be able to set the save location, the name of the file and its format (PNG, JPEG, BMP and, if the corresponding pixbuf loaders are installed, WebP, JPEG XL and AVIF).
Xfce4 Screenshooter is also able to save the screenshot to any remote file system supported by GVfs, such as FTP, SAMBA, SFTP, remote computers accessible via SSH… You just need to connect this remote file system using gvfs-connect or Gigolo and it will be available in the left column of the save dialog.
Copy to the clipboard
The Copy to the clipboard option allows you to paste the screenshot in another application, such as a word processor. This option is only available when a clipboard manager is running.
Open with
The Open with option saves the screenshot to the system's temporary directory and opens it with the application chosen from the drop-down list. Applications which support images are automatically detected and added to the drop-down list.
Custom Action
The Custom Action saves the screenshot to the system's temporary directory and executes the custom action chosen from the drop-down list. Custom Actions are defined in the Preferences dialog, for more details see Custom Actions.

Back to Top


Hosting on Imgur™

As of the Xfce 4.18 release this option has been removed. Alternatively, the same feature can be accomplished using a configurable custom action.

Back to Top


Command-line options

xfce4-screenshooter can also be run from a terminal, which lets you take screenshots quickly without going through the main dialog. Command-line options are also useful to bind the Print Screen key to xfce4-screenshooter: configure the keyboard shortcuts of your desktop environment (for example with xfce4-keyboard-settings) so that pressing Print Screen launches xfce4-screenshooter with one or more of the options below.

Run xfce4-screenshooter --help to see the list of options supported by your installed version.

Region to capture

These options select what to capture. Only one of them can be given at a time. Without any of them, the main dialog is shown and most of the other options are ignored.

-f, --fullscreen
Takes a screenshot of the entire screen.
-w, --window
Takes a screenshot of the active window.
-r, --region
Lets you select the region to capture by clicking and dragging a rectangle over the area of the screen that you wish to capture, then releasing the mouse button. Press Ctrl while dragging to move the rectangle, or Esc to cancel.

Capture options

These options only have an effect when -f, -w or -r is given.

-d, --delay SECONDS
Waits the given number of seconds before taking the screenshot. With -r, the delay starts after the region has been selected.
-m, --mouse
Includes the mouse pointer in the screenshot.
--no-border
Removes the window border from the screenshot. Only meaningful together with -w.

Actions

These options select what to do with the screenshot and only have an effect when -f, -w or -r is given. If no action is given, the action window is shown after the capture.

-s, --save PATH
Saves the screenshot without showing any dialog. PATH can be a directory, in which case a file name is generated automatically, or a full file path. The format is chosen from the file extension: png, jpg (or jpeg) and bmp are always supported, while webp, jxl and avif require the corresponding pixbuf loaders to be installed (see --supported-formats).
-S
Shows the saved screenshot in the file manager. Only has an effect together with -s.
-o, --open COMMAND
Saves the screenshot to the system's temporary directory and opens it with COMMAND, for example -o gimp. The path of the screenshot is appended to the command. Cannot be used together with -s.
-c, --clipboard
Copies the screenshot to the clipboard. Can be combined with -s or -o.

Other options

--supported-formats
Lists the supported image formats and exits. The results depend on the installed pixbuf loaders. All other options are ignored.
-V, --version
Prints the version and exits.
-h, --help
Lists all the available options and exits.

Notes

  • Conflicting options, such as two of -f, -w and -r, or -s together with -o, make xfce4-screenshooter print an error and exit.
  • Options that are ignored because -f, -w or -r is missing produce a warning on the terminal.
  • When an action is given on the command line, xfce4-screenshooter runs non-interactively: errors are printed to the terminal and the program exits with a non-zero status, which makes it suitable for scripts.

Command-line examples

Here is a small collection of examples demonstrating what is possible to accomplish with a little shell-fu and some creativity. Some of the commands below come from feature requests for very specific solutions, which would bloat xfce4-screenshooter's UI but are easy to achieve from the command line. For increased convenience, it is also possible to assign keyboard shortcuts to commands with the help of xfce4-keyboard-settings or add launchers to xfce4-panel.

# Take fullscreen screenshot and save to desktop without asking the file name
xfce4-screenshooter -f -s "$HOME/Desktop/Screenshot_$(date +%Y-%m-%d_%H-%M-%S).png"

# Take screenshots at regular intervals and stop after 8 captures
# repeat is a zsh built-in function, use for or while when using other shells
repeat 8 sh -c 'xfce4-screenshooter -f -s ~/Desktop/$(date +%Y%m%d_%H%M%S).png; sleep 5.25'

Back to Top


Return to xfce4-screenshooter Main Documentation Page