Screenshots on Gnome (Wayland)

Heyas

I’m trying to make a screenshot with the current Manjaro Gnome.
I used to use:

$ import -window root screenshot.png
import: unable to read X window image 'root': Die Ressource ist zur Zeit nicht verfügbar @ error/xwindow.c/XImportImage/5041.
import:  `screenshot.png' @ error/import.c/ImportImageCommand/1288.

However, since Gnome now uses Wayland, all I get is an error message.
So I’ve been searching this forum and the Arch wiki: Screen capture - ArchWiki
And under section “Wayland”, it says that one should be able to use grim for screenshots.
Sadly, after installing sway and grim, I just get an error:

$ grim  screenshot.jpg
wl_registry@2: error 0: invalid version for global wl_output (4): have 2, wanted 3
compositor doesn't support wlr-screencopy-unstable-v1

Also, using the recomended GIMP variant:

imlib2_grab screenshot.png

While working without an error message, it just results in a completly black image:

$ ll screenshot.png 
-rw-r--r-- 1 sea sea 27K 11. Feb 17:26 screenshot.png

I’m runing Gnome (LTS) with:

$ uname -r
5.10.96-1-MANJARO

All other attempts to get additional information about screen/display just results in:

  • XWAYLAND0
  • Wayland
  • wayland-0 (this would be the resolution :rofl: )

Seems my best guess would be to return to X instead?
Does anyone have a better/working idea please?

Thank you in advance! :slight_smile:

Install either gnome-screenshot or flameshot. Both work on wayland and provide gui and cli options to take screenshot.

Links

gnome-screenshot(1) — Arch manual pages

Flameshot - ArchWiki

1 Like

Initialy, I did press “PRT SCRN” and wanted to paste that to mtpaint - without success…

After installing gnome-screenshot and executing it from the console, I started searching for the result in <$XDG_PICTURES_DIR>, only when I hit on $HOME, I figured, Print Screen was already using gnome-screenshot and stored it in $HOME, as I already had 3 screenshots there (from previous attempts)…
(but one does not search in directories if one think it is only in memory)

Thanks a bunch and sorry for the (unnecesary) trouble. :person_facepalming:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.