You are somewhat on track. The problem with that is that gnome-screenshot
doesn't support Wayland, so the clipboard option would not work in this case. Zorin OS 16 uses X11 as the default display manager, but Zorin OS 17 uses Wayland now.
Your options are to switch to X11:
Or apply a hack to workaround this limitation:
-
Install a clipboard tool for Wayland:
sudo apt install wl-clipboard
-
Adjust the command that runs when you press the keyboard shortcut.
Since it'll start getting a bit too lengthy for a one line, I suggest you create a new script file and store somewhere in your home directory. Typical location for that would be in$HOME/.local/bin
but you can use any other location you like.#!/usr/bin/bash SCREENSHOT_PATH=$(mktemp -p /run/user/$(id -u) gnome-screenshot.XXXXXX.png) gnome-screenshot --area --file "$SCREENSHOT_PATH" wl-copy < $SCREENSHOT_PATH
-
Make the script executable:
chmod u+x $HOME/.local/bin/screenshot.sh
-
Update the command that runs on keyboard shortcut to:
/home/zenzen/.local/bin/screenshot.sh
Note that you need to type the full path (
$HOME
usually translates to/home/zenzen
), updating the username accordingly. The rest of the path is, as I said, completely up to you.
What this script does is save the screenshot in a temporary file and then the wl-copy
command saves it into the clipboard. This file is saved in an in-memory file system, so it's very fast and avoids reads/writes to the disk. It will persists until you logout or shutdown the system, but you can also adjust the script to delete it immediately afterwards.
You might at this point consider using another tool but this should work fine for now. I could update the script to detect whether you're on X11 or Wayland, and then run the appropriate command, but generally speaking I would recommend using one or the other. Personally, I prefer X11.
EDIT: After a quick test, turns out that the problem is simply that gnome-screenshot -f
doesn't output the file to standard out and instead directly writes the file to disk. You would have to follow the exact same steps whether you're using X11 or Wayland, with the only difference that instead of using wl-copy
you'd use xclip -sel clipboard
.