SSH X11 Forwarding on Ubuntu server

I use X11 forwarding a fair bit with ssh - it's so nice to just do "ssh -X user@host" and be able to run the odd command that needs X.

Anyway - came across a little problem this morning with a Ubuntu server that I was trying to do this on. For those that have never used Ubuntu server - it is like the full Ubuntu desktop but basically with all the X stuff stripped out. I like to run this - as I really don't need X on a headless server and it saves me on some CPU/memory and makes apt-get upgrade nice and fast.

Anyway - back to X11 forwarding - with Ubuntu server when I tried to launch an X application - I got the message

Error: no display specified

Had a look through the environment variables - and the DISPLAY variable had not been set like ssh -X automatically does. Tried to set it manually, but nothing.

I then discovered with the help of https://help.ubuntu.com/community/SSHHowto that xauth is not installed by default with Ubuntu server. A quick.

apt-get install xauth

Fixed everything up nicely. Happy happy joy joy.

Comments

Awesome. Thanks.

Same problem, your fix was what I was looking for. Thanks!

Found this post today,

Found this post today, trying to solve the exact same problem. Thanks :)

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Insert Flickr images: [flickr-photo:id=230452326,size=s] or [flickr-photoset:id=72157594262419167,size=m].
  • You may link to webpages through the weblinks registry

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.