GNU bug report logs - #65009
29.1; should emacsclient check BROADWAY_DISPLAY as well as WAYLAND_DISPLAY and DISPLAY?

Previous Next

Package: emacs;

Reported by: "Trent W. Buck" <trentbuck <at> gmail.com>

Date: Wed, 2 Aug 2023 09:53:02 UTC

Severity: normal

Found in version 29.1

Full log


View this message in rfc822 format

From: "Trent W. Buck" <trentbuck <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 65009 <at> debbugs.gnu.org
Subject: bug#65009: 29.1; should emacsclient check BROADWAY_DISPLAY as well as WAYLAND_DISPLAY and DISPLAY?
Date: Thu, 3 Aug 2023 04:12:48 +1000
[Message part 1 (text/plain, inline)]
On Wed 02 Aug 2023 21:06:09 +0800, Po Lu wrote:
> > But "emacsclient --create-frame" won't work until/unless it checks
> > $BROADWAY_DISPLAY, right?
> 
> Correct.

I did some testing.
It appears to Just Work for basic usage (single display server).

I put some screenshots here: https://imgur.com/a/RSfScXt
I've also attached a single before/after pair.

One thing that really surprised me: quitting emacs (e.g. via M-x kill-emacs) causes broadwayd to crash!
This is not the case for gtk3-demo, so it might be a weirdness in emacs.

I also tested if GTK3 apps can display in gtk4-broadwayd, and
if GTK4 apps can display in [gtk3]-broadwayd.  It seems they cannot.

> > If the general consensus is "too hard; WONTFIX", I am OK with that.
> > This is something I want a couple of times a year, not every single
> > day.
>
> If such a fix only serves the interests of a few users of WSL, then yes.
> But we still receive occasional reports of frustration with
> Emacsclient's display detection from Wayland users on GNU/Linux, so this
> problem will have to be tackled.
>
> However, I'm not willing to settle for replicating GDK's own display
> selection mechanism using the names of a few environment variables that
> simply coincide with those used by common GDK configurations.  Going
> down that route would be incredibly fragile, and make Emacs even more
> subject to GDK's petty whims.

I think your argument is reasonable and sensible.

> Perhaps, for the time being, PGTK builds should forgo checking for a
> display in Emacsclient, and simply use whatever display connection was
> last opened.
>
> Comments?

For my personal use I think Emacs's current behaviour is adequate.
(i.e. I think this bug ticket can be closed.)


The Debian people seem to be OK with shipping a per-build emacsclient
(i.e. emacsclient moves from "emacs-bin-common" to "emacs-<variant>" deb).
That means the existing "#ifdef pgtk then check $WAYLAND_DISPLAY" will be OK.
At least for most users, most of the time.


I'm really excited that I finally have pgtk through my normal distro channels! It's cool! :-)
[imgur_RSfScXt_008_NQ1Ahki.png (image/png, attachment)]
[imgur_RSfScXt_009_Fnd3KWp.png (image/png, attachment)]

This bug report was last modified 1 year and 319 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.