this post was submitted on 08 Jan 2024
27 points (90.9% liked)

Linux

52759 readers
794 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Can you recommend me a tool compatible with GNOME and Wayland, that allows taking screenshots with on-the-fly editing features like drawing or blurring?

Flameshot worked well on X11, but unfortunately, it lacks Wayland support. ShareX was a great tool on Windows; now I'm looking for something similar for Wayland.

top 28 comments
sorted by: hot top controversial new old
[–] danielquinn 22 points 1 year ago* (last edited 1 year ago) (2 children)

GNOME has one built in. Just hit the "print screen" button and it should appear.

[–] [email protected] 2 points 1 year ago (1 children)

with on-the-fly editing features like drawing or blurring

[–] danielquinn 5 points 1 year ago (2 children)

Oops, sorry I didn't notice that part. I've never seen anything like that to be honest. It kinda violates the whole "do only one thing and do it well" UNIX ethos. As a decent work-around, you can just open the resulting images in Gimp?

[–] [email protected] 1 points 1 year ago (2 children)

That's what I've been doing since flameshot stopped working for me. I ask about the built-in solution, because pasting the image into GIMP and blurring specific parts drastically increases the time to prepare such a screenshot

[–] [email protected] 1 points 1 year ago

Couldnt you just put a custom script onto the print button to take the screenshot and send it to a light editing program?
I have my normal screenshot button and another one which afterwards send the selected region to img2txt and puts the detected text into the clipboard.

[–] danielquinn 1 points 1 year ago* (last edited 1 year ago) (1 children)

I had a good think about how to do this The Unix Way™ and my best sugestion would be to have a script that monitors a folder for screenshots and launches a program (gimp) when it sees something. I wrote one, tried it out, and it works really well!

For this, I used inotifywait which you can get by installing inotify-tools (at least, that's what it's called in Arch):

#!/bin/bash

inotifywait -m "${HOME}/Pictures/Screenshots/" -e create -e moved_to |
    while read -r directory action file; do
        if [[ "${file}" =~ ^Screenshot.* ]]; then
            gimp "${file}"
        fi
    done

All this does is use inotify to trigger an action whenever a file is created in the folder (in this case, the Screenshots folder in ${HOME}/Pictures). For our purposes, it just looks for files named Screenshot<something> and if one appears, we launch gimp.

The result is that if you run this thing and start screenshotting with GNOME's built-in tool, each action will trigger gimp. You can then further expand this to perform some sort of custom action (either with a gimp macro or with some Python script, whatever) so that whenever you're running this script, it'll take that screenshot and do something to it whenever it's created.

Does this help?

[–] isVeryLoud 1 points 1 year ago (1 children)

I'll be honest, I don't like having to hack things together.

I'm also looking for a one-stop-shop screenshot and edit tool that I can just install and it'll just work. GNOME's screen shot tool is good, but I wish it opened the screenshots in a lightweight editor app, not GIMP, which is a full image editing suite and makes things like circling, drawing arrows, etc. more complicated than it should be for a screenshot editor. Not impossible, but more complicated.

[–] danielquinn 1 points 1 year ago (1 children)

Well theoretically, you can use the above with any image editor. I just reached for Gimp 'cause it's common. I get that you'd prefer something all-in-one, but I've not heard of something like that (in any OS actually).

What is pretty cool about this method though is that you could conceivably use any program in place of Gimp here, including an arbitrary script you wrote to automatically do the image edits you want. If that's of interest to you, you might want to look at imagemagick or Python's Pillow library.

[–] isVeryLoud 1 points 1 year ago

Windows' default screenshot viewer, snipping tool, lets you edit and censor screenshots.

Regarding the script, my point is you have to assume I have no idea how to program and have no interest in programming, but I still want this feature that's available in Windows 10 and 11. Personally, I program all day, the last thing I want is to program some more for my own computer. It needs to just work.

I get the UNIX methodology of do one thing and do it well, but that methodology doesn't work on a modern desktop as it requires a lot of glue on the user's part. A lot of users who aren't interested in tech or aren't tech savvy are simply going to assume that what they want is impossible, because as far as they are concerned, it is impossible.

Now I'm actually tempted to go out of my way to write a Libadwaita app that integrates with GNOME in some way to handle screenshots and let users edit them before putting them in their clipboards. Your average end user could simply grab this from Flathub and install it without hassle or technical know-how.

[–] [email protected] 1 points 1 year ago

In fairness, the "do one thing and do it well" kinda goes out the window with a lot of GUI programs.

E.g. it's fair to expect a PDF viewer to also have the ability to digitally sign it. It's fair for an email client to have an integrated calendar, etc.

[–] [email protected] 1 points 1 year ago

with on-the-fly editing features like drawing or blurring?

Unfortunately the built-in screenshot tool doesn't have any editing capabilities.

[–] [email protected] 11 points 1 year ago (1 children)

Flameshot has wayland support, however there seems to be some issues that might need to be worked around. Like https://github.com/flameshot-org/flameshot/issues/3326#issuecomment-1854902229

[–] [email protected] 5 points 1 year ago (1 children)

I noticed that the Flatpak didn't work on Fedora 39, probably due to how they build the flatpak or something. I had no problem taking screenshots under Fedora 39 Wayland session using the Appimage.

[–] [email protected] 1 points 1 year ago (1 children)

Same. I want to use flatpak instead of the "raw" binary

[–] [email protected] 1 points 1 year ago

As flameshot is qt based, did you have the xdg QT portal installed when trying? I think that's what makes the qt stuff talk to other things in a wayland environment.

[–] [email protected] 6 points 1 year ago

Did a quick search and ksnip seems to be the only fully featured option. Watershot seems nice.

But also looking into it, Flameshot seems to have full support for Wayland so I'm not sure why you're saying it doesn't?

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (1 children)

Don't know for Gnome, but on Wayland I use grim for screenshots. In combination with slurp I can take screenshots of parts of the screen. The names couldn't be any more stupid, but the tools work very well.

[–] [email protected] 1 points 1 year ago

Unfortunately, neither Grim nor slurp support GNOME

[–] [email protected] 2 points 1 year ago

Try Satty? It's inspired by flameshot, Wayland native, and written in Rust.

[–] [email protected] 1 points 1 year ago (1 children)

it lacks Wayland support.

It lacks wayland support in the sense that the UI won't run on Wayland. It can take screenshots on Wayland.

[–] [email protected] 5 points 1 year ago

Okay, so the vending machine works, but the buttons do nothing. Brilliant!

[–] [email protected] -4 points 1 year ago (3 children)

Taking screenshots? What's the use case for that? That's an invalid use case. Didn't you know wayland is only a protocol?

[–] [email protected] 3 points 1 year ago (1 children)

genuinely just a horrible take

[–] isVeryLoud 1 points 1 year ago

It's a joke

[–] [email protected] 3 points 1 year ago (1 children)

I'm amazed people don't get the reference to Gnome devs here. I'm not even a Gnome user and I got the joke right away.

[–] k_rol 1 points 1 year ago (1 children)

I don't get it either. I'd like to be educated on the topic. What do I look for?

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

This was the best writeup of the controversy I could find with a quick Google search:

https://felipec.wordpress.com/2023/03/04/one-decade-later-gnome-still-sucks/

Edit: Love that I'm being downvoted for providing context. I don't even have a horse in this race. Last time I used Gnome was years before Gnome 3 came out.

[–] [email protected] 1 points 1 year ago

also, linux is only a kernel