bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#63555: closed (Re: bug#63555: emacs 29 complains that it can't conne


From: Phillip Susi
Subject: 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
User-agent: mu4e 1.7.12; emacs 27.1

This patch works for me.

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
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]