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

[Linux, Wayland] Avoid intermediate "share" dialog on opening NormCap #264

Closed
NicolasMICAUX opened this issue Sep 6, 2022 · 5 comments
Closed
Labels
backlog This issue is on the roadmap enhancement New feature or request requires upstream change A change in a dependen project is necessary before this issue can be solved

Comments

@NicolasMICAUX
Copy link

NicolasMICAUX commented Sep 6, 2022

On ubuntu 22.04, the screen capture used by normcap brings up a sort of window that lets you choose the way you want to share the screen, then you click "share", then you use the normal normcap capture mode to select one part of the screen. It's redundant and no more ergonomic.
Not your fault, 100% because of the new way ubuntu 22.04 handles screen captures, but maybe there is a workaround.

image

@NicolasMICAUX
Copy link
Author

(this is an enhancement request but i cannot set the label)

@dynobo
Copy link
Owner

dynobo commented Sep 6, 2022

TLDR; This is not a NormCap issue; It is caused by Wayland's security design; The situation will probably improve during the next 1-2 years.

Hi @NicolasMICAUX, thanks for your input! I'm quite annoyed by that additional click, too! As you already have suspected, this is out of my responsibility and my sphere of influence. As it might be of interest for others, too, allow me to share my (limited) knowledge on this topic:

  1. Actually, the issue is not limited to Ubuntu and appears on other distributions as well. All big desktop environments (Gnome, KDE) are affected, when they are running with the Wayland display protocol.

  2. This additional dialog was introduced in the Wayland protocol as a security feature. Its current behavior works as designed, asking the user for every screenshot, without any option for the user to "remember" the decision or "grant permission".

  3. All 3rd party screenshot tools are affected, e.g. take a look at the discussion on Flameshot: Due to recent GNOME 41 update, to take screenshot I need to click "Share" EVERY time. flameshot-org/flameshot#2186 (comment)

  4. I am not aware of any workaround. Because this behavior is rooted in a conscious design decision on security, I also doubt that a robust workaround can be implemented.

  5. The good news: some weeks ago, a PR got merged into the Wayland protocol, which should provide an option for an application to request for permission once and then bypass the check: Screenshot permission, attempt 2 flatpak/xdg-desktop-portal#853

  6. Now, we just have to wait: The first step to improve the situation was implemented (see 5.), it just needs time to bubble up: the desktop environments have to adapt the new protocol, the distributions have to publish new releases with the new desktop environments, then the application developers (like me, for NormCap) might have to adjust their apps to leverage the new functionality. If I had to guess widely, I'd say this will take ~1-2 years max, depending on the distribution.

  7. If you can't wait, run X11 instead of Wayland. This has other drawbacks, of course, and is probably not a suitable solution for most of us. However, if you depend heavily on a lean screenshot workflow, it might be worth considering.

I'm going to leave this issue open, until it can be solved.

@dynobo dynobo changed the title Normcap way of capturing part of the screen is no more ergonomic on ubuntu 22.04 [Linux, Wayland] Avoid intermediate "share" dialog on opening NormCap Sep 6, 2022
@dynobo dynobo added the backlog This issue is on the roadmap label Sep 6, 2022
@dynobo
Copy link
Owner

dynobo commented Sep 17, 2022

Monitoring progress on flameshot-org/flameshot#2868 and how they tackle the issue...

@dynobo
Copy link
Owner

dynobo commented May 9, 2023

Closing, as it got fixed upstream for Gnome 43+ as well as for current KDE Plasma.

@dynobo dynobo added the requires upstream change A change in a dependen project is necessary before this issue can be solved label May 9, 2023
@dynobo dynobo closed this as completed May 9, 2023
@animeshchaudhri
Copy link

Still facing the same issue. Any working workaround ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog This issue is on the roadmap enhancement New feature or request requires upstream change A change in a dependen project is necessary before this issue can be solved
Projects
None yet
Development

No branches or pull requests

3 participants