all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs pgtk doesn't set WAYLAND-DISPLAY
@ 2024-02-08 16:18 Julien Cubizolles
  2024-02-15  8:05 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Julien Cubizolles @ 2024-02-08 16:18 UTC (permalink / raw)
  To: emacs-devel

In Wayland, the following environment variables are set in a shell

WAYLAND_DISPLAY=wayland-0
DISPLAY=:0

In Emacs built with pgtk, only DISPLAY is set, with
DISPLAY=wayland-0.

I don't know if there is a good reason for that but it causes the
matplotlib python program to fail as it seems to expect a "valid" value
for DISPLAY or WAYLAND_DISPLAY to be set (see
https://github.com/matplotlib/matplotlib/issues/18377).

Maybe Emacs could just copy both the WAYLAND_DISPLAY and DISPLAY
environment variables instead of merging both ?

-- 
Julien Cubizolles




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacs pgtk doesn't set WAYLAND-DISPLAY
  2024-02-08 16:18 emacs pgtk doesn't set WAYLAND-DISPLAY Julien Cubizolles
@ 2024-02-15  8:05 ` Eli Zaretskii
  2024-02-15  8:11   ` Po Lu
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2024-02-15  8:05 UTC (permalink / raw)
  To: Julien Cubizolles, Po Lu; +Cc: emacs-devel

> From: Julien Cubizolles <j.cubizolles@free.fr>
> Date: Thu, 08 Feb 2024 17:18:36 +0100
> 
> In Wayland, the following environment variables are set in a shell
> 
> WAYLAND_DISPLAY=wayland-0
> DISPLAY=:0
> 
> In Emacs built with pgtk, only DISPLAY is set, with
> DISPLAY=wayland-0.
> 
> I don't know if there is a good reason for that but it causes the
> matplotlib python program to fail as it seems to expect a "valid" value
> for DISPLAY or WAYLAND_DISPLAY to be set (see
> https://github.com/matplotlib/matplotlib/issues/18377).
> 
> Maybe Emacs could just copy both the WAYLAND_DISPLAY and DISPLAY
> environment variables instead of merging both ?

Po Lu, any suggestions or comments?



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacs pgtk doesn't set WAYLAND-DISPLAY
  2024-02-15  8:05 ` Eli Zaretskii
@ 2024-02-15  8:11   ` Po Lu
  2024-02-15 10:09     ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Po Lu @ 2024-02-15  8:11 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Julien Cubizolles, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Julien Cubizolles <j.cubizolles@free.fr>
>> Date: Thu, 08 Feb 2024 17:18:36 +0100
>> 
>> In Wayland, the following environment variables are set in a shell
>> 
>> WAYLAND_DISPLAY=wayland-0
>> DISPLAY=:0
>> 
>> In Emacs built with pgtk, only DISPLAY is set, with
>> DISPLAY=wayland-0.
>> 
>> I don't know if there is a good reason for that but it causes the
>> matplotlib python program to fail as it seems to expect a "valid" value
>> for DISPLAY or WAYLAND_DISPLAY to be set (see
>> https://github.com/matplotlib/matplotlib/issues/18377).
>> 
>> Maybe Emacs could just copy both the WAYLAND_DISPLAY and DISPLAY
>> environment variables instead of merging both ?
>
> Po Lu, any suggestions or comments?

I think this is was Emacs's treatment of WAYLAND_DISPLAY until we
received several bug reports that couldn't be resolved except by
refraining from changing that variable.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacs pgtk doesn't set WAYLAND-DISPLAY
  2024-02-15  8:11   ` Po Lu
@ 2024-02-15 10:09     ` Eli Zaretskii
  2024-02-15 10:46       ` Po Lu
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2024-02-15 10:09 UTC (permalink / raw)
  To: Po Lu; +Cc: j.cubizolles, emacs-devel

> From: Po Lu <luangruo@yahoo.com>
> Cc: Julien Cubizolles <j.cubizolles@free.fr>,  emacs-devel@gnu.org
> Date: Thu, 15 Feb 2024 16:11:05 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Julien Cubizolles <j.cubizolles@free.fr>
> >> Date: Thu, 08 Feb 2024 17:18:36 +0100
> >> 
> >> In Wayland, the following environment variables are set in a shell
> >> 
> >> WAYLAND_DISPLAY=wayland-0
> >> DISPLAY=:0
> >> 
> >> In Emacs built with pgtk, only DISPLAY is set, with
> >> DISPLAY=wayland-0.
> >> 
> >> I don't know if there is a good reason for that but it causes the
> >> matplotlib python program to fail as it seems to expect a "valid" value
> >> for DISPLAY or WAYLAND_DISPLAY to be set (see
> >> https://github.com/matplotlib/matplotlib/issues/18377).
> >> 
> >> Maybe Emacs could just copy both the WAYLAND_DISPLAY and DISPLAY
> >> environment variables instead of merging both ?
> >
> > Po Lu, any suggestions or comments?
> 
> I think this is was Emacs's treatment of WAYLAND_DISPLAY until we
> received several bug reports that couldn't be resolved except by
> refraining from changing that variable.

Can you point to some of those bug reports?



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacs pgtk doesn't set WAYLAND-DISPLAY
  2024-02-15 10:09     ` Eli Zaretskii
@ 2024-02-15 10:46       ` Po Lu
  2024-02-17  9:11         ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Po Lu @ 2024-02-15 10:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: j.cubizolles, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Po Lu <luangruo@yahoo.com>
>> Cc: Julien Cubizolles <j.cubizolles@free.fr>,  emacs-devel@gnu.org
>> Date: Thu, 15 Feb 2024 16:11:05 +0800
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> >> From: Julien Cubizolles <j.cubizolles@free.fr>
>> >> Date: Thu, 08 Feb 2024 17:18:36 +0100
>> >> 
>> >> In Wayland, the following environment variables are set in a shell
>> >> 
>> >> WAYLAND_DISPLAY=wayland-0
>> >> DISPLAY=:0
>> >> 
>> >> In Emacs built with pgtk, only DISPLAY is set, with
>> >> DISPLAY=wayland-0.
>> >> 
>> >> I don't know if there is a good reason for that but it causes the
>> >> matplotlib python program to fail as it seems to expect a "valid" value
>> >> for DISPLAY or WAYLAND_DISPLAY to be set (see
>> >> https://github.com/matplotlib/matplotlib/issues/18377).
>> >> 
>> >> Maybe Emacs could just copy both the WAYLAND_DISPLAY and DISPLAY
>> >> environment variables instead of merging both ?
>> >
>> > Po Lu, any suggestions or comments?
>> 
>> I think this is was Emacs's treatment of WAYLAND_DISPLAY until we
>> received several bug reports that couldn't be resolved except by
>> refraining from changing that variable.
>
> Can you point to some of those bug reports?

bug#53969 comes to mind, though several more problems were reported, to
both this list and the bug tracker.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacs pgtk doesn't set WAYLAND-DISPLAY
  2024-02-15 10:46       ` Po Lu
@ 2024-02-17  9:11         ` Eli Zaretskii
  2024-02-17 10:04           ` Po Lu
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2024-02-17  9:11 UTC (permalink / raw)
  To: Po Lu; +Cc: j.cubizolles, emacs-devel

> From: Po Lu <luangruo@yahoo.com>
> Cc: j.cubizolles@free.fr,  emacs-devel@gnu.org
> Date: Thu, 15 Feb 2024 18:46:43 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Po Lu <luangruo@yahoo.com>
> >> Cc: Julien Cubizolles <j.cubizolles@free.fr>,  emacs-devel@gnu.org
> >> Date: Thu, 15 Feb 2024 16:11:05 +0800
> >> 
> >> Eli Zaretskii <eliz@gnu.org> writes:
> >> 
> >> >> From: Julien Cubizolles <j.cubizolles@free.fr>
> >> >> Date: Thu, 08 Feb 2024 17:18:36 +0100
> >> >> 
> >> >> In Wayland, the following environment variables are set in a shell
> >> >> 
> >> >> WAYLAND_DISPLAY=wayland-0
> >> >> DISPLAY=:0
> >> >> 
> >> >> In Emacs built with pgtk, only DISPLAY is set, with
> >> >> DISPLAY=wayland-0.
> >> >> 
> >> >> I don't know if there is a good reason for that but it causes the
> >> >> matplotlib python program to fail as it seems to expect a "valid" value
> >> >> for DISPLAY or WAYLAND_DISPLAY to be set (see
> >> >> https://github.com/matplotlib/matplotlib/issues/18377).
> >> >> 
> >> >> Maybe Emacs could just copy both the WAYLAND_DISPLAY and DISPLAY
> >> >> environment variables instead of merging both ?
> >> >
> >> > Po Lu, any suggestions or comments?
> >> 
> >> I think this is was Emacs's treatment of WAYLAND_DISPLAY until we
> >> received several bug reports that couldn't be resolved except by
> >> refraining from changing that variable.
> >
> > Can you point to some of those bug reports?
> 
> bug#53969 comes to mind, though several more problems were reported, to
> both this list and the bug tracker.

OK, so I guess the solution to this mess could only be in the
application's own code, whereby, if WAYLAND_DISPLAY is necessary, the
Lisp program that invokes an external utility should inject
WAYLAND_DISPLAY into the environment, is that so?



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: emacs pgtk doesn't set WAYLAND-DISPLAY
  2024-02-17  9:11         ` Eli Zaretskii
@ 2024-02-17 10:04           ` Po Lu
  0 siblings, 0 replies; 7+ messages in thread
From: Po Lu @ 2024-02-17 10:04 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: j.cubizolles, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> OK, so I guess the solution to this mess could only be in the
> application's own code, whereby, if WAYLAND_DISPLAY is necessary, the
> Lisp program that invokes an external utility should inject
> WAYLAND_DISPLAY into the environment, is that so?

Probably.  There's another question I neglected to ask: Julian, how are
you starting Emacs?  Emacs should inherit WAYLAND_DISPLAY from its
parent process's environment, which subprocesses will in turn inherit
with or without intervention from Emacs.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-02-17 10:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-08 16:18 emacs pgtk doesn't set WAYLAND-DISPLAY Julien Cubizolles
2024-02-15  8:05 ` Eli Zaretskii
2024-02-15  8:11   ` Po Lu
2024-02-15 10:09     ` Eli Zaretskii
2024-02-15 10:46       ` Po Lu
2024-02-17  9:11         ` Eli Zaretskii
2024-02-17 10:04           ` Po Lu

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.