flameshot-org / flameshot

Powerful yet simple to use screenshot software :desktop_computer: :camera_flash:
https://flameshot.org
GNU General Public License v3.0
24.7k stars 1.58k forks source link

Flameshot not starting up #3383

Open rajivharlalka opened 11 months ago

rajivharlalka commented 11 months ago

Flameshot Version

Flameshot v12.1.0 (0bbb9528)
Compiled with Qt 5.15.11

Installation Type

User repository (AUR)

Operating System type and version

linux: 6.1.57-1-lts Arch Linux Wayland

Description

Journal Logs:

Oct 13 11:31:02 rajiv systemd[2451]: Started Application launched by gsd-media-keys.
Oct 13 11:31:02 rajiv flameshot[19158]: Theme parsing error: gtk.css:6616:68: Invalid name of pseudo-class
Oct 13 11:31:02 rajiv xdg-desktop-por[3173]: Failed to show access dialog: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Only the focused app is allowed to show a system access dialog
Oct 13 11:31:02 rajiv flameshot[19158]: flameshot: error: Unable to capture screen
Oct 13 11:31:02 rajiv flameshot[19158]: flameshot: error: Unable to capture screen
Oct 13 11:31:02 rajiv flameshot[19158]: flameshot: info: Screenshot aborted.

Whenever I start flameshot (using any means) I get the above logs and a notification on "Unable to capture screen" on my screen

Steps to reproduce

No response

Screenshots or screen recordings

No response

System Information

linux: 6.1.57-1-lts Arch Linux

Gnome Wayland

mmahmoudian commented 11 months ago

Please provide all the requested information correctly. For instance:

rajivharlalka commented 11 months ago

Flameshot version:

🔋100% ➜  flameshot -v
Flameshot v12.1.0 (0bbb9528)
Compiled with Qt 5.15.11

desktp environment: Wayland

mmahmoudian commented 11 months ago

Flameshot version:

🔋100% ➜  flameshot -v
Flameshot v12.1.0 (0bbb9528)
Compiled with Qt 5.15.11

Please edit the main post and correct the Flameshot version.

desktp environment: Wayland

I think it is safe to assume you are a Gnome Wayland user. Please also add that to the main post. Thanks.

rajivharlalka commented 11 months ago

Yes, I am a Gnome Wayland user. Gnome version 45.0

Updated the main post

sabaoonnayyarai commented 11 months ago

I am having the same problem with Ubuntu 22.04.3 LTS Flameshot v11.0.0 (11.0.0-2 Debian) Compiled with Qt 5.15.2 linux: 6.2.0-35-generic ubuntu: 22.04

sabaoonnayyarai commented 11 months ago

I was able to detect the problem I had, there is a built in screenshot tool, when I click on the flameshot, that tool is started. There is a share button on that tool, when I clicked on that share button, flameshort starts the area selection

sabaoonnayyarai commented 11 months ago

This is the issue video.

Screencast from 20-10-2023 15:26:52.webm

almazgaliev commented 11 months ago

installing flameshot-git version solved issue for me

rajivharlalka commented 11 months ago

^ The above are not my issues. For me the app doesnt even take the screenshot. The latest journal logs.

Oct 21 10:15:24 rajiv flameshot[7203]: Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Oct 21 10:15:24 rajiv flameshot[7203]: Theme parsing error: gtk.css:6616:68: Invalid name of pseudo-class
Oct 21 10:15:24 rajiv xdg-desktop-por[2859]: Failed to show access dialog: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Only the focused app is allowed to show a system access dialog
Oct 21 10:15:24 rajiv flameshot[7203]: flameshot: error: Unable to capture screen
Oct 21 10:15:24 rajiv flameshot[7203]: flameshot: error: Unable to capture screen
Oct 21 10:15:24 rajiv flameshot[7203]: QLayout: Attempting to add QLayout "" to SidePanelWidget "", which already has a layout
Oct 21 10:15:24 rajiv flameshot[7203]: flameshot: info: Screenshot aborted.
heldchen commented 11 months ago

same issue and same log entries on a vanilla Ubuntu 23.10 (Flameshot v12.1.0):

Okt 23 17:26:07 b-wing xdg-desktop-por[5645]: Failed to show access dialog: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Only the focused app is allowed to show a system access dialog
Okt 23 17:26:07 b-wing Flameshot.desktop[5139]: flameshot: error: Unable to capture screen
Okt 23 17:26:07 b-wing Flameshot.desktop[5139]: flameshot: error: Unable to capture screen
system-dip commented 11 months ago
error time=1698367141.391390 sender=:1.19 -> destination=:1.49 error_name=org.freedesktop.DBus.Error.UnknownMethod reply_serial=40
string "No such interface “org.freedesktop.portal.Screenshot” on object at path /org/freedesktop/portal/desktop"

