Just upgraded from https://launchpad.net/~harish2704/+archive/ubuntu/ppa1/+files/flameshot_0.5.0_amd64.deb
to https://github.com/lupoDharkael/flameshot/releases/download/v0.5.1/flameshot_0.5.1-xenial-x86_64.deb
and, even after rebooting, noticed the 'Take graphical screenshot' option doesn't seem to do anything.
Could you look into this?
uname -a
linux evs-ubuntu 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
@Mondane You must launch flameshot first.
No, launching flameshot in advance is not necessary. Please consider it a bug.
I think so, since 0.5.0 does work.
Try to run flameshot gui on your terminal to see if it throws an error.
No errors are shown, no output at all. I noticed that flameshot config also fails. Only after running flameshot first, both the gui and config work.
I've now set the option to start flameshot at launch, which seems to work.
NB I noticed that with 0.5.0, running flameshot gui leaves flameshot running. Does it autostart flameshot?
Same here: without flameshot already running, flameshot gui just exits. I'm on Gentoo.
$ flameshot gui; echo $?
0
$ flameshot --version
Flameshot v0.5.1-14-g0523a83
Compiled with QT 5.6.2
I have come across the same problems after building flameshot from source as guides in https://github.com/lupoDharkael/flameshot#compilation. My OS is also Ubuntu 16.04.
@nanpi Try strace ./flameshot and send its output here.
I'm having the same issue on archlinux. fresh install of flameshot 0.5.1-1 which installed qt5-base 5.10.1-7. my window manager is xmonad.
both flameshot gui and flameshot config immediately exit without any output. e.g.
[nesta@hartford ~]$ flameshot gui
[nesta@hartford ~]$ echo $?
0
To help coax dependencies I installed kdialog which included the following additional packages (I'd much prefer to keep things minimal...)
# pacman -S kdialog
resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: usbmuxd will be installed before its libimobiledevice dependency
warning: dependency cycle detected:
warning: phonon-qt5-gstreamer will be installed before its phonon-qt5 dependency
Packages (38) attica-5.44.0-1 karchive-5.44.0-1 kauth-5.44.0-1 kbookmarks-5.44.0-1 kcompletion-5.44.0-1 kconfigwidgets-5.44.0-1 kcrash-5.44.0-1 kdbusaddons-5.44.0-1
kglobalaccel-5.44.0-1 kguiaddons-5.44.0-1 kiconthemes-5.44.0-1 kio-5.44.0-1 kitemviews-5.44.0-1 kjobwidgets-5.44.0-1 knotifications-5.44.0-1
kservice-5.44.0-1 ktextwidgets-5.44.0-1 kwallet-5.44.0-1 kwidgetsaddons-5.44.0-1 kwindowsystem-5.44.0-1 kxmlgui-5.44.0-1
libdbusmenu-qt5-0.9.3+16.04.20160218-1 libimobiledevice-1.2.0+66+g5a85432-1 libplist-2.0.0+11+gec9ba8b-1 libusbmuxd-1.0.10+13+gc724e70-1
media-player-info-23-1 phonon-qt5-4.10.0-1 phonon-qt5-gstreamer-4.9.0-4 polkit-qt5-0.112.0+git20180107-1 qt5-declarative-5.10.1-3 qt5-speech-5.10.1-1
qt5-svg-5.10.1-1 qt5-xmlpatterns-5.10.1-1 solid-5.44.0-1 sonnet-5.44.0-1 upower-0.99.7-1 usbmuxd-1.1.0+28+g46bdf3e-1 kdialog-17.12.3-1
kdialog is working and displays a yes/no prompt when executed via kdialog --yesno test.
I've posted an strace as requested by @ZetaoYang via strace flameshot gui > flameshot.trace 2>&1 to:
https://gist.github.com/briceburg/8b10792297d9f877db36587968758089
many thanks for your help! :)
I found some additional debugging info in the journal logs. An error is being thrown qt.qpa.screen: QXcbConnection: Could not connect to display;
pr 02 00:03:02 hartford flameshot[7558]: qt.qpa.screen: QXcbConnection: Could not connect to display
Apr 02 00:03:02 hartford flameshot[7558]: Could not connect to any X display.
Apr 02 00:03:02 hartford dbus-daemon[447]: [session uid=1000 pid=447] Activated service 'org.dharkael.Flameshot' failed: Process org.dharkael.Flameshot exited with status 1
$ echo $DISPLAY
:0.0
apps like konsole are behaving; although I believe this is related to the dbus initialization of flameshot?
After some more playing around I was able to resolve this by executing my window manage (xmonad) via dbus-launch. this made my X environment dbus session aware and seems to have fixed things. change to .xinitrc;
-exec xmonad
+exec dbus-launch xmonad
posting here in case this helps somebody else. not use if it's the same issue as OP.
@ZetaoYang The attached file is the output when I run strace ./flameshot gui 2>&1 | tee strace.txt
strace.txt
I'm having the same issue on ubuntu 16.04
@trydofor Can you try gdb single-step debugging?
@briceburg dbus-launch helps for my i3wm too
I'm on ubuntu 16.04, unity
https://mithun.co/software/install-flameshot-on-ubuntu-16-04/
That worked perfectly for me, just make sure to use sudo. The package included in ubuntu 16.04 software center does not work though.
Exec dbus-launch i3 worked for me too. I needed to apt install dbus-x11 first though.
apt install flameshotFor me, fixing my default locale fixed this issue.
Following this AskUbuntu comment I added this:
LC_CTYPE="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
to the end of the /etc/default/locale file (I already had LANG="en_US.UTF-8" in the file). After a reboot, flameshot started working properly.
Note: I run Ubuntu 20.04, I am not sure if this fix will work on Ubuntu 16.04
Most helpful comment
After some more playing around I was able to resolve this by executing my window manage (xmonad) via
dbus-launch. this made my X environment dbus session aware and seems to have fixed things. change to .xinitrc;posting here in case this helps somebody else. not use if it's the same issue as OP.