How to Take Screenshots on Linux
Learn how to take screenshots on Linux using GNOME and KDE built-in tools, Flameshot with annotations, and Wayland-compatible command-line utilities.
Before you start
- ▸A running Linux desktop session (GNOME, KDE, Sway, or similar)
- ▸sudo privileges for installing packages
- ▸Basic familiarity with opening a terminal
Taking screenshots on Linux is straightforward once you know which tool fits your desktop and display server. The landscape changed meaningfully with the shift to Wayland: old standbys like scrot and import either break entirely or lose features, so you need Wayland-aware alternatives. This guide covers keyboard shortcuts built into GNOME and KDE, the cross-desktop Flameshot tool, and the command-line options that work reliably on both X11 and Wayland.
Built-in Screenshot Tools
GNOME (including Ubuntu 22.04+)
GNOME Shell 42 and later ships a native screenshot UI that works on both X11 and Wayland. No extra software needed.
- Print Screen — opens the interactive screenshot overlay (select area, window, or full screen)
- Alt + Print Screen — captures the focused window directly to
~/Pictures/Screenshots/ - Shift + Print Screen — captures a region you draw with the mouse
- Ctrl + any of the above — copies to clipboard instead of saving to disk
Screenshots land in ~/Pictures/Screenshots/ as timestamped PNG files. You can change the save path in Settings → Privacy → File History & Trash or via the gnome-screenshot preferences if you install that legacy package.
KDE Plasma (Spectacle)
KDE ships Spectacle, a fully featured screenshot app that handles Wayland through the XDG Desktop Portal.
- Print Screen — opens Spectacle with a region-select prompt
- Meta + Print Screen — captures the active window
- Meta + Shift + Print Screen — full-screen capture
Spectacle lets you add a delay, annotate, and upload directly. Configure defaults under Applications → Spectacle → Configure.
Installing and Using Flameshot
Flameshot is a popular cross-desktop screenshot tool with built-in annotation: arrows, boxes, text, blur, and direct clipboard copy. It works on X11 and has Wayland support as of version 12 (with some caveats noted below).
Installation
Debian / Ubuntu:
sudo apt update && sudo apt install flameshot
Fedora / RHEL 9+ / Rocky Linux:
sudo dnf install flameshot
Arch Linux:
sudo pacman -S flameshot
Basic Usage
Launch the interactive capture mode:
flameshot gui
A crosshair appears. Click and drag to select a region, then use the toolbar to annotate. Press Enter or click the save icon to write the file; press the clipboard icon to copy directly.
Capture the full screen silently and save to a specific directory:
flameshot full --path ~/Pictures/screenshots
Capture with a 3-second delay (useful for capturing menus):
flameshot gui --delay 3000
Binding Flameshot to a Keyboard Shortcut
The most useful setup is binding flameshot gui to Print Screen. Steps vary by desktop:
GNOME: Go to Settings → Keyboard → View and Customize Shortcuts → Custom Shortcuts, add a new entry with command flameshot gui and assign Print Screen. GNOME will ask you to confirm overriding the default binding.
KDE Plasma: Go to System Settings → Shortcuts → Custom Shortcuts, create a new Command/URL shortcut, set the trigger to Print Screen, and the action to flameshot gui.
Screenshots on Wayland
Wayland's security model prevents apps from capturing screen content outside their own window without explicit compositor permission. This is intentional, but it breaks tools that use legacy X11 calls like XGetImage. Here is what works and what does not.
What Works Natively
- GNOME Shell's built-in shortcuts — fully native, no workarounds needed
- Spectacle on KDE — uses the
org.freedesktop.portal.ScreenshotXDG portal, works correctly - Flameshot ≥ 12 on KDE Wayland — uses the portal; a system dialog asks for permission on first use
- Flameshot on GNOME Wayland — works from GNOME 43+ via the portal, but the annotation overlay may appear on a separate surface rather than inline; behavior improves each release
Command-Line Tools on Wayland
scrot, import (ImageMagick), and gnome-screenshot older than version 41 do not work under a pure Wayland session. Use these alternatives instead:
grimshot (Sway / wlroots compositors):
sudo apt install grimshot # Debian/Ubuntu
sudo pacman -S grimshot # Arch
# Capture a region and copy to clipboard
grimshot copy area
# Save a window screenshot
grimshot save window ~/Pictures/window.png
grim + slurp (lower-level, scriptable, wlroots):
sudo apt install grim slurp # Debian/Ubuntu
sudo pacman -S grim slurp # Arch
# Interactive region select, save to file
grim -g "$(slurp)" ~/Pictures/region.png
spectacle from the command line on KDE Wayland:
# Capture full screen, no GUI, save to path
spectacle --fullscreen --background --nonotify --output ~/Pictures/shot.png
Checking Whether You Are on Wayland or X11
echo $XDG_SESSION_TYPE
Output will be wayland or x11. On a hybrid session (XWayland) running an X11 app, this still reports wayland.
Verification
After taking a screenshot with any method, confirm the file exists and is a valid image:
ls -lh ~/Pictures/Screenshots/
file ~/Pictures/Screenshots/Screenshot_from_*.png
Expected output will show a PNG file with a size above a few kilobytes and file reporting PNG image data, NNNN x NNNN. A zero-byte file means the capture failed silently — check the troubleshooting section below.
Troubleshooting
Flameshot produces a black or blank screenshot on Wayland
This almost always means Flameshot is using the X11 capture path via XWayland instead of the portal. Set the environment variable to force portal use before launching:
WAYLAND_DISPLAY=wayland-0 flameshot gui
If that doesn't resolve it, ensure you have xdg-desktop-portal and the appropriate backend installed (xdg-desktop-portal-gnome or xdg-desktop-portal-kde), then log out and back in.
sudo apt install xdg-desktop-portal xdg-desktop-portal-gnome # GNOME/Ubuntu
sudo dnf install xdg-desktop-portal xdg-desktop-portal-gnome # Fedora
Print Screen does nothing in GNOME
GNOME Shell may have crashed or the keybinding may have been overridden by another app. Restart the shell (X11 only: Alt+F2, type r, press Enter) or log out and back in. Verify the binding is still set under Settings → Keyboard.
grimshot / grim not found
These tools are wlroots-specific. They work on Sway, Hyprland, and other wlroots-based compositors. They will not work on GNOME Wayland or KDE Wayland. Use the GNOME built-in shortcuts or Spectacle respectively.
Screenshots are saved at the wrong scale on HiDPI displays
grim captures at native pixel density. Pass -s 1 to scale the output to logical resolution:
grim -s 1 ~/Pictures/logical-size.pngFrequently asked questions
- Why does scrot produce a black screen or fail on my system?
- scrot uses X11 APIs that do not work under a Wayland session. Switch to grim (wlroots), Spectacle (KDE), or the GNOME built-in shortcuts, which all use proper Wayland capture interfaces.
- How do I take a screenshot of a menu or tooltip that disappears when I switch windows?
- Use a delay: 'flameshot gui --delay 3000' waits 3 seconds before activating, giving you time to open the menu. GNOME's overlay also has a delay slider in its interface.
- Where does GNOME save screenshots by default?
- GNOME Shell saves screenshots to ~/Pictures/Screenshots/ as timestamped PNG files. This path is not currently user-configurable from the Settings UI without installing gnome-screenshot.
- Can Flameshot upload screenshots directly to an image host?
- Yes. Flameshot supports uploading to Imgur out of the box. Click the upload icon in the annotation toolbar, or use 'flameshot gui' and select the upload button after selecting your region.
- Does Flameshot work on all Wayland compositors?
- Flameshot 12+ works on KDE Wayland reliably via the XDG portal. GNOME Wayland support improved in GNOME 43 but annotation overlay behavior can still vary. On wlroots compositors like Sway, grim is a more reliable choice.
Related guides
Linux Clipboards Explained (+ Clipboard Managers)
Learn the difference between Linux's PRIMARY and CLIPBOARD selections, use xclip, xsel, and wl-clipboard from the terminal, and manage history with GPaste or Klipper.
Configure LibreOffice for Daily Use
Configure LibreOffice for daily use: set default save formats for MS Office interop, tune autosave, install fonts, and add productivity extensions.
Configure the Touchpad and Multitouch Gestures
Configure Linux touchpad behavior and multitouch gestures using libinput, libinput-gestures, and native GNOME and KDE Plasma settings on both Wayland and X11.
Wayland vs X11: How to Choose and Configure Each
Know when to run Wayland or X11, how to check your current session, switch at login with GDM/SDDM/LightDM, and handle NVIDIA and XWayland edge cases.