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.
   local$> echo $DISPLAY
   :0.0
   local$> ssh -X -i PEMFILE ec2-user@AMAZONEC2_AMI
   [ec2-user@REMOTE_AMI ~]$ echo $DISPLAY

   [ec2-user@REMOTE_AMI ~]$ sudo grep X11 /etc/ssh/sshd_config ~/.ssh/*
   /etc/ssh/sshd_config:#X11Forwarding no
   /etc/ssh/sshd_config:X11Forwarding yes
   /etc/ssh/sshd_config:#X11DisplayOffset 10
   /etc/ssh/sshd_config:#X11UseLocalhost yes

Hence the display is not forwarded. a command like emacs & for instance does not show the X11 window on the local desktop. Please advise.

share|improve this question
2  
Did you restart your sshd after changing X11Forwarding to yes? –  Olli Feb 22 '11 at 19:52
    
You can also check to see if there is any interesting warning/notes when you run ssh -vvvv -X -i ... –  Alex Feb 22 '11 at 19:53
    
X11Forwading was set to yes from before. For -vvvv debug1: Remote: No xauth program; cannot forward with spoofing. Could this be the reason ? –  Humble Debugger Feb 23 '11 at 15:51
add comment

2 Answers

up vote 14 down vote accepted

I did this:

sudo yum install xorg-x11-xauth.x86_64 xorg-x11-server-utils.x86_64

and I finally got a display variable and it all started to work!

share|improve this answer
    
this also worked for me. –  xaxxon Dec 30 '11 at 1:42
    
worked for me - I ran the command exactly as presented, then I logged out, and logged back in using ssh -XY user@myinstance.com –  Escualo Feb 24 '12 at 18:07
    
I had to reboot my instance in order to get sshd to start offering me X11 forwarding: simply restarting sshd wasn't enough. –  crb Feb 27 '12 at 13:48
    
Worked for me on 6.2, no restarting needed. –  aaa90210 Jun 6 at 7:52
add comment

Install from the above answer didn't work for my RHEL 6.2 EC2 instance. Here are steps that did work:

$ sudo yum groupinstall "X Window System"
$ export DISPLAY=localhost:10.0

# now disconnect and create a new SSH with -X option

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.