Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My workstation was recently updated to Windows 7. I've downloaded putty and have configured it to the same settings I had under Vista.

Whenever I ssh to a vm running Centos 5.4 and try to run emacs on a file, I'm getting an error about a connection to an X server:

[ecto1 ~]$ emacs foo.bar
Connection lost to X server `localhost:10.0'

I never received this error message when I had Vista. I can get around it by aliasing emacs to 'emacs -nw', but I don't feel that I should have to do this.

My co-worker has the same hardware that had the same upgrade and his sessions do not seem to be doing this.

Any advice? I can't find anything on google and don't know where else to start.

[ecto1 ~]$ emacs -version
GNU Emacs 21.4.1
share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Assuming that you do not want to run emacs as a client to an X server, double check your Putty configuration under Connection/SSH/X11 and make sure that "Enable X11 forwarding" is unchecked.

share|improve this answer
    
I should have been more specific, but yes, I was wanting to run emacs without the X server. Perfect! –  twilbrand Apr 20 '10 at 13:54
add comment

Double check your PuTTy settings and make sure that the X11 Session is being forwarded properly and you have a X11 server running locally. If you don't want to have the GUI window opened, running emacs -nw is the best alternative.

The default behavior for emacs is to try to open a GUI window. If you don't have X11 properly forwarded with a X11 Window Manager (like Hummerbird eXceed) running locally, the program will fail.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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