My current problem is on Ubuntu 23.10, swaywm. I followed on desktop portal related troubleshooting steps from the wiki.

liuzhiyuan562 commented 11 months ago

same problem, how to deal it?

Xenion1987 commented 11 months ago
Flameshot v12.1.0 (-)
Compiled with Qt 5.15.10
linux: 6.5.5-1-MANJARO
manjaro: Gnome

Same issue when starting via custom keybind Print:

systemd[2301]: Started Application launched by gsd-media-keys.
flameshot[6455]: Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
xdg-desktop-por[2979]: Failed to show access dialog: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Only the focused app is allowed to show a system access dialog
flameshot[6455]: flameshot: error: Unable to capture screen
flameshot[6455]: flameshot: error: Unable to capture screen
flameshot[6455]: flameshot: info: Screenshot aborted.
sabaoonnayyarai commented 11 months ago

same problem, how to deal it?

don't use wayland

sabaoonnayyarai commented 11 months ago

same problem, how to deal it?

don't use wayland

It seems like wayland is the problem. I don't know what else is?

system-dip commented 11 months ago

same problem, how to deal it?

don't use wayland

Wayland is the default on the two largest shares of Linux desktop (Ubuntu, RHEL / Fedora), Red Hat plans to end X.org support by the end of the decade, X.org is deprecated as of right now. Outside of these reasons, you are contributing nothing by stating "don't use wayland". Everyone realizes that switching back to X.org alleviates most problems, but this is not the point. To add to this, Flameshot has worked under Wayland is the past, so something is likely breaking Flameshot downstream.

sabaoonnayyarai commented 11 months ago

same problem, how to deal it?

don't use wayland

Wayland is the default on the two largest shares of Linux desktop (Ubuntu, RHEL / Fedora), Red Hat plans to end X.org support by the end of the decade, X.org is deprecated as of right now. Outside of these reasons, you are contributing nothing by stating "don't use wayland". Everyone realizes that switching back to X.org alleviates most problems, but this is not the point. To add to this, Flameshot has worked under Wayland is the past, so something is likely breaking Flameshot downstream.

Oh, I am sorry for my ignorance on the matter. Skype also cannot share screen. I guess, that's also because of wayland.

mmahmoudian commented 11 months ago

I hid the conversation above just to keep the thread clean for the devs.

But I think I should clarify one major point: In Flameshot we can have bugs in various levels:

  1. Operating System (Linux, BSD, MacOS, Windows)
  2. Display Service / Display Protocol (X or Wayland)
  3. Containerization (in case of Flatpak, Snap, and AppImage)
  4. Dependency tree (different OSs ship slightly different versions)
  5. PEBCAK

Unlike X11, Wayland is a protocol, so Gnome, Plasma, wl-roots, ... have their own implementation of this protocol. Out of all these, Gnome is the main one which is giving us a hard time.

Also, in Flameshot we are all volunteers and using our own free time to push this project forward. We do not accept donations, and the only form of contribution we accept in the order of preference are:

  1. Code or documentation contribution
  2. financial contribution by putting bounty on the issues you like to be solved (your donation directly and 100% translates to the issue you want to be addressed)
  3. bug reports and feature requests

more information here: https://flameshot.org/donate/

Thank you all for your understanding and patience.

redteampanda-ng commented 11 months ago

Same problem here on Ubuntu 23.10 Shortcut "Print" does not work, but running flameshot gui from the terminal does. Info regarding my setup below.

Flameshot Version:

Flameshot v12.1.0 (Debian 12.1.0-2)
Compiled with Qt 5.15.8

System Info:

System:
  Host: redacted Kernel: 6.5.0-10-generic arch: x86_64 bits: 64
    Desktop: GNOME v: 45.0 Distro: Ubuntu 23.10 (Mantic Minotaur)
Graphics:
  Display: wayland server: X.Org v: 1.23.2 with: Xwayland v: 23.2.0
    compositor: gnome-shell driver: X: loaded: amdgpu
    unloaded: fbdev,modesetting,radeon,vesa dri: radeonsi gpu: amdgpu
    resolution: 1: 1920x1080~60Hz 2: 1920x1200~60Hz
  API: OpenGL v: 4.6 Mesa 23.2.1-1ubuntu3 renderer: AMD Radeon Graphics
    (renoir LLVM 15.0.7 DRM 3.54 6.5.0-10-generic)

Monitors:

Monitors: 2
 0: +*DP-3 1920/540x1080/300+1920+0  DP-3
 1: +DP-5 1920/520x1200/320+0+0  DP-5

