You are not logged in.

#1 2022-03-05 23:00:00

Joshument
Member
Registered: 2022-03-05
Posts: 9

[SOLVED] Flameshot is hanging whenever I take a screenshot in i3-gaps

Hi,

I've been using KDE for the most part of my Arch Linux installation and it works fine. However, I recently switched over to i3. Most stuff works fine, but one of the issues is that Flameshot now hangs whenever I try to take a screenshot. Whenever I do so, it hangs for 20-30 seconds before applying the screenshot to my clipboard, and also will not open during that time. The way I am using Flameshot is via a keybind in i3 that is as follows:
`bindsym Print exec --no-startup-id flameshot gui`
I am completely clueless, any help is very appreciated.

Thank you for your time :)

Last edited by Joshument (2022-03-06 22:42:35)


I collect programming languages like pokemon and then never use them

Offline

#2 2022-03-06 02:22:57

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,302

Re: [SOLVED] Flameshot is hanging whenever I take a screenshot in i3-gaps

Sounds like a DBUS timeout, how are you starting i3? And if you're using a .xinitrc, fix your .xinitrc to source the necessary templates to properly set up the DBUS session: https://wiki.archlinux.org/title/Xinit#xinitrc

Offline

#3 2022-03-06 02:37:30

Joshument
Member
Registered: 2022-03-05
Posts: 9

Re: [SOLVED] Flameshot is hanging whenever I take a screenshot in i3-gaps

I'm starting i3 from SDDM. I'm still a bit of a noob so I don't really know what a .xinitrc is, probably means I don't use it.


I collect programming languages like pokemon and then never use them

Offline

#4 2022-03-06 07:41:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,262

Re: [SOLVED] Flameshot is hanging whenever I take a screenshot in i3-gaps

Does this respond immediately?

dbus-send --session --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames

Output of

loginctl session-status
echo $DBUS_SESSION_BUS_ADDRESS

?

A common pitfall w/ screenshot tools and shortcuts is that they try to grab the input and that the active shortcut grabs the keyboard as well, but the timeout is suspicious (25 seconds is the default dbus timeout)
It might fail the dbus activation of the flameshot server. Does the shortcut work if you beforehand run "flameshot" in a terminal inside the session?

Offline

#5 2022-03-06 18:36:48

Joshument
Member
Registered: 2022-03-05
Posts: 9

Re: [SOLVED] Flameshot is hanging whenever I take a screenshot in i3-gaps

Hi, thank you for the reply! I'm completely lost and I appreciate it (probably should have thanked the other person but I think I was a bit more preoccupied at the time).

The first command outputs instantly, so I assume that isn't the issue?

Here is the output of the second and third command:

