-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
flameshot with Gnome 44 and wayland working only in specific setting #3213
Comments
I forgot to mention that in case the screenshot doesn't work I also see
in the syslogs |
Thanks for the detailed report. It is highly appreciated. |
I have to say thank you for your work on this great tool!! :-) |
@manfredlotz Hi, can you help to test if |
Hm, when I install
There is more grim like stuff in AUR. Which one should I try? |
Sure enough, wlroots' screenshot adapter doesn't work, can you find other command line screenshots for gnome? |
You mean one working with Wayland, I assume. I will take a look. |
The Gnome builtin screenshot utiliy works of course but I guess this is not a test you like to see. |
yep Just find the command line screencast tool for gnome's wayland technology, and I'll be able to use it as a screencast adapter |
It should be a command-line screenshot tool that can output screenshots through stdout or files, without any graphical interface, and it applies to the wayland screenshot protocol of GNOME and can work properly in the wayland environment of gnome. |
@manfredlotz Can you help me find it? |
I will try. I wasn't yet successful to find a command line screenshot tool working with Wayland. Searching.... |
If you find it, just let me know, and then I'll check the documentation for this tool, and then, I'll submit a PR to enable this adapter. This solves the problem of relying on dbus under wayland |
Not yet found anything. The only quick and dirty way I found was
This works fine. Should add that I did not specifically set any env var. |
Using dbus to take screenshots in wayland is not a good idea. I prefer to use a screenshot adapter that supports the corresponding wayland compositor screenshot protocol I'll look for it, but I'm not sure I can find the right one. If you can, please let me know. |
It is not easy to find anything. I let you know if I will find something. |
@manfredlotz https://github.com/ksnip/ksnip Can you help test this? Use the following command
It also has a GUI function for editing, but we only need the command line You can do automatic downloads from your distribution's package manager |
Hm, when I try
Now trying: and get
|
GNOME seems to have only a dbus screenshot interface, my goodness! |
env XDG_SESSION_TYPE=gnome QT_QPA_PLATFORM=wayland ksnip -p 1.png -c try |
OK, I tried and got
When I do
|
@manfredlotz okay It looks like gnome has to interface via the dbus bus |
@manfredlotz Can you check if gnome's official screenshot tool can meet the following requirements:
If these requirements can be met, please provide valid command line parameters and explanation of the parameters |
In Gome 44 the screenshot utility is just part of But I could install
|
@manfredlotz okay,I got it |
Please help test this commit with the following cmake parameters
|
@jack9603301 we are short in developers, and getting new developers and contributors is the main priority at the moment. There are lots of PRs that should be reviewed and merged and some high priority bugs |
@mmahmoudian Yes, I agree, it takes a sustained community effort, the perfect open source product is not done by one person, it has to be driven by the community - the big difference with the commercial product model is that commercial products are company driven, the company can hire people or hire regular members by paying them a salary to do it But the main members of the open source community are just enthusiasts - even if it temporarily finds other people or freelancers, the main developers driving the project are still just enthusiasts, relying on their personal commitment to do it for free, so we just need to do it ourselves The community philosophy of the open source community is - no one is obligated to make guarantees for anyone indefinitely, unless you pay someone to do it for you full time or on a temporary basis as a freelancer, otherwise, if you want a feature and it's not there, either wait or implement it yourself! |
@mmahmoudian Maybe flameshot needs full documentation, including how to contribute, and maybe it can attract new users to come forward to contribute |
@jack9603301 please you and anyone else who is willing to discuss this matter join the Matrix room "Developers" from the following Matrix Space so we can discuss the plausible ways to attract new contributors: https://matrix.to/#/#flameshot-org:matrix.org That channel is open 24/7 and we can give it few days to hear all opinions I will hide these last few comments as off-topic at some point, but for the next few days they will be visible to inform all. Thanks |
The security window only popping up when flameshot configuration window is open, is this a bug in flameshot or is it a bug in dbus? |
It's weird, I thought at first that I couldn't take screenshots via command line and gui any way so I added an adapter, yet now you're telling me the original mainline branch screenshot program is accessible too! So what was this problem to begin with? |
Now in the end we recognized that the original problem was that
Only when I opened flameshot configuration dialog first and then tried to get a screenshot by clicking on the flameshot tray icon the security window asking me if I want to allow taking screenshots popped up. Now all is working fine. As asked above: a bug in flameshot, a bug in dbus or (just came to my mind), a bug in Gnome somewhere? |
@manfredlotz I think it's the gnome security restrictions! If you feel this restriction is holding you back, I think you might consider other wayland implementations like hyprland! |
I have no problem that Gnome asks me to allow flameshot to take screenshots as this is asked only one time. My problem is that without the flameshot configuration window open I dont' see the security window and such don't know that Gnome wants to ask me. |
I think this might be a bug in gnome It is not flameshot's problem |
@manfredlotz As @jack9603301 kindly pointed out, that sounds like yet another Gnome issue. |
Yes, it could well be that this is some Gnome issue. |
If you wish, you should file a bug report with the GNOME project |
@mmahmoudian Now there is one more question About #3215 Does it still need to be merged? It uses the gnome command line adapter |
@manfredlotz Thanks for the troubleshooting. @jack9603301 I've also had this problem for quite some time. Thank you for finding an alternate method to get this to work. I've read through this thread implemented the same stuff that you had @manfredlotz do, with the exception of -DCMAKE_INSTALL_PREFIX=/home/ken. When I attempt to take a screenshot after invoking ./flameshot from $HOME/ken/bin, I receive an error
In another terminal window, I'm monitoring dbus a la
Upon initial launching of flameshot, I see:
When I take a screenshot, I hear two camera snapshot sounds and see this:
And
Note that $HOME/Pictures is mounted to my OneDrive account using rclone even though my
I've got so far as to remove the flameshot package that's included in the Debian repo to make sure it's not being used in any way. OS: Debian (testing) |
Hello! Maybe this: flatpak/xdg-desktop-portal#1070 (comment)? Comment edited to show correct link. |
in commit 8ff94a9 the desktop and icon files were renamed. This is a mistake. The names should match the executable instead, like it did before (for flatpak, the manifest has support for file-renaming https://docs.flatpak.org/en/latest/manifests.html#file-renaming so this is not an issue). The desktop file needs to match the executable when launched as a command for the portal to pick up the desktop file for it. The remaining issue is that the security policy of mutter doesn't allow an app without a focused window to show a permission dialog (which makes sense, because you can't tell which app is requesting permission without a visible window). There is really something that flameshot has to fix somehow. |
One more thought: it would be possible to try to take a screenshot without starting the UI, if that fails, start the UI, take a screenshot again. The first time the user tries to take a screenshot, it will fail, the UI will start, the user can then select to always allow the app to take screenshots. When the user then tries to take a screenshot again, it will work without the UI starting. |
Not sure how much I can contribute to this since the original report was so detailed, but I can confirm I'm facing the same issues on Arch (Gnome 44.4) and Flameshot v12.1.0 (a7e0a61) Compiled with Qt 5.15.10 I also tried to create a script to launch the application which does work
and linking the Exec entry in the .desktop file to the script instead of the binary, but this still seems to launch the application without the environment variables. |
Hi, I have the same problem, but the permission popup won't come up even if I open the configuration dialog before taking the screenshot. Do you know of any way to fix this? |
I couldn't find a solution so I had to stop using flameshot
…On Sun, May 5, 2024, 12:52 PM Fabio Fontana ***@***.***> wrote:
Now in the end we recognized that the original problem was that
* when trying a screenshot by clicking on the flameshot tray icon
* the security window to ask if I want to allow flameshot taking screenshots didn't appear
* and the same time there was a message in the syslog
xdg-desktop-por[6966]: Failed to show access dialog: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Only the focused app is allowed to show a system access dialog
*Only when I opened flameshot configuration dialog first* and then tried
to get a screenshot by clicking on the flameshot tray icon the security
window asking me if I want to allow taking screenshots popped up.
Now all is working fine.
As asked above: a bug in flameshot, a bug in dbus or (just came to my
mind), a bug in Gnome somewhere?
Hi, I have the same problem, but the permission popup won't come up even
if I open the configuration dialog before taking the screenshot. Do you
know of any way to fix this?
—
Reply to this email directly, view it on GitHub
<#3213 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFRPVMLDV5IUVTLIHNU4EF3ZAZWVZAVCNFSM6AAAAAAYTC34B2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUHA4TENZRG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I found a workaround. I downgraded |
It works with a workaround:
Maybe it works without the wrapper if you put
|
Thanks @aleb for the solution. I have Ubuntu 24.04 with the same problem, and setting that env solved my problem. Also if Falmeshot is installed via apt, you can change the desktop entry like this:
|
Thanks, it's worked for me |
Flameshot Version
This is EndeavourOS with Gnome 44 and Wayland.
flameshot
is 12.1.0-1Flameshot v12.1.0 (-)
Compiled with Qt 5.15.5
linux: 6.3.4-zen1-1-zen
endeavouros: unknown
Installation Type
Linux, MacOS, or Windows Package manager (apt, pacman, eopkg, choco, brew, ...)
Operating System type and version
Linux, 6.3.4-zen
Description
As I was unable to get a screenshot with
flameshot
I copied/usr/share/applications/org.flameshot.Flameshot.desktop
to
~/.local/share/applications/org.flameshot.Flameshot.desktop
Then I changed the exec line to
Exec=env XDG_SESSION_TYPE= QT_QPA_PLATFORM=wayland /usr/bin/flameshot
flameshot
starts ok but screenshot not workingI ran
dbus-monitor --session sender=org.flameshot.Flameshot
and gotBut when I create a script
~/bin/flameshot.sh
containingthen
flameshot
starts ok and screenshot is working fineHere the
dbus-monitor
showsI have no idea if this is a
flameshot
specific error or if there is some kind of permission whichflameshot
lacks when called directlySteps to reproduce
see above in the description
Screenshots or screen recordings
No response
System Information
The text was updated successfully, but these errors were encountered: