How to call gnome42 built-in screenshot tool in scripts

Gnome 42 provides a built-in screenshot tool instead of gnome-screenshot. How can I call it from the command line?I want to take and edit the screenshot as follows:

gnome-screenshot -caf “$IMAGE_NAME”
xclip -selection clipboard -t image/png “$IMAGE_NAME”
drawing “$IMAGE_NAME”

Read ‘man gnome-screenshot’

There is no man for gnome-screenshot, and gnome-screenshot is a tool before gnome42, it’s not the same way as Gnome42. Fedora 36 won’t install it by default. I want to use gnome42 built-in screenshot tool instead of gnome-screenshot

Not true gnome-screenshot still there !

1 Like

Yes, but @bingfengxiao is asking about the new screenshot tool that is built into gnome-shell now, not the standalone one that we used to use.

Note that the two are different. The old one, gnome-screenshot, is a complete standalone tool. The new one is part of gnome-shell and not a standalone application.

@bingfengxiao I think there is probably a way using dbus and all that, but given how specific to Gnome this is, you’re more likely to get answers on Gnome specific channels. e.g.

Thanks, I found the API for screenshots in https://gjs.guide/, maybe I can try these APIs

1 Like