OSU Navigation Bar

The Ohio State University

Department of Statistics

Cockins Hall
rollover image OSU Statistics
            Home

design element

OSU Statistics

Home

News

Research & Consulting Groups

People

For Visitors

For Prospective Students

For Current Students, Staff & Faculty

Contact Us



rollover image

For Current Students & Faculty

rollover image

Courses

rollover image

Links

rollover image

Computer Support

rollover image

Internal Documents

rollover image

webmail

SSH and Emacs (and some other X clients)

Some people have been having trouble starting emacs when running SSH. It will sometimes come up with the error 'Cannot open Display.' This is because if the DISPLAY environment variable is set emacs assumes you are running X windows. When SSH is set to tunnel X connections (a good thing) it will automatically set the DISPLAY variable, whether you are running an X server or not. There are several solutions to this:

1) Run an X server

Xwin32 for PC or Exodus for Mac. Then emacs will display in its own X window. Note, on slow connections this is inadvisable. Also, if you use an X server, make sure you read the setup guides to configure it properly.

2) Do not forward X connections

By not clicking on the box 'Forward X11 connections' in the SSH setup, SSH will not set the DISPLAY variable. Do this if you don't intend to run an X server often.

3) Unset the DISPLAY variable

You can type: unsetenv DISPLAY at the unix prompt and then emacs will quit trying to come up in an X window.

4) Tell emacs to not use a separate window

Type: emacs -nw to tell emacs to come up in the terminal window.

5) Use another editor

Pico is not as powerful as emacs, but it is more user friendly.



If you have trouble accessing this page, or need an alternate format contact webmaster@stat.osu.edu.