GNU bug report logs - #63555
emacs 29 complains that it can't connect to the display

Previous Next

Package: emacs;

Reported by: Phillip Susi <phill <at> thesusis.net>

Date: Wed, 17 May 2023 13:55:03 UTC

Severity: normal

Found in version 29.0.90

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #85 received at 63555 <at> debbugs.gnu.org (full text, mbox):

From: Phillip Susi <phill <at> thesusis.net>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Po Lu <luangruo <at> yahoo.com>, Eli Zaretskii <eliz <at> gnu.org>,
 63555 <at> debbugs.gnu.org
Subject: Re: bug#63555: closed (Re: bug#63555: emacs 29 complains that it
 can't connect to the display)
Date: Mon, 22 May 2023 12:44:40 -0400
[Message part 1 (text/plain, inline)]
This patch works for me.

[auto-nw-mode.patch (text/x-diff, inline)]
Index: b/src/dispnew.c
===================================================================
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -6559,8 +6558,20 @@ init_display_interactive (void)
 #ifdef HAVE_PGTK
   if (!inhibit_window_system && !will_dump_p ())
     {
-      Vinitial_window_system = Qpgtk;
-      return;
+      char *display, *wayland_display;
+      display = getenv ("DISPLAY");
+      wayland_display = getenv ("WAYLAND_DISPLAY");
+
+      if (display == NULL && wayland_display == NULL)
+	{
+	  fprintf (stderr, "Neither DISPLAY nor WAYLAND_DISPLAY are set, simulating -nw\n");
+	  inhibit_window_system = 1;
+	}
+      else
+	{
+	  Vinitial_window_system = Qpgtk;
+	  return;
+	}
     }
 #endif
 

This bug report was last modified 263 days ago.

Previous Next


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