GNU bug report logs - #54333
29.0.50; browse-url-chrome in Wayland/pgtk

Previous Next

Package: emacs;

Reported by: Stephen Eglen <sje30 <at> cam.ac.uk>

Date: Thu, 10 Mar 2022 23:20:02 UTC

Severity: normal

Found in version 29.0.50

Done: Po Lu <luangruo <at> yahoo.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Po Lu <luangruo <at> yahoo.com>
To: Stephen Eglen <sje30 <at> cam.ac.uk>
Cc: 54333 <at> debbugs.gnu.org
Subject: bug#54333: 29.0.50; browse-url-chrome in Wayland/pgtk
Date: Fri, 11 Mar 2022 09:49:22 +0800
Po Lu <luangruo <at> yahoo.com> writes:

> Indeed.  I'll look into that, thanks.

Does this patch solve the problem?

diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 6d28e318ff..776f774172 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -970,7 +970,13 @@ browse-url-process-environment
 environment, otherwise just use the current environment."
   (let ((display (or browse-url-browser-display (browse-url-emacs-display))))
     (if display
-	(cons (concat "DISPLAY=" display) process-environment)
+	(cons (concat (if (and (eq window-system 'pgtk)
+                               (equal (pgtk-backend-display-class)
+                                      "GdkWaylandDisplay"))
+                          "WAYLAND_DISPLAY="
+                        "DISPLAY=")
+                      display)
+              process-environment)
       process-environment)))
 
 (defun browse-url-emacs-display ()
 




This bug report was last modified 3 years and 153 days ago.

Previous Next


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