Xfce Wiki

Sub domains
 

xfce4-screenshooter - Screenshot Usage

xfce4-screenshooter can be used in two ways: through its graphical user interface (GUI), or from a terminal with command-line options (CLI). The GUI is described in the sections Opening the Appliction, Taking a Screenshot and After Capturing. The Command-line Options section explains how to use xfce4-screenshooter from a terminal, in scripts, or with keyboard shortcuts.


Opening the Application

To launch the GUI application, use the Screenshot item in the Accessories category of Xfce's main menu. Run Screenshot from the CLI with the command xfce4-screenshooter.


Taking a Screenshot

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


Region to capture

The Region to capture section allows for specifying the area of screenshot to capture.

Entire screen
Takes a screenshot of the whole screen.
Active window
Takes a screenshot of the active window. This will be the one that was active before this dialog appeared, or if a delay is set, the window that is active after the delay has elapsed.
Select a region
Allows for selecting a region to be captured by clicking and dragging a rectangle over the area of screen to be captured, before releasing the mouse button. Press Ctrl while dragging to move the rectangle.
Capture the mouse pointer
This option specifies whether the screenshot will include the mouse pointer.
Capture the window border
This option specifies 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 for setting a timed delay(in seconds) that will elapse between pressing the OK button and screenshot being taken. Setting a delay would allow, for example, the opening of menus or performing whatever actions required to see displayed in the captured image.

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 displays three radio buttons allowing a choice of which action should be performed on the screenshot after the image is captured. Select one of the actions listed below, then press the OK button to apply it.

Save
The Save option will save the screenshot to a file. A save dialog will be displayed. Set the save location, the name of the file and its format here(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. This requires connecting to the remote file system using gvfs-connect or Gigolo and it will be available in the left column of the save dialog.
A checkbox labelled “Show in Folder” is displayed below this radio button. If checked, the file manager will be opened after the file is saved to its location.
Copy to the clipboard
The Copy to the clipboard option allows pasting the screenshot into another application, such as a word processor, or image edidor. 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.

Preferences

Custom Action
Initiating a Custom Action will save 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, taking screenshots quickly without going through the main application 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 PrintScrn(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 the 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
Take a screenshot of the entire screen.
-w, --window
Take a screenshot of the active window.
-r, --region
Select a region to be captured by clicking a point of the screen without releasing the mouse butting, dragging your mouse to the other corner of the region and 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