works from terminal but not from icon tray in Boxes/Ubuntu24
Flameshot Version
flameshot 12.. flameshot/now 13.3.0-1 amd64
Installation Type
Using the ready-made package from Github Releases
Operating System type and version
Ubuntu 24
Description
When I run flameshot in native Ubuntu 24, I can screenshot just fine, initated form the icon tray or the terminal using the flameshot gui command.
However, in the Ubuntu 24 running insided Boxes, I can only screenshot by running the terminal command flameshot gui.
Here comes dbus-monitor dumps of when trying to run it from
- icon tray which produces "Flameshot Error: Unable to capture screen"
- terminal, using the
flameshot gui
From Icon tray:
$ dbus-monitor --session sender=org.flameshot.Flameshot
signal time=1763890261.267551 sender=org.freedesktop.DBus -> destination=:1.243 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
string ":1.243"
signal time=1763890261.267589 sender=org.freedesktop.DBus -> destination=:1.243 serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
string ":1.243"
method call time=1763890273.692832 sender=:1.255 -> 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=1763890273.692865 sender=:1.255 -> destination=org.freedesktop.DBus serial=12 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameHasOwner
string "org.a11y.Bus"
method call time=1763890273.693262 sender=:1.255 -> 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=1763890273.693295 sender=:1.255 -> destination=org.freedesktop.DBus serial=14 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
string "org.a11y.Bus"
method call time=1763890273.693511 sender=:1.255 -> 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=1763890273.694519 sender=:1.255 -> 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=1763890295.807879 sender=:1.255 -> destination=org.freedesktop.portal.Desktop serial=17 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.DBus.Introspectable; member=Introspect
method call time=1763890295.813772 sender=:1.255 -> 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.portal.Desktop'"
method call time=1763890295.813799 sender=:1.255 -> destination=org.freedesktop.DBus serial=19 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
string "org.freedesktop.portal.Desktop"
method call time=1763890295.814239 sender=:1.255 -> destination=org.freedesktop.DBus serial=20 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
string "org.freedesktop.portal.Desktop"
method call time=1763890295.814448 sender=:1.255 -> destination=org.freedesktop.DBus serial=21 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
string "type='signal',sender='org.freedesktop.portal.Desktop',path='/org/freedesktop/portal/desktop/request/1_255/c401c943a636436a9bde27e50510ecb8',interface='org.freedesktop.portal.Request',member='Response'"
method call time=1763890295.814514 sender=:1.255 -> destination=org.freedesktop.DBus serial=22 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.portal.Desktop'"
method call time=1763890295.814534 sender=:1.255 -> destination=org.freedesktop.DBus serial=23 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
string "org.freedesktop.portal.Desktop"
method call time=1763890295.815478 sender=:1.255 -> destination=org.freedesktop.portal.Desktop serial=24 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.portal.Screenshot; member=Screenshot
string ""
array [
dict entry(
string "handle_token"
variant string "c401c943a636436a9bde27e50510ecb8"
)
dict entry(
string "interactive"
variant boolean false
)
]
method call time=1763890295.832226 sender=:1.255 -> destination=org.freedesktop.portal.Desktop serial=25 path=/org/freedesktop/portal/desktop/request/1_255/c401c943a636436a9bde27e50510ecb8; interface=org.freedesktop.portal.Request; member=Close
method call time=1763890295.834291 sender=:1.255 -> destination=org.freedesktop.Notifications serial=26 path=/org/freedesktop/Notifications; interface=org.freedesktop.DBus.Introspectable; member=Introspect
method call time=1763890295.836020 sender=:1.255 -> destination=org.freedesktop.DBus serial=27 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=1763890295.836069 sender=:1.255 -> destination=org.freedesktop.DBus serial=28 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
string "org.freedesktop.Notifications"
method call time=1763890295.837141 sender=:1.255 -> destination=org.freedesktop.Notifications serial=29 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify
string "flameshot"
uint32 0
string "flameshot"
string "Flameshot Error"
string "Unable to capture screen"
array [
]
array [
]
int32 5000
method call time=1763890295.867499 sender=:1.255 -> destination=org.freedesktop.DBus serial=30 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 call time=1763890295.868071 sender=:1.255 -> destination=org.freedesktop.DBus serial=31 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch
string "type='signal',sender='org.freedesktop.portal.Desktop',path='/org/freedesktop/portal/desktop/request/1_255/c401c943a636436a9bde27e50510ecb8',interface='org.freedesktop.portal.Request',member='Response'"
method call time=1763890295.868127 sender=:1.255 -> destination=org.freedesktop.DBus serial=32 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.portal.Desktop'"
method call time=1763890295.868136 sender=:1.255 -> destination=org.freedesktop.DBus serial=33 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.portal.Desktop'"
method call time=1763890295.869047 sender=:1.255 -> destination=org.freedesktop.DBus serial=34 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=1763890295.869095 sender=:1.255 -> destination=org.freedesktop.DBus serial=35 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
string "org.freedesktop.Notifications"
method call time=1763890295.870167 sender=:1.255 -> destination=org.freedesktop.Notifications serial=36 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify
string "flameshot"
uint32 0
string "flameshot"
string "Flameshot Error"
string "Unable to capture screen"
array [
]
array [
]
int32 5000
method call time=1763890295.908278 sender=:1.255 -> destination=org.freedesktop.DBus serial=37 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'"
Form the terminal Produced system message "Flameshot Info: Capture saved to clipboard"
$ flameshot gui
QLayout: Attempting to add QLayout "" to SidePanelWidget "", which already has a layout
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setCompositionMode: Painter not active
QPainter::translate: Painter not active
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::setBrush: Painter not active
$ dbus-monitor --session sender=org.flameshot.Flameshot
signal time=1763891962.331745 sender=org.freedesktop.DBus -> destination=:1.261 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
string ":1.261"
signal time=1763891962.331778 sender=org.freedesktop.DBus -> destination=:1.261 serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
string ":1.261"
method call time=1763891983.644967 sender=:1.255 -> destination=org.freedesktop.DBus serial=38 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=1763891983.645017 sender=:1.255 -> destination=org.freedesktop.DBus serial=39 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
string "org.freedesktop.Notifications"
method call time=1763891983.645605 sender=:1.255 -> destination=org.freedesktop.Notifications serial=40 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify
string "flameshot"
uint32 0
string "flameshot"
string "Flameshot Info"
string "Capture saved to clipboard."
array [
]
array [
]
int32 5000
method call time=1763891983.679191 sender=:1.255 -> destination=org.freedesktop.DBus serial=41 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=1763891983.743581 sender=:1.255 -> destination=:1.266 serial=42 reply_serial=21
Steps to reproduce
- start new terminal and run
flameshot gui= works fine - leftclick on the icon tray icon of flameshot, "take screenshot" = Flameshot Error: Unable to capture screen
Screenshots or screen recordings
No response
System Information
Ubuntu 24 running inside Boxes, hosted in Ubuntu 24
Hello, for my Ubuntu Desktop i've created a solution by creating a shortkey for my PRTSC button running this command:
script --command "QT_QPA_PLATFORM=wayland flameshot gui" /dev/null
This solves my issue in
Distributor ID: Ubuntu Description: Ubuntu 25.10 Release: 25.10 Codename: questing
Thanks.
Same for me, I'm using the AppImage, on Arch under gnome/wayland. Works if launched from terminal (including using the tray icon after that), but if launched from the .dekstop file it does not work, with same error reported here.
This is probably a dupe of #3326