With Emacs 26.1 installed on a Linux RedHat flavour without X, I want to run Emacs GUI over an SSH connection with X11 forwarding and Xming server on client. Since there is no X on the machine, Emacs starts in text mode. I know that "emacs -nw" forces Emacs in text mode, but how to force GUI?

  • I don't want to install Emacs for Windows and run emacs server on target linux machine May 1, 2020 at 21:23

1 Answer 1


Emacs will start "in GUI mode" automatically when possible. There are basically 2 conditions that need to be satisfied:

  • You must use an Emacs built with GUI support.
  • There must be an Xserver it can connect to, which is indicated by the usual $DISPLAY environment variable.

So make sure your Emacs was built with GUI support, and make sure you launch it from a shell where $DISPLAY is set properly.

  • After verifying the system-configuration-options variable I have confirmed that my emacs is compiled with X11 support. $DISPLAY variable was not properly set since xauth was missing. May 1, 2020 at 22:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.