SOLVED: ssh login fails to set $DISPLAY

Charles Curley charlescurley at
Thu Nov 17 11:55:36 MST 2011

On Sun, 13 Nov 2011 11:10:18 -0700
Charles Curley <charlescurley at> wrote:

> I have three Debian 6.0.x machines, two virtual. The third, dragon,
> runs XFCE. I can log into the third machine, but cannot get X to work.
> $DISPLAY is not set for root or for a regular user.

Solution: per

Apparently the problem had to do with SSH trying to use IPV6, which is
not installed on that machine. The solution, then, is to tell sshd to
use ipv4 only. In the file, /etc/ssh/sshd_config add the line

AddressFamily inet

above the first Port or ListenAddress statement(s). Then restart sshd:

/etc/init.d/ssh stop ; /etc/init.d/ssh start

You can restart sshd from an ssh login, BTW. It does not clobber your

At least, that solved this particular instance of failing to set
$DISPLAY. There are other possible solutions, based on other possible
causes of the problem.

Thanks for the help!


Charles Curley                  /"\    ASCII Ribbon Campaign
Looking for fine software       \ /    Respect for open standards
and/or writing?                  X     No HTML/RTF in email    / \    No M$ Word docs in email

Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB

More information about the PLUG mailing list