Mike S
Mike S

Reputation: 11409

How to open emacs GUI

There are many guides online to install emacs. They are all the same (like the one I have linked).

sudo apt-get install emacs
emacs testfile        (SUPPOSED to runs the GUI)
emacs -nw testile     (-nw runs emacs in the terminal)

I just installed a fresh copy of Ubuntu 14.04 and installed emacs. When I run emacs testfile it just runs emacs inside the terminal window. I've searched all over online and man emacs but I don't see any information on forcing emacs to use the GUI.

Does anyone know if there is a secret setting or command line option to toggle the default to use GUI vs. terminal mode?

Upvotes: 4

Views: 10460

Answers (2)

ClimateUnboxed
ClimateUnboxed

Reputation: 8087

You can install emacs-gtk to have additional GUI support:

sudo apt-get install emacs-gtk

Upvotes: 1

JSON
JSON

Reputation: 4606

The Ubuntu package emacs is a meta package, which in 14.04 depends on emacs24.

emacs24 is a virtual package provided by emacs24-lucid and emacs24-nox.

From my experience with Ubuntu, emacs-lucid will generally be selected by default, but if you already had emacs-nox installed for some reason, the dependency will already be satisfied, so your apt-get install emacs will not install the graphical version of Emacs.

Also, even if you have the graphical version of emacs installed, it requires the DISPLAY environment variable to be set, to direct it where to display the initial frame. If you are not running your command shell within an X window, or you have used sudo, or some other command that creates a different environment within the shell session, DISPLAY may not be set (you can check with echo $DISPLAY).

Upvotes: 5

Related Questions