I've a distant computer that sets the DISPLAY value on ssh, but it has a so old X server that Emacs can't connect to it. No problem, it's not due to Emacs. However, I then use `emacs -nw'. Well, I don't see the point of this message : $ emacs -nw Xlib: connection to "localhost:10.0" refused by server Xlib: Invalid MIT-MAGIC-COOKIE-1 key Display localhost:10.0 unavailable, simulating -nw $ Emacs, my dear, please don't simulate, do it. I propose the following (maybe naive) tiny change :