11

On OSX, I can easily take a picture of desktop using keyboard combinations (Shift-Option-3 or 4). And the images are automatically created in my desktop.

How do I simulate this on Kubuntu?

Thanks

2
  • Do you know how to assign keyboard shortcuts in Kubuntu? There's a nice GUI for it which is a little overwhelming but once you learn it, you're all set! Click on System Settings > Shortcuts > Custom Shortcuts.
    – DK Bose
    Aug 29, 2017 at 5:00
  • Askubuntu software recommendation: askubuntu.com/questions/6558/…
    – user26687
    Aug 29, 2017 at 8:32

4 Answers 4

12

Taking a picture of the desktop using keyboard shortcut and the image is automatically saved to the user desktop

Using Spectacle - KDE Framework 5 default screenshot capture utility:

$ spectacle --help
Usage: spectacle [options]
KDE Screenshot Utility

Options:
  -v, --version              Displays version information.
  -h, --help                 Displays this help.
  --author                   Show author information.
  --license                  Show license information.
  --desktopfile <file name>  The base file name of the desktop entry for this
                             application.
  -f, --fullscreen           Capture the entire desktop (default)
  -m, --current              Capture the current monitor
  -a, --activewindow         Capture the active window
  -u, --windowundercursor    Capture the window currently under the cursor,
                             including parents of pop-up menus
  -t, --transientonly        Capture the window currently under the cursor,
                             excluding parents of pop-up menus
  -r, --region               Capture a rectangular region of the screen
  -g, --gui                  Start in GUI mode (default)
  -b, --background           Take a screenshot and exit without showing the GUI
  -s, --dbus                 Start in DBus-Activation mode
  -n, --nonotify             In background mode, do not pop up a notification
                             when the screenshot is taken
  -o, --output <fileName>    In background mode, save image to specified file
  -d, --delay <delayMsec>    In background mode, delay before taking the shot
                             (in milliseconds)
  -w, --onclick              Wait for a click before taking screenshot.
                             Invalidates delay

Command:

spectacle -f -b -n -o "$HOME/Desktop/ScreenShot-$(date +%Y%m%d%H%M%S).jpg"

will capture the entire desktop image to the user Desktop folder aka desktop.

The command can be added to the KDE menu with the KDE menu editor: https://docs.kde.org/stable5/en/kde-workspace/kmenuedit/index.html

enter image description here

The command can be launched with the user defined shortcut:

enter image description here

When the shortcut is clicked the picture is saved to the desktop:

enter image description here

1
  • Great answer. To make it even better, instead of $HOME/Desktop I would use $XDG_DESKTOP_DIR (In my localized KUbuntu 20, the Desktop folder is not named "Desktop")
    – gog
    Jun 21, 2022 at 7:29
2

ksnapshot is the KDE (kubuntu) version of screen capture. It can be launched from the menu or by pressing prt scrn button

6
  • but it seems it's not as simple as the OSX one (or even the XFCE one.) where a key combo will automatically result in screenshot in an accessible location. I don't want it to just launch the app, I want it to take a screenshot of the whole screen or a region of screen depending on the key combo used.
    – mrjayviper
    Aug 29, 2017 at 4:20
  • press "prt scrn"
    – ravery
    Aug 29, 2017 at 4:24
  • ksnapshot has been deprecated. The application is now spectacle. See spectacle --help.
    – DK Bose
    Aug 29, 2017 at 4:37
  • 1
    And for various reasons, I prefer gnome-screenshot which will need to be installed because it obviously isn't present by default.
    – DK Bose
    Aug 29, 2017 at 4:43
  • 1
    yes gnome-screenshot is part of the gnome desktop not the KDE desktop. many gnome libraries will be installed with it
    – ravery
    Aug 29, 2017 at 4:47
2
  1. Open System Settings -> Keyboard -> Shortcuts

  2. Select Custom Shortcuts

  3. Click Add Custom Shortcut

  4. Fill fields

    • Name to Take a screenshot of region
    • Command to spectacle -r
  5. Click OK

  6. Double-Click one of the unassigned keyboard bindings

  7. Insert your desired binding. (I'm using Super+Shift+S)

enter image description here

0

Post configured

You need to add in Global Shortcuts the Spectacle application. This applications has already a few shortcuts (the importante ones) pre configures but empty. Iǘe attached a picture of my configuration

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .