简体   繁体   中英

Determine programmatically whether Emacs supports X11

I got a Ubuntu 18 server from my school. I want to use X Forwarding to use Emacs from the server. But I am unsure whether the Emacs on the server is the one with GUI support.

I tried to run emacs with X forwarding enabled, with ssh -X my_server . Running emacs on the server then launched a text-based emacs, which seemed to indicate the Emacs on the server does not support GUI. But I am looking for a more reliable, straight-forward solution to determine if the Emacs instance on the server supports GUI, say, by checking the package name of the installed Emacs, etc.

You might try launching a simple X11 program first, to ensure your X forwarding is set up correctly. I use xeyes for this. Once you're convinced that the X forwarding is working, then go on to check out the emacs installation.

Ensure your emacs command is not aliased to something else, such as emacs -nw.

Launch emacs to see if the GUI starts.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM