Like undoubtedly many of you, I started Working From Home a while ago and will continue to do so for some time.
I am using Emacs over SSH’s X11 forwarding, which—for various reasons—is the best setup for me, and yes, I have already tried numerous others (TRAMP, remote desktop, nx, xpra, …).
The one issue I have with my setup is that Emacs takes a noticeably long time to open a new frame (X11 window).
Now, entirely short-circuiting that function is a big hammer, and probably we don’t want to break existing users of x_display_ok(), but I do wonder what the best way to remove these unnecessary connection attempts is?
From a high-level perspective, the current behavior is unnecessary because:
1. If the X11 $DISPLAY variable is not okay, I’ll get an error message anyway.
2. Just because $DISPLAY worked at the time of check doesn’t mean it’ll work at time of use.
3. Even if checking is desired, there is no need to check twice during startup, and we should retain the connection used for checking so that we don’t need to connect over and over.