Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screenshot prompt is something that looks like GNOME instead of the usual Flameshot GUI tool with a rectangular selector and all the tools #2926

Closed
mattwelke opened this issue Sep 28, 2022 · 7 comments
Labels
Unconfirmed Bug The bug is not confirmed by anyone else.

Comments

@mattwelke
Copy link

Flameshot Version

flameshot --version
Flameshot v12.1.0 ()
Compiled with Qt 5.11.3

Installation Type

Using the ready-made package from Github Releases

Operating System type and version

Ubuntu 22.04.01 LTS

Description

I'm trying to set up Flameshot on a fresh Ubuntu install the way I usually do. I follow instructions for unmapping the PRINT button (print screen) with whatever it was mapped to by default and mapping it instead to flameshot gui (using the absolute path to the binary on my system).

I usually use this askubuntu.com question which has the most detailed answer out there, and I just do what I need to do to account for the fact that the answer is based on an older version of Ubuntu.

So in my case, it means I open Settings > Keyboard, go to "Keyboard Shortcuts", click "View and Customize Shortcuts", click "Screenshots", click "Take a screenshot interactively", then hit Backspace to disable it.

Then, I go to Settings > Keyboard, click 'View and Customize Shortcuts", scroll down, click "Custom Shortcuts", and make a new shortcut. I name it something I like, then use /usr/bin/flameshot gui for the Command, and use Print for the Shortcut.

When I hit Print on my keyboard, I get what looks like a GNOME window. I'd normally include a screenshot right here on GitHub to help explain what I'm seeing, but because of the issue I'm experiencing, I'm unable to always produce screenshots.

It has the title "Screenshot", and three buttons - "Cancel", "Options...", and "Share". It displays a message "Share this screenshot with the requesting application?". If I click Share, I get the purple Flameshot GUI tool that allows me to perform a rectangular area screenshot. Everything at this point works like I expected it to based on my experience setting up Flameshot before on Ubuntu. I can adjust the size of the selection, copy the selection to my clipboard, save a file of the selection, etc.

However, I don't like having to perform the redundant intermediate step where I have to click "Share" from that new window that appears for me, which results in me finally getting to the point where I can take my screenshot. It's also a bit slow. 1 second or so, compared to Flameshot how I remember it, which was basically instant.

Steps to reproduce

  1. Be running Ubuntu 22.04.1.
  2. Install Flameshot via the .deb file in GitHub releases. Latest version as of Sept 27th 2022.
  3. Remove the default Print keyboard shortcut.
  4. Add a new custom keyboard shortcut for Print with the command /usr/bin/flameshot gui.
  5. Hit Print on your keyboard. Observe the window that appears with a full screenshot.
  6. Click "Share" in the new window. Observe normal Flameshot behavior.

Screenshots or screen recordings

No response

System Information

lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.1 LTS
Release:	22.04
Codename:	jammy
@mattwelke mattwelke added the Unconfirmed Bug The bug is not confirmed by anyone else. label Sep 28, 2022
@mattwelke
Copy link
Author

Noticed that if I do everything from the terminal, by running flameshot gui, I get the same thing happening, but I see warnings in the logs:

flameshot gui
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
qt.svg: Invalid path data; path truncated.
qt.svg: Invalid path data; path truncated.

If I run it with that env var set, I get the same behavior. It seems like the env var has no effect on Flameshot.

QT_QPA_PLATFORM=wayland flameshot gui
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
qt.svg: Invalid path data; path truncated.
qt.svg: Invalid path data; path truncated.

@borgmanJeremy
Copy link
Contributor

!gnome41

@chives-bot
Copy link

chives-bot bot commented Sep 28, 2022

Gnome41 introduced a change that requires users to 'Share' their screen every time a user takes a screenshot. This is NOT something that can be fixed or changed within flameshot. There is an agreed upon fix in the xdg-desktop-portal code but someone needs to do the work.

flatpak/xdg-desktop-portal#649

@mattwelke
Copy link
Author

mattwelke commented Sep 29, 2022

@borgmanJeremy Actually, I have a second computer that was setup earlier with Ubuntu 22.04.1 and it works fine. When I hit Print I get the Flameshot GUI immedaitely. No intermediate GNOME "share" dialog.

Here are my details for the system I'm checking this on right now, where it does work:

lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.1 LTS
Release:	22.04
Codename:	jammy
flameshot --version
Flameshot v11.0.0 ()
Compiled with Qt 5.11.3

image

And here is the GNOME info from the machine I was on earlier today where it didn't work:

image

So the difference between them appears to be that the machine I set up yesterday (which is encountering the issue) is using Wayland instead of X11 as its "Windowing System". I don't know why. I set them each up from the same Ubuntu 22.04 USB and then did apt updates on them. They do have different GPUs though. So maybe that has something to do with it.

It appears though that being on GNOME 41+ is not what's causing this issue.

@mattwelke
Copy link
Author

mattwelke commented Sep 29, 2022

I read into those linked issues. I understand now that this is caused by a combination of things - Using GNOME 41+ and using Wayland. So I just need to ensure I'm using X11 instead of Wayland and my issue should go away. I'll have to figure out why my newer computer has decided to use Wayland.

Seems like there's nothing left to do here. ty

@Pheggas
Copy link

Pheggas commented Nov 3, 2022

Any workaround on this? I don't want to leave Gnome nor Wayland.

@mmahmoudian
Copy link
Member

@Pheggas Well, you are asking a Gnome question from Flameshot devs. That said, It seems there has been some improvement on xdg_desktop_portal in which they have "fixed" this. More detailed info can be found in #2868

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unconfirmed Bug The bug is not confirmed by anyone else.
Projects
None yet
Development

No branches or pull requests

4 participants