flameshot icon indicating copy to clipboard operation
flameshot copied to clipboard

flameshot: error: Unable to connect via DBus

Open emoxam opened this issue 2 years ago • 3 comments

Flameshot Version

v12.1.0

Installation Type

Using the ready-made package from Github Releases

Operating System type and version

Ubuntu 22.04.4 LTS 6.5.0-26-generic x86_64

Description

i want some hotkey to make screenshot of an area and saves it to the clipboard according to https://flameshot.org/docs/guide/key-bindings/ i am trying to create shortcut, but i am started from testing it via the shell so this command opens a app but doesn't copy anything to a clipboard

$ flameshot gui -c -s
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
qt.svg: Invalid path data; path truncated.
qt.svg: Invalid path data; path truncated.
flameshot: error: Unable to connect via DBus

Steps to reproduce

  1. run flameshot gui -c -s
  2. see an errors

Screenshots or screen recordings

No response

System Information

$ flameshot --version
Flameshot v12.1.0 ()
Compiled with Qt 5.11.3
$ inxi --width 80 --system --graphics
System:
  Host: emoxam-B450M-DS3H Kernel: 6.5.0-26-generic x86_64 bits: 64
    Desktop: GNOME 42.9 Distro: Ubuntu 22.04.4 LTS (Jammy Jellyfish)
Graphics:
  Device-1: NVIDIA driver: nvidia v: 535.161.07
  Display: server: X.Org v: 1.21.1.4 driver: X: loaded: nvidia
    unloaded: fbdev,modesetting,nouveau,vesa gpu: nvidia
    resolution: 1920x1080~60Hz
  OpenGL: renderer: NVIDIA GeForce RTX 3050/PCIe/SSE2
    v: 4.6.0 NVIDIA 535.161.07
$ loginctl show-session $(loginctl show-user $(whoami) -p Display --value) -p Type --value
`Failed to get user: User ID 0 is not logged in or lingering`
$ randr --listactivemonitors
Monitors: 1
 0: +*HDMI-0 1920/598x1080/336+0+0  HDMI-0
$ lspci | grep -i 'vga\|3d\|2d'
`01:00.0 VGA compatible controller: NVIDIA Corporation GA106 [Geforce RTX 3050] (rev a1)`
$ shw -class display
  *-display                 
       description: VGA compatible controller
       product: GA106 [Geforce RTX 3050]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: iomemory:fc0-fbf iomemory:fe0-fdf irq:117 memory:fb000000-fbffffff memory:fc00000000-fdffffffff memory:fe00000000-fe01ffffff ioport:f000(size=128) memory:fc000000-fc07ffff
  *-graphics
       product: EFI VGA
       physical id: 1
       logical name: /dev/fb0
       capabilities: fb
       configuration: depth=32 resolution=1920,1080
$ name -a
Linux emoxam-B450M-DS3H 6.5.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Mar 12 10:22:43 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
$ dbus-monitor --session sender=org.flameshot.Flameshot
`Failed to open connection to session bus: /usr/bin/dbus-launch terminated abnormally without any error message`

emoxam avatar Mar 22 '24 10:03 emoxam

I do have the same issue, but i don't have any errors running flameshot gui -c -s. It has recently stopped working.

Flameshot runs gui, and when i am trying Ctrl + C to copy to the clipboard, nothing happens.

The strange thing, that i don't have any errors on flameshot gui -c -s, i could find errors only in systemctl xdg

Apr 09 19:10:43 untainsYD-workstation xdg-desktop-por[4615]: Backend call failed: Cannot invoke method; proxy is for the well-known name org.freedesktop.ScreenSaver without an owner, and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag
Apr 09 19:10:50 untainsYD-workstation xdg-desktop-por[4615]: Backend call failed: Cannot invoke method; proxy is for the well-known name org.freedesktop.ScreenSaver without an owner, and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag
● xdg-desktop-portal.service - Portal service
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
     Active: active (running) since Tue 2024-04-09 19:14:50 EEST; 15min ago
   Main PID: 41774 (xdg-desktop-por)
      Tasks: 6 (limit: 19027)
     Memory: 3.5M (peak: 4.4M)
        CPU: 51ms
     CGroup: /user.slice/user-1000.slice/[email protected]/session.slice/xdg-desktop-portal.service
             └─41774 /usr/lib/xdg-desktop-portal

Apr 09 19:14:50 untainsYD-workstation systemd[2129]: Starting Portal service...
Apr 09 19:14:50 untainsYD-workstation xdg-desktop-por[41774]: Choosing wlr.portal for org.freedesktop.impl.portal.ScreenCast via the deprecated UseIn key
Apr 09 19:14:50 untainsYD-workstation xdg-desktop-por[41774]: The preferred method to match portal implementations to desktop environments is to use the portals.conf(5) configuration file
Apr 09 19:14:50 untainsYD-workstation systemd[2129]: Started Portal service.
> dbus-monitor --session sender=org.flameshot.Flameshot
signal time=1712680273.345332 sender=org.freedesktop.DBus -> destination=:1.172 serial=4294967295 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.172"
signal time=1712680273.345361 sender=org.freedesktop.DBus -> destination=:1.172 serial=4294967295 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
   string ":1.172"
method call time=1712680276.242272 sender=:1.106 -> destination=org.freedesktop.DBus serial=120 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=1712680276.242354 sender=:1.106 -> destination=org.freedesktop.DBus serial=121 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
   string "org.freedesktop.Notifications"
method call time=1712680276.242643 sender=:1.106 -> destination=org.freedesktop.Notifications serial=122 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=1712680276.290658 sender=:1.106 -> destination=org.freedesktop.DBus serial=123 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=1712680276.322690 sender=:1.106 -> destination=:1.173 serial=124 reply_serial=32

I am using arch linux (latest), Wayland, SwayWM.

untainsYD avatar Apr 09 '24 16:04 untainsYD

Hi have the same problem on Debian Sid with enlightenment 0.26.0... em1069@angellodebiansofia:~$ flameshot QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-em1069' QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-em1069' QApplication: invalid style override 'gtk2' passed, ignoring it. Available styles: Windows, Fusion flameshot: error: Unable to connect via DBus

I can make disappear the error with the following command: em1069@angellodebiansofia:~$ dbus-run-session flameshot QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-em1069' QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-em1069' QApplication: invalid style override 'gtk2' passed, ignoring it. Available styles: Windows, Fusion

But the icon of flameshot still missing... maybe that can provide to the maintainer any clue about the problem.

EstebanMonge avatar Aug 13 '24 15:08 EstebanMonge

Hi! good news... I installed the following package and restarted enlightenment and now flameshot is working: dbus-x11

EstebanMonge avatar Aug 13 '24 15:08 EstebanMonge