dbus:

signal time=1698850346.634021 sender=org.freedesktop.DBus -> destination=:1.1871 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.1871"
signal time=1698850346.634039 sender=org.freedesktop.DBus -> destination=:1.1871 serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
   string ":1.1871"
method call time=1698850348.992080 sender=:1.1874 -> destination=org.freedesktop.DBus serial=11 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0='org.a11y.Bus',arg1=''"
method call time=1698850348.992109 sender=:1.1874 -> destination=org.freedesktop.DBus serial=12 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameHasOwner
   string "org.a11y.Bus"
method call time=1698850348.992231 sender=:1.1874 -> destination=org.freedesktop.DBus serial=13 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0='org.a11y.Bus'"
method call time=1698850348.992274 sender=:1.1874 -> destination=org.freedesktop.DBus serial=14 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
   string "org.a11y.Bus"
method call time=1698850348.992383 sender=:1.1874 -> destination=org.a11y.Bus serial=15 path=/org/a11y/bus; interface=org.freedesktop.DBus.Properties; member=Get
   string "org.a11y.Status"
   string "ScreenReaderEnabled"
method call time=1698850348.992864 sender=:1.1874 -> destination=org.a11y.Bus serial=16 path=/org/a11y/bus; interface=org.freedesktop.DBus.Properties; member=Get
   string "org.a11y.Status"
   string "IsEnabled"
method call time=1698850352.909097 sender=:1.1874 -> destination=org.freedesktop.Notifications serial=17 path=/org/freedesktop/Notifications; interface=org.freedesktop.DBus.Introspectable; member=Introspect
method call time=1698850352.909640 sender=:1.1874 -> destination=org.freedesktop.DBus serial=18 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0='org.freedesktop.Notifications'"
method call time=1698850352.909682 sender=:1.1874 -> destination=org.freedesktop.DBus serial=19 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
   string "org.freedesktop.Notifications"
method call time=1698850352.909904 sender=:1.1874 -> destination=org.freedesktop.DBus serial=20 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch
   string "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0='org.freedesktop.Notifications'"
method return time=1698850352.920081 sender=:1.1874 -> destination=:1.1878 serial=21 reply_serial=21

Thank you for developing and improving flameshot.

mmahmoudian commented 11 months ago

Try the solution proposed here:

https://github.com/flameshot-org/flameshot/issues/3326#issuecomment-1789267986

heldchen commented 11 months ago

using /bin/sh -c '/usr/bin/flameshot gui' as a key shortcut works for me in Ubuntu 23.10, no need to create a custom bash script. thanks @mmahmoudian

redteampanda-ng commented 11 months ago

using /bin/sh -c '/usr/bin/flameshot gui' as a key shortcut works for me in Ubuntu 23.10, no need to create a custom bash script. thanks @mmahmoudian

This works for me as well, thank you!

mirao commented 11 months ago

Got the issue after upgrade Ubuntu 23.04 => 23.10. It worked well in Ubuntu 23.04.

$ flameshot --version
Flameshot v12.1.0 (Debian 12.1.0-2)
Compiled with Qt 5.15.8

I'm running Gnome 45.0, Wayland

flameshot gui works for me.

NastyaGrifon commented 11 months ago

using /bin/sh -c '/usr/bin/flameshot gui' as a key shortcut works for me in Ubuntu 23.10, no need to create a custom bash script. thanks @mmahmoudian

Doesn't work for me, yet the 3326 comment did

~ flameshot --version 
Flameshot v12.1.0 (-)
Compiled with Qt 5.15.10
Linux 6.5.9-1-MANJARO 
gnome-shell-extensions 45.1-1
Wayland session
KamilBaczkowski commented 10 months ago

I am also affected by this (I left a comment in another issue), but I managed to find a workaround: if I do gtk-launch org.flameshot.Flameshot.desktop as noted here, then I can do flameshot gui and even use the keyboard shortcut I set up.

snide commented 8 months ago

For folks on Gnome, setting the correct flatpak permissions so that Flameshot can take images might help.

flatpak permission-set screenshot screenshot flameshot yes

All of the other solutions didn't work for me, but doing the above finally fixed it.

Squallsoldier commented 8 months ago

For folks on Gnome, setting the correct flatpak permissions so that Flameshot can take images might help.

flatpak permission-set screenshot screenshot flameshot yes

All of the other solutions didn't work for me, but doing the above finally fixed it.

This Worked for me, thanks!

muuki88 commented 8 months ago

I had to adjust the command a little bit if you installed flameshot via flatpak

flatpak permission-set screenshot screenshot org.flameshot.Flameshot yes