Subject: bug#67628: Emacs 29.1: (x-open-connection (getenv "DISPLAY")) gets "Display :0.0 does not exist" error

From: Eli Zaretskii <[email-masked]>
Date: Wed, 06 Dec 2023 15:10:04 +0200

> From: Po Lu <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Wed, 06 Dec 2023 20:41:34 +0800
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > Or why would the dynamic-setting machinery call get-device-terminal
> > for a display that has no frames?
> 
> Because events are sent when configuration changes take place on each
> display, rather than on each frame.  Although there aren't any frames, a
> configuration change is detected and duly reported, after which the
> dynamic-setting command bound to the event generated is called, and...

So the bug is in the command bound to the event, in that it assumes
there are frames on each display?  IOW, I would expect such a command
to do nothing about a display where we have no Emacs frames.