Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to SSH and trying to setup a connection to run Xapplications through my school. I made the login perfectly fine but once inside, i export the display to my ip ie:

export DISPLAY=MYIP:0.0

After that i try to run serveral xapplications for example xterm or firefox, though nothing happens. Instead of telling me that it cant reach the display or similar, I get no responce from the terminal, i have to ctrl + C to get back to the prompt.

I get the feeling I'm missing something simple..

share|improve this question
up vote 2 down vote accepted

If you're setting DISPLAY then you're overriding ssh's X11 forwarding; ssh sets DISPLAY properly itself with the -X or -Y option (you probably want the latter).

Once you connect, run echo $DISPLAY , you should see 10:0

Beyond that, your attempt to connect X11 directly (don't do that; it's extremely insecure) is likely being dropped by a firewall.

Also, if you are wanting to tunnel http traffic, rather then forwarding firefox, it is better to use port forwarding, ie a socks proxy.

ssh -C2qTnN -D 8080 username@server


share|improve this answer
If I don't set the display, it tells me "cant open display, display is not set". So how should I not connect to X11 directly? I'm entering ssh -x login@host. – Mikael Apr 8 '12 at 13:30
ssh is case sensitive. -X or -Y (you want -Y as I already told you) turns on X11 forwarding. -x as you gave it turns it off. – geekosaur Apr 8 '12 at 13:53
Very good, thank you guys! Case sensitivity can be a bitch (when you don't know about it). It now works perfectly fine! – Mikael Apr 8 '12 at 14:18

Your Answer


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.