From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#63555: closed (Re: bug#63555: emacs 29 complains that it can't connect to the display) Date: Mon, 22 May 2023 09:29:10 +0200 Message-ID: <875y8klt89.fsf@gmail.com> References: <83ednbrwfp.fsf@gnu.org> <87ttwbawse.fsf@vps.thesusis.net> <87a5xyrjce.fsf@vps.thesusis.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20379"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Po Lu , Eli Zaretskii , 63555@debbugs.gnu.org To: Phillip Susi Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 22 09:30:20 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1q0zzo-000583-5y for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 May 2023 09:30:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q0zzZ-0001Wj-9e; Mon, 22 May 2023 03:30:05 -0400 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 1q0zzX-0001WX-0s for bug-gnu-emacs@gnu.org; Mon, 22 May 2023 03:30:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q0zzW-0000To-Mx for bug-gnu-emacs@gnu.org; Mon, 22 May 2023 03:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q0zzW-0007cp-Fu for bug-gnu-emacs@gnu.org; Mon, 22 May 2023 03:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 May 2023 07:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63555 X-GNU-PR-Package: emacs Original-Received: via spool by 63555-submit@debbugs.gnu.org id=B63555.168474055929222 (code B ref 63555); Mon, 22 May 2023 07:30:02 +0000 Original-Received: (at 63555) by debbugs.gnu.org; 22 May 2023 07:29:19 +0000 Original-Received: from localhost ([127.0.0.1]:33416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0zyo-0007bF-Vj for submit@debbugs.gnu.org; Mon, 22 May 2023 03:29:19 -0400 Original-Received: from mail-wr1-f41.google.com ([209.85.221.41]:60803) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0zyn-0007b4-P1 for 63555@debbugs.gnu.org; Mon, 22 May 2023 03:29:18 -0400 Original-Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-3093a6311dcso5571728f8f.1 for <63555@debbugs.gnu.org>; Mon, 22 May 2023 00:29:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684740552; x=1687332552; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=HhJKUEQ3emkVcB1rrvMV+tk6kcONeWmZl/3mCSevPwc=; b=SJuw6g3yOy485lGP0gj5Zyymny7jjtsKJ6Z7UdScPVP0RpE2cV7H9TiHpybBenGMao Uaclkd+oEritkvR7ntBn9gSBtcSQm3wYWVd1wQ2AoR6w8Oue3UJ68TdhJ1kSGeigfOK9 sRTRELeGLglKA/zUFQFDrSie9Rgs1TsNag1lQlDQUyDd5CDLgAB2ALMUc0cTxdDh3YM6 AFXKMmhF61odEc2unzolM16gTSXeLFqN38jcINfD4dtz+Rj/Oe/L/o6p2kRCfFAXv6Cm +b/2lTFWmh7kkYcu7HG5elNwDOH0ty3JVRbcoLup1foM6KzzxanqTfS6cNGWR8QY8JJ1 ycDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684740552; x=1687332552; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HhJKUEQ3emkVcB1rrvMV+tk6kcONeWmZl/3mCSevPwc=; b=UMSJb0U6R/gN1SGwCVDFpmW3qLZnTBXmPCK4bALgFpVVjN0lTUh6A8jx+f843tcttD h/JCTNpUtejyzZ5MAfj2vB7gUnphXCQmRKfZz7DYU9ATFdz3sprFG2fzx+5F5LPRrX+w BKOJ790LdwK7zRWmxOw3OrrvIhwuqKPOk1EBB0bGf5EirQm0htLZW2/KoFGwHo40zrtU MeWnr4CyAxbonOQd0zp3A1Nc3MTmDA68/IpU5CtyflPp7LqSbsZhCXSu3TwUu/orcur4 KKiHvUSlbZ3XOH/ptB5JcnHq3CkjXZUUYBpP+ooy/Tyce4CUeWJJVy9p71Uqm1d/qc3B Fntw== X-Gm-Message-State: AC+VfDzDcLZvp+C/MdMOHAUG2jiSDCMQNCkoGdc2oiDWKohuMI8CpHhy hnprP2zRSU7xy+zpKLFGTi6rMoZfmBA= X-Google-Smtp-Source: ACHHUZ4lfdJUMk0kzqyrNnHbySZEVKqiU55ygpRkeR++1plm8PBSnlrLDkmRMe3WuEvpucv3v3jhBQ== X-Received: by 2002:adf:e912:0:b0:307:7e64:4b52 with SMTP id f18-20020adfe912000000b003077e644b52mr7746656wrm.36.1684740551768; Mon, 22 May 2023 00:29:11 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id j18-20020adff012000000b00304adbeeabbsm6718111wro.99.2023.05.22.00.29.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 00:29:11 -0700 (PDT) In-Reply-To: <87a5xyrjce.fsf@vps.thesusis.net> (Phillip Susi's message of "Sat, 20 May 2023 13:35:56 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262133 Archived-At: >>>>> On Sat, 20 May 2023 13:35:56 -0400, Phillip Susi = said: Phillip> Eli Zaretskii writes: >> > Can we invoke those same functions earlier during startup to reali= ze >> > this fact where we still can start as -nw? >>=20 >> Unfortunately not. At least, not enough to make a change suitable f= or >> the release branch. Phillip> Why not? How hard can it be to set -nw if neither DISPLAY nor Phillip> WAYLAND_DISPLAY is set, as emacs always has, prior to Phillip> window-system-initialization? Not too hard. Very much for master, though (and I=CA=BCd need to check if gtk_init_check has any GTK version dependencies). diff --git a/src/dispnew.c b/src/dispnew.c index a928a5d1b14..9a23fb5a182 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -6518,7 +6518,28 @@ init_display_interactive (void) try to use X, and if that fails output a line to stderr reporting that -nw will be simulated. */ =20 -#ifdef HAVE_X_WINDOWS +#ifdef HAVE_PGTK + if (! inhibit_window_system) + { + if (! gtk_init_check (0, 0)) + { + fprintf (stderr, "PGTK display unavailable, simulating -nw\nCheck your = $DISPLAY, $WAYLAND_DISPLAY, or $BROADWAY_DISPLAY\n"); + inhibit_window_system =3D 1; + } + } + + if (!inhibit_window_system) + { + Vinitial_window_system =3D Qpgtk; +#ifdef USE_NCURSES + /* In some versions of ncurses, + tputs crashes if we have not called tgetent. + So call tgetent. */ + { char b[2044]; tgetent (b, "xterm");} +#endif + return; + } +#elif defined (HAVE_X_WINDOWS) if (! inhibit_window_system && ! display_arg) { char *display; Robert --=20