You are not logged in.
(edit: solved in the sense that i know what is going on. not that it is no longer a problem)
As I understand gnome recently switched to using wayland. I did a system update yesterday. My gnome version is now 3.22.1 and in gnome settings -> details it says it using wayland.
The good news: everything seems to work fine.
The bad news: the screenshot tools scrot, maim and import no longer work.
Scrot and maim produce only black images. Import produces following error message:
$ import -window root foo
import: unable to read X window image `root': Resource temporarily unavailable @ error/xwindow.c/XImportImage/4983.
import: missing an image filename `foo' @ error/import.c/ImportImageCommand/1287.
Question to people using gnome and wayland: can you please verify the behaviour of these screenshot tools?
I am a bit paranoid because before using wayland I had another problem with the screenshot tools and it seemed to me that I was the only one in the internet with that problem. https://bbs.archlinux.org/viewtopic.php?pid=1662272
Last edited by Lesmana (2017-09-12 17:49:32)
Offline
You already got an explanation on your last thread.
That has a simple explanation :gnome now runs on wayland by default, scrot and main are designed to run in X .
scrot etc. are designed to take screenshot of your X session, and are not supposed to work on wayland.
Offline
Thank you for your effort. I am aware of that explanation. I asked for verification because I would like to know whether other people experience the same behaviour. I am a bit paranoid because with my last problem it seemed to me that I was the only one in the internet with that problem.
Offline
FWIW the native screenshot function of gnome seems to work fine with the latest 3.22 and wayland. Use PrtSc button for full screen, Shift+PrtSc to choose an area of the screen, and Ctrl+PrtSc for the current window. I don't know what those other tools do, but hope this helps either way.
-blu
Offline
I posted bug reports for maim and import:
https://github.com/naelstrof/maim/issues/67
https://www.imagemagick.org/discourse-s … =3&t=30759
the homepage of scrot seems to be down: http://www.linuxbrit.co.uk/scrot/
Offline
New observation: behaviour of scrot, maim and import changes with reboots. Sometimes they create screenshots. Sometimes they create black images or error messages. I just rebooted 6 times and in 2 out of 6 reboots I had black images and error messages.
I seldom reboot that is why I did not notice this earlier. Usually I reboot only after a system update. I just did a system update. I do not know whether behaviour change is because of system update.
It seems that I am the only person on the internet with this behaviour. This makes me sad
Offline
I have found an explanation for the behaviour change with reboots. It seems that my system chooses to boot gnome wayland or gnome X at random. At times it even seems to ignore what I select at the login screen. It just picks one or the other at random.
I have not found an explanation for that. Though I have not been researching thoroughly. Actually I just want to use my system and hack my scripts which take screenshots and automate stuff. I just have one system at the moment and I need this one system for daily work. I cannot experiment much for fear of breaking the system.
Offline
At least I have a definitive explanation for why the screenshot tools do not work under wayland:
By design, Wayland is a lot more secure than X11 and does not allow one application to capture the content of other applications' windows, meanignath a X11 based screenshot tool cannot work underWayland/Xwayland.
Both Weston and gnome-shell (Wayland compositors) have screencast and screenshot features built-in.
https://bugs.freedesktop.org/show_bug.cgi?id=98672
So it's not a bug, it's a feature.
I understand the security argument. But why disable that feature only to have it enabled again by gnome (or weston)? Any malicious tool that wants to do harm by screenshoting can do it via gnome instead.
But what do I know. I am but a humble linux user trying to automate stuff by screenshoting and image recognition.
For the curious: I wanted to write aimbots for stupid flash games. Just to distract my tired mind from other tasks. Instead of writing aimbots the last months I have written shell scripts that take screenshots and awk scripts that compares them and learned about wayland and xwayland. So I got that going for me. Which is nice.
Offline