Description of problem: gnome-screenshot broke on GNOME 41. Given that taking screenshots need the compositor, this makes it currently impossible to take screenshots on GNOME 41 on Fedora 35 Beta. Version-Release number of selected component (if applicable): Despite being on Fedora 35 Beta, gnome-screenshot --version reports 40.0. This might be the issue. How reproducible: Try running gnome-screenshot Steps to Reproduce: 1. Run gnome-screenshot -a 2. Watch it print a warning instead of taking a screenshot Actual results: ** Message: 19:15:42.161: Unable to select area using GNOME Shell's builtin screenshot interface, resorting to fallback X11. Expected results: The cursor changes so that I can select an area, resulting in a picture in the Pictures directory. Additional info: None of the screenshot modes work, it's not limited to -a.
I am the maintainer of flameshot and was testing flameshot on Fedora35 and it also does not work. We use dbus under the hood to call the native gnome screenshot tool. I took it one step further and manually called the gnome dbus API and that seems to be the root cause: Steps to reproduce: Call this from the CLI dbus-send --session --print-reply --dest=org.gnome.Shell /org/gnome/Shell/Screenshot org.gnome.Shell.Screenshot.Screenshot boolean:false boolean:false string:'/tmp/test.png' Actual Result: Error org.freedesktop.DBus.Error.AccessDenied: Screenshot is not allowed Expected Result: Saves screenshot to /tmp (or in my case returns to flameshot)
In that case, the problem doesn't seem to be gnome-screenshot, but actually gnome-shell. Moving this to the gnome-shell component.
Proposed as a Blocker for 35-final by Fedora user js using the blocker tracking app because: Being unable to take a screenshot in any way breaks core functionality users expect to work. There also does not appear to be any workaround.
Using print screen and running Screenshot from the overview both work fine for me. I can't launch 'gnome-screenshot' from a console at all, but that's not the usual way of running it. I can also reproduce the dbus error and I see that this may break flameshot, but that just seems like something to figure out between flameshot and gnome-shell and wherever this dbus policy is being set.
Do you have any tips on figuring out where the dbus policy is set?
sorry, not off the top of my head. The GNOME devs may know more. You may want to report this upstream (gitlab.gnome.org) as issues there often get more attention than here.
Pressing Print does nothing for me either. Starting GNOME Screenshot from the overview indeed works, though. But not from the command line.
And I just noticed: I looked at what the .desktop file does, and it just launches gnome-screenshot -w. Running that from the command line doesn't work either. Some difference in environment?
Some more debugging: Running `gnome-screenshot -a` when bound to a key in GNOME doesn't work either. Binding that key to `gtk-launch org.gnome.Screenshot`, it opens the screenshot tool - but then obviously needs extra clicks to actually take a screenshot.
Seems gnome-screenshot only works when launched via D-Bus activation or when using 'gnome-screenshot -i'. Otherwise, it is pretty busted. (In reply to js-fedora from comment #7) > Pressing Print does nothing for me either. Starting GNOME Screenshot from > the overview indeed works, though. But not from the command line. PrtScn works perfectly fine for me. (In reply to js-fedora from comment #8) > And I just noticed: I looked at what the .desktop file does, and it just > launches gnome-screenshot -w. Running that from the command line doesn't > work either. You must be looking at one of the actions. It really uses 'gnome-screenshot --interactive', which is not broken. But even that gets ignored, because it uses DBusActivatable=true.
You're right, I looked wrong, using `gnome-screenshot --interactive` works indeed. Please disregard.
Hello, running the latest version of Gnome-Shell, i.e. gnome-shell-41.0-3.fc35.x86_64, I am seeing the following: * The Print Screen button works for me and creates a screenshot of the entire desktop. * The `gnome-screenshot --interactive` command works commpletely. * The combo `Ctrl-Shift-PrtSc' that would normally allow for area selection DOES NOT WORK. It produces the cross cursor, but when the screenshot is taken, nothing is saved in the Pictures folder. * The `gnome-screenshot -a` command produces warnings (see below) but the screenshot is taken and saved. ** Message: 09:42:17.833: Unable to select area using GNOME Shell's builtin screenshot interface, resorting to fallback X11. ** Message: 09:42:21.664: Unable to use GNOME Shell's builtin screenshot interface, resorting to fallback X11.
(In reply to Lukas Ruzicka from comment #12) > * The combo `Ctrl-Shift-PrtSc' that would normally allow for area selection > DOES NOT WORK. It produces the cross cursor, but when the screenshot is That's because that shortcut saves the picture into the clipboard (you can paste it e.g. in GIMP). Shift+PrintScreen saves it as a file. Both work for me. You can see all the shortcuts in the gnome-control-center.
> (In reply to Lukas Ruzicka from comment #12) > > * The combo `Ctrl-Shift-PrtSc' that would normally allow for area selection > > DOES NOT WORK. It produces the cross cursor, but when the screenshot is > > That's because that shortcut saves the picture into the clipboard (you can > paste it e.g. in GIMP). Shift+PrintScreen saves it as a file. Both work for > me. You can see all the shortcuts in the gnome-control-center. Gosh, I did not realize that. Sorry about that.(In reply to Kamil Páral from comment #13)
Discussed during the 2021-10-11 blocker review meeting: [0] The decision to classify this bug as a "RejectedBlocker (Final)" was made as multiple testers found no bugs in basic functionality here, screenshot taking works as intended via shortcuts and in the app launched from the overview. [0] https://meetbot.fedoraproject.org/fedora-blocker-review/2021-10-11/f35-blocker-review.2021-10-11-16.00.txt
Likely somehow related to: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970
what's left here that would actually be considered a bug, for clarity? not being able to run the app successfully from a console?
(In reply to Adam Williamson from comment #17) > what's left here that would actually be considered a bug, for clarity? not > being able to run the app successfully from a console? That, plus the spew of criticals, yes. In GLib applications, CRITICAL indicates programmer error and undefined behavior, so it should never happen. Here's what I see when I run gnome-screenshot currently: $ gnome-screenshot ** Message: 13:56:02.386: Unable to use GNOME Shell's builtin screenshot interface, resorting to fallback X11. (gnome-screenshot:79948): Gdk-CRITICAL **: 13:56:02.386: gdk_pixbuf_get_from_surface: assertion 'width > 0 && height > 0' failed (gnome-screenshot:79948): GdkPixbuf-CRITICAL **: 13:56:02.386: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed (gnome-screenshot:79948): GdkPixbuf-CRITICAL **: 13:56:02.386: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed *** BUG *** In pixman_region32_init_rect: Invalid rectangle passed Set a breakpoint on '_pixman_log_error' to debug (gnome-screenshot:79948): GdkPixbuf-CRITICAL **: 13:56:02.386: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed (gnome-screenshot:79948): GdkPixbuf-CRITICAL **: 13:56:02.386: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed (gnome-screenshot:79948): Gtk-CRITICAL **: 13:56:02.399: gtk_window_resize: assertion 'width > 0' failed ** (gnome-screenshot:79948): CRITICAL **: 13:56:02.399: Unable to capture a screenshot of any window
I had a shortcut to take a screenshot of an area in gnome-shell, that still doesn't work. This was executing `gnome-screenshot -a`.
As noted above, there is a built-in shortcut for that - shift-prtsc to save an area screenshot as a file, ctrl-shift-prtsc to copy one to the clipboard.
Ah, Print was my compose key, therefore it didn't work. I now found the Shift-Print shortuct in settings and changed it to a different key and that seems to work.
I am also experiencing this issue on Fedora 35 release. I have my PrtScr key bound to a script that runs `gnome-screenshot` to save screenshots to a non-standard location (i.e. $HOME/Pictures/Screenshots) and a custom naming format. Currently this completely breaks my workflow so I would appreciate any attention given to this bug.
Since the screenshot feature has been entirely revamped in GNOME, I'm not sure if this is relevant any longer. From my side, this can be closed.
This message is a reminder that Fedora Linux 35 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '35'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 35 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
So a fix for this was merged upstream: https://gitlab.gnome.org/GNOME/gnome-screenshot/-/commit/97316afbd1e9b0c25de5f87b52d47448ee667bdb that was in 41.0, and that version did make F35: https://bodhi.fedoraproject.org/updates/FEDORA-2021-a15c545dc5 I just tested here on F37 and gnome-screenshot runs OK from a console with no criticals, and saves a screenshot. The F37 build is 41.0-4, but -2, -3 were just rebuilds and -4 was a build fix for a newer meson, so I'm pretty sure this should be OK on F35 now too. So, marking as fixed.