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

When I connected to my 11.04 server using PuTTY (from Windows) with X11 forwarding enabled, if I entered the command echo $DISPLAY I'd see localhost:10.0 and when I started an X program, it would appear on my Windows's X server. After upgrading to 11.10, the DISPLAY variable is no longer being set when I log in, so X forwarding doesn't work. I have checked to ensure that X11 forwarding is still enabled in the SSH server config (it is) and the config files haven't actually changed since before the upgrade. So why did the upgrade stop this feature from working? Oh, I can manually set DISPLAY to point to my Windows machine and X works fine, but it isn't being tunneled through the SSH connection like I'd prefer. Help?

share|improve this question
up vote 4 down vote accepted

For any who stumble across this: Adding AddressFamily inet to /etc/ssh/sshd_config and restarting the ssh service fixed the problem. If you care to wade through you find the solution most of the way down the page.

share|improve this answer
Thanks for documenting this.... – belacqua Oct 31 '11 at 16:42

Ubuntu 11.10 contains a newer version of PuTTY (0.61) vs. Natty's (0.60).

Something could have been broken in the update. Here is a relevant changelog (Source):

These features are new in beta 0.61 (released 2011-07-12):

Kerberos/GSSAPI authentication in SSH-2.
Local X11 authorisation support on Windows. (Unix already had it, of course.)
Support for non-fixed-width fonts on Windows.
GTK 2 support on Unix.
Specifying the logical host name independently of the physical network address to connect to.
Crypto and flow control optimisations.
Support for the SSH-2 compression method.
Support for new Windows 7 UI features: Aero resizing and jump lists.
Support for OpenSSH AES-encrypted private key files in PuTTYgen.
Bug fix: handles OpenSSH private keys with primes in either order.
Bug fix: corruption of port forwarding is fixed (we think).
Bug fix: various crashes and hangs when exiting on failure.
Bug fix: hang in the serial back end on Windows.
Bug fix: Windows clipboard is now read asynchronously, in case of deadlock due to the clipboard owner being at the far end of the same PuTTY's network connection (either via X forwarding or via tunnelled rdesktop). 

You can investigate further on PuTTY's wishlist page.

share|improve this answer
I'm not using the PuTTY from Ubuntu. I use PuTTY on Windows XP, where I also run an X Server. Before the upgrade from 11.04 to 11.10, the X11 forwarding worked fine, after the upgrade is does not work. So something changed in the upgrade that broke it on the Ubuntu side, where my Windows-PuTTY connects to the OpenSSH server (which has X11 Forwarding ENABLED.) – Steve Valliere Oct 25 '11 at 11:48
Sorry, my bad! Since my answer is on Ubuntu, it does not apply to you, unless of course you have updated the PuTTY client on your Windows side. If not I'd suggest to test on a different box (either as client or server) to see if the remote side is causing the problem. – lgarzo Oct 25 '11 at 13:51
I can do that, but PuTTY/X11 forwarding was working under 11.04 at 3pm (just before the upgrade) and NOT working at 4:45pm (just after the upgrade.) I'm 100% certain I did not update or change anything on Windows during that time. – Steve Valliere Oct 25 '11 at 19:10
OK. So to test for myself I installed Cygwin/X 1.11.1 and PuTTY 2011.10.26:r9326 on Win XP. Then followed the instructions on I've created a PuTTY SSH session to my Ubuntu machine. Finally started a gnome-terminal and it appeared on my windows X server. Could you please re-create your environment on a different box, because it seems to be working. – lgarzo Oct 26 '11 at 9:29
I download/install current putty on 4 other machines. Configure to enable X11 forwarding. The $DISPLAY variable is NEVER set in my environment when I log in as it should be. If I manually set it as PuTTY normally does, X doesn't work. If I set it to point directly to my desk, X works. Don't want to argue, but I'm trying to find out why MINE is broken after 11.10. Don't care where else it works, just what could cause what I am seeing. Just 'cause you don't have a flat tire doesn't mean that I don't have one! – Steve Valliere Oct 26 '11 at 14:06

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.