Bug#902866: flameshot: Will not run, exits with error "Could not connect to display"

2018-07-02 Thread Prescott
Package: flameshot
Version: 0.5.1+git20180601-1
Severity: grave
Justification: renders package unusable

Dear Maintainer,

   Upgraded to testing from stable for help in bugs finding and for
   some newer packages I needed from Buster.

   I originally used my sxhkd keybinding "flameshot gui -p
   ~/path/to/file", and when the usual action of the gui selection
   screen did not appear, I ran flameshot gui through the terminal. The
   following is the error messages in syslog.
   
Jul  2 09:17:12 plaptop dbus-daemon[2082]: [session uid=1000 pid=2082] 
Activating service name='org.dharkael.Flameshot' requested by ':1.1310' 
(uid=1000 pid=22598 comm="flameshot gui ")
Jul  2 09:17:12 plaptop org.dharkael.Flameshot[2082]: qt.qpa.screen: 
QXcbConnection: Could not connect to display
Jul  2 09:17:12 plaptop org.dharkael.Flameshot[2082]: Could not connect to any 
X display.
Jul  2 09:17:12 plaptop dbus-daemon[2082]: [session uid=1000 pid=2082] 
Activated service 'org.dharkael.Flameshot' failed: Process 
org.dharkael.Flameshot exited with status 1
Jul  2 09:17:45 plaptop dbus-daemon[2082]: [session uid=1000 pid=2082] 
Activating service name='org.dharkael.Flameshot' requested by ':1.1315' 
(uid=1000 pid=23133 comm="flameshot gui ")
Jul  2 09:17:45 plaptop org.dharkael.Flameshot[2082]: qt.qpa.screen: 
QXcbConnection: Could not connect to display
Jul  2 09:17:45 plaptop org.dharkael.Flameshot[2082]: Could not connect to any 
X display.
Jul  2 09:17:45 plaptop dbus-daemon[2082]: [session uid=1000 pid=2082] 
Activated service 'org.dharkael.Flameshot' failed: Process 
org.dharkael.Flameshot exited with status 1
cat: m: No such file or directory

   The same QXcbConnection message appears when running a CLI command
   (e.g. flameshot screen -c).

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (900, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.16.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages flameshot depends on:
ii  libc6   2.27-3
ii  libgcc1 1:8.1.0-8
ii  libqt5core5a5.10.1+dfsg-7
ii  libqt5dbus5 5.10.1+dfsg-7
ii  libqt5gui5  5.10.1+dfsg-7
ii  libqt5network5  5.10.1+dfsg-7
ii  libqt5widgets5  5.10.1+dfsg-7
ii  libstdc++6  8.1.0-8

flameshot recommends no packages.

Versions of packages flameshot suggests:
ii  ca-certificates  20170717
ii  openssl  1.1.0h-4

-- no debconf information



Bug#902866: flameshot: Will not run, exits with error "Could not connect to display"

2023-02-23 Thread Hendrik Jäger
Hi Prescott

Do you still have this issue?

> I just realized the issue, although it doesn't seem to be related to 
> flameshot directly. The program runs as a D-BUS service, and for some reason 
> the DISPLAY environment variable isn't being set.

This sounds like this bug needs to be reassigned to some other package.
I’m thinking your (dbus) environment is not initialized correctly when starting 
your X-session. How do you start it?
Do you use some Display Manager, like xdm, gdm, etc.?
How do you select to start bspwm: via a menu in your DM, after logging into 
your DM, from your ~/.xsession, ~/.xinitrc, etc.?

Please report back so proper steps can be taken.

Cheers

henk

On Mon, 20 Aug 2018 14:59:39 + Prescott Hidalgo-Monroy 
 wrote:
> Hi,
> 
> I just realized the issue, although it doesn't seem to be related to 
> flameshot directly. The program runs as a D-BUS service, and for some reason 
> the DISPLAY environment variable isn't being set. The issue is resolved by 
> running
> 
> dbus-update-activation-environment DISPLAY XAUTHORITY
> 
> I had to do the same with systemd and implement a DISPLAY set in my startup 
> script in order for dunst to work as a non-root user. These issues didn't 
> come up under Stretch, so I'm not sure what changed when upgrading to Testing.
> 
> 
> Regards,
> Prescott Hidalgo-Monroy
> 
> ‐‐‐ Original Message ‐‐‐
> On July 3, 2018 9:05 PM, Boyuan Yang <073p...@gmail.com> wrote:
> 
> > Control: tag -1 + help
> > 
> 
> > 在 2018年7月4日星期三 CST 上午12:41:49,Prescott Hidalgo-Monroy 写道:
> > 
> 
> > > Just tried with the bspwm version in the Buster repos, still have the same
> > > issue and error messages.
> > > Regards,
> > > Prescott HM
> > 
> 
> > Hi,
> > 
> 
> > Unfortunately I couldn't reproduce your problem on all major DEs and some 
> > WMs.
> > I am not able to test bspwm at this moment. I'd suggest that you report this
> > problem to upstream http://github.com/lupoDharkael/flameshot meanwhile.
> > 
> 
> > ---
> > 
> 
> > Regards,
> > Boyuan Yang
> > 
> 
> > > ‐‐‐ Original Message ‐‐‐
> > > On July 2, 2018 12:18 PM, Prescott Hidalgo-Monroy  > 
> 
> > monroy.com> wrote:
> > 
> 
> > > > Using git upstream bspwm v0.9.5-5-g229b6fd, and it's all local use.
> > > > I might try the bspwm version from the repos as well, it's on v0.9.5-1.
> > > > Regards,
> > > > Prescott
> > > > ‐‐‐ Original Message ‐‐‐
> > > > On July 2, 2018 10:10 AM, Boyuan Yang 073p...@gmail.com wrote:
> > > > 
> 
> > > > > Control: severity -1 important
> > > > > Control: tag -1 + moreinfo
> > > > > 在 2018年7月2日星期一 CST 下午10:33:29,Prescott 写道:



Bug#902866: flameshot: Will not run, exits with error "Could not connect to display"

2023-02-24 Thread Prescott HM

I’m thinking your (dbus) environment is not initialized correctly when
starting your X-session. How do you start it?
Do you use some Display Manager, like xdm, gdm, etc.?
How do you select to start bspwm: via a menu in your DM, after logging into
your DM, from your ~/.xsession, ~/.xinitrc, etc.?


It's been a while but luckily I've kept all my config changes in a git repo!

So I start bspwm by running `startx` at boot and had `exec bspwm` as the WM
launch command, but had gotten it fixed by correctly starting it with `exec
dbus- run-session -- bspwm`.

I think the biggest issue was as someone new to trying out lauching a graphical
session without a display manager, there really wasn't any indication of
what exactly is needed to manually start that's taken for granted. It finally
clicked when I started using other programs that require a D-Bus environment,
and trying out Void Linux on some machines had me going through their docs
where it's clearly stated that a session bus may be required for some software.



Bug#902866: flameshot: Will not run, exits with error "Could not connect to display"

2023-02-25 Thread Hendrik Jäger
Hi Prescott

> It's been a while but luckily I've kept all my config changes in a git repo!

Thank you for your quick response and being able to dig this up!

> >How do you select to start bspwm: via a menu in your DM, after logging into 
> >your DM, from your ~/.xsession, ~/.xinitrc, etc.?  

> So I start bspwm by running `startx` at boot and had `exec bspwm` as the WM 
> launch command

This might be the crucial point: I’m guessing you are using ~/.xinitrc?
If you can reproduce the issue with ~/.xinitrc, could you test whether it also 
occurs when you use ~/.xsession instead (i.e. remove ~/.xinitrc!)?
AFAICT /etc/X11/Xsession.d/95dbus_update-activation-env sets up dbus correctly 
but everything in /etc/X11/Xsession* is only active if startx runs 
/etc/X11/xinit/xinitrc and it will not if ~/.xinitrc exists.

Thank you

henk

On Fri, 24 Feb 2023 11:25:16 -0600
Prescott HM  wrote:

> >I’m thinking your (dbus) environment is not initialized correctly when
> >starting your X-session. How do you start it?
> >Do you use some Display Manager, like xdm, gdm, etc.?
> >How do you select to start bspwm: via a menu in your DM, after logging into
> >your DM, from your ~/.xsession, ~/.xinitrc, etc.?  
> 
> It's been a while but luckily I've kept all my config changes in a git repo!
> 
> So I start bspwm by running `startx` at boot and had `exec bspwm` as the WM
> launch command, but had gotten it fixed by correctly starting it with `exec
> dbus- run-session -- bspwm`.
> 
> I think the biggest issue was as someone new to trying out lauching a 
> graphical
> session without a display manager, there really wasn't any indication of
> what exactly is needed to manually start that's taken for granted. It finally
> clicked when I started using other programs that require a D-Bus environment,
> and trying out Void Linux on some machines had me going through their docs
> where it's clearly stated that a session bus may be required for some 
> software.



Bug#902866: flameshot: Will not run, exits with error "Could not connect to display"

2023-03-14 Thread Prescott HM

On 25.02.2023 23:00, Hendrik Jäger wrote:



So I start bspwm by running `startx` at boot and had `exec bspwm` as the WM
launch command


This might be the crucial point: I’m guessing you are using ~/.xinitrc?
If you can reproduce the issue with ~/.xinitrc, could you test whether it also
occurs when you use ~/.xsession instead (i.e. remove ~/.xinitrc!)?
AFAICT /etc/X11/Xsession.d/95dbus_update-activation-env sets up dbus correctly
but everything in /etc/X11/Xsession* is only active if startx runs /etc/X11/
xinit/xinitrc and it will not if ~/.xinitrc exists.



I tried it up in a default Debian VM (w/ gnome) to be as bare-bones as possible.

Installed bspwm and copied the example configs from the repo, and installed
flameshot. Logged out and in the DM chose bspwm before logging in again. With
that process, dbus is set-up correctly and flameshot works without issue; no
~/.xinitrc