From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: emacs pgtk doesn't set WAYLAND-DISPLAY Date: Sat, 17 Feb 2024 11:11:43 +0200 Message-ID: <864je7v4j4.fsf@gnu.org> References: <87sf23rktf.fsf@free.fr> <86ttmaw3rt.fsf@gnu.org> <874jeaywo6.fsf@yahoo.com> <86frxuvy1t.fsf@gnu.org> <87ttmaxawc.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4023"; mail-complaints-to="usenet@ciao.gmane.io" Cc: j.cubizolles@free.fr, emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 17 10:12:53 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rbGke-0000kk-IK for ged-emacs-devel@m.gmane-mx.org; Sat, 17 Feb 2024 10:12:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rbGje-000201-Bm; Sat, 17 Feb 2024 04:11:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rbGjc-0001zb-1M for emacs-devel@gnu.org; Sat, 17 Feb 2024 04:11:48 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rbGja-00064M-UX; Sat, 17 Feb 2024 04:11:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=67ZNsOpx4mBvZ080mDCtnslpwquENGT4xJxAqKQYpEs=; b=Y1QpQBWKVK3C2TOt/IcC MXd+AFiSr2B5kR1DwxqLxo9FJ6+8WlwU/H/Zn0z4GSFYqFFpK6M9nbUtkyClNHO108sJrNtRIZBN5 rvcUF1NBAHtplg8IBcKalZEN7Ynh9iMPl1V3KaxpC3cMrR/9DGRHk2ROsIxFwSGZA7/lbaW3Lpj+v GhILnNrmubJg4jiQ2Wq5xnO2jfp6AYl7H6+/sh/1PJeVBGqu+TcQYpxgBcs5oI8/J2grZSfGIXQOU 8GqhwHOjBEZ40iRloVogzQlIVDHbxhkkFb4S8aKzBvKYxeLUwtvqFu3hENhRYx+HZVAuUiqrpB2Yd /+sM/1lAoopkPw==; In-Reply-To: <87ttmaxawc.fsf@yahoo.com> (message from Po Lu on Thu, 15 Feb 2024 18:46:43 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316257 Archived-At: > From: Po Lu > Cc: j.cubizolles@free.fr, emacs-devel@gnu.org > Date: Thu, 15 Feb 2024 18:46:43 +0800 > > Eli Zaretskii writes: > > >> From: Po Lu > >> Cc: Julien Cubizolles , emacs-devel@gnu.org > >> Date: Thu, 15 Feb 2024 16:11:05 +0800 > >> > >> Eli Zaretskii writes: > >> > >> >> From: Julien Cubizolles > >> >> 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?