~/Documents/Command-Logs λ cat session-status-output.txt
2 - josh (1000)
	   Since: Sun 2022-03-06 13:29:17 EST; 3min 33s ago
	  Leader: 532 (sddm-helper)
	    Seat: seat0; vc1
	 Display: :0
	 Service: sddm; type x11; class user
	 Desktop: i3
	   State: active
	    Unit: session-2.scope
		  ├─ 532 /usr/lib/sddm/sddm-helper --socket /tmp/sddm-autha05a6fe1-a374-422c-a961-0f447ba3a9f0 --id 1 --start i3 --user josh
		  ├─ 545 /usr/bin/kwalletd5 --pam-login 6 8
		  ├─ 546 i3
		  ├─ 550 ibus-daemon -drx
		  ├─ 556 /usr/lib/ibus/ibus-dconf
		  ├─ 557 /usr/lib/ibus/ibus-ui-gtk3
		  ├─ 559 /usr/lib/ibus/ibus-extension-gtk3
		  ├─ 561 /usr/lib/ibus/ibus-x11 --kill-daemon
		  ├─ 589 picom -f
		  ├─ 592 polybar
		  ├─ 684 /usr/lib/ibus/ibus-engine-simple
		  ├─ 709 alacritty
		  ├─ 727 /bin/bash
		  ├─1025 /usr/lib/firefox/firefox
		  ├─1216 /usr/lib/firefox/firefox -contentproc -parentBuildID 20220305133521 -prefsLen 1 -prefMapSize 249448 -appDir /usr/lib/firefox/browser 1025 true socket
		  ├─1245 /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 117 -prefMapSize 249448 -jsInitLen 279340 -parentBuildID 20220305133521 -appDir /usr/lib/firefox/browser 1025 true tab
		  ├─1321 /usr/lib/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 5288 -prefMapSize 249448 -jsInitLen 279340 -parentBuildID 20220305133521 -appDir /usr/lib/firefox/browser 1025 true tab
		  ├─1407 /usr/bin/plasma-browser-integration-host /usr/lib/mozilla/native-messaging-hosts/org.kde.plasma.browser_integration.json plasma-browser-integration@kde.org
		  ├─1417 /usr/lib/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 6062 -prefMapSize 249448 -jsInitLen 279340 -parentBuildID 20220305133521 -appDir /usr/lib/firefox/browser 1025 true tab
		  ├─1424 /usr/lib/firefox/firefox -contentproc -childID 6 -isForBrowser -prefsLen 6062 -prefMapSize 249448 -jsInitLen 279340 -parentBuildID 20220305133521 -appDir /usr/lib/firefox/browser 1025 true tab
		  ├─1510 /usr/lib/firefox/firefox -contentproc -childID 7 -isForBrowser -prefsLen 8340 -prefMapSize 249448 -jsInitLen 279340 -parentBuildID 20220305133521 -appDir /usr/lib/firefox/browser 1025 true tab
		  ├─1556 /usr/lib/firefox/firefox -contentproc -childID 8 -isForBrowser -prefsLen 8497 -prefMapSize 249448 -jsInitLen 279340 -parentBuildID 20220305133521 -appDir /usr/lib/firefox/browser 1025 true tab
		  ├─1559 /usr/lib/firefox/firefox -contentproc -childID 9 -isForBrowser -prefsLen 8497 -prefMapSize 249448 -jsInitLen 279340 -parentBuildID 20220305133521 -appDir /usr/lib/firefox/browser 1025 true tab
		  ├─1601 /usr/bin/python /usr/share/ibus-anthy/engine/main.py --ibus
		  └─1682 loginctl session-status

Mar 06 13:29:17 arch systemd[1]: Started Session 2 of User josh.
Mar 06 13:29:17 arch sddm-helper[544]: pam_kwallet5: final socket path: /run/user/1000/kwallet5.socket
Mar 06 13:29:17 arch sddm-helper[546]: Adding cookie to "/home/josh/.Xauthority"
~/Documents/Command-Logs λ echo $DBUS_SESSION_BUS_ADDRESS
unix:path=/run/user/1000/bus

This did make me kind of aware that I need to clean up some of the KDE stuff, so at least the output is somewhat helpful regardless


I collect programming languages like pokemon and then never use them

Offline

#6 2022-03-06 18:40:50

Joshument
Member
Registered: 2022-03-05
Posts: 9

Re: [SOLVED] Flameshot is hanging whenever I take a screenshot in i3-gaps

Oh, and running

flameshot

in a terminal does not mitigate any of the issues unfortunately, however it does not prevent me from having

flameshot gui

from running. I assume that the issue is because I am now using the latter command whereas in KDE I used the tray tool. I'm not entirely sure how I should integrate any system tray stuff into my current i3 setup that would keep it looking nice, and I don't know how flameshot can set up shortcuts so I can just use a shortcut to activate the tray tool to take a screenshot.


I collect programming languages like pokemon and then never use them

Offline

#7 2022-03-06 21:49:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,262

Re: [SOLVED] Flameshot is hanging whenever I take a screenshot in i3-gaps

Found https://github.com/flameshot-org/flames … -850901182 - try to run dunst.
Flameshot might timeout on attempting to notify you and then fail.

Offline

#8 2022-03-06 22:42:22

Joshument
Member
Registered: 2022-03-05
Posts: 9

Re: [SOLVED] Flameshot is hanging whenever I take a screenshot in i3-gaps

Hey, it worked! Thank you very much! I'll just add this to my i3 config.


I collect programming languages like pokemon and then never use them

Offline

Board footer

Powered by FluxBB