ssh problem when trying to start an X app.: Can't open display localhost:10.0

Asked by LEGOManiac on 2011-10-20

I can ssh -X 192.168.1.2 into my server and run terminal applications, but every time I try to run any X application, I get:

X11 connection rejected because of wrong authentication.
Error: Can't open display: localhost:10.0

I've been googling this for over an hour an can't find a solution that works.

"xauth list" on the server returns a blank line.
"xauth list" on my local machine returns SilverPC/unix:0 MIT-MAGIC-COOKIE-1 26aaba5230f1b6c5675ae347f523d3f6
"xauth list" to another PC from which I can run X applications returns similar results to my local machine

"xauth add :0 MIT-MAGIC-COOKIE-1 26aaba5230f1b6c5675ae347f523d3f6" appears to work, but "xauth list" immediately afterward still shows it to be blank

Permissions on ~/.Xauthority are 600 with me as the owner.

I'm out of ideas.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu openssh Edit question
Assignee:
No assignee Edit question
Solved by:
LEGOManiac
Solved:
2011-11-03
Last query:
2011-11-03
Last reply:
2011-10-22
LEGOManiac (bzflaglegomaniac) said : #1

BTW. For what it's worth, the server is headless, so I can't check it other than by what I can see with SSH.

Jacobsallan (jacobsallan) said : #2

http://ubuntuforums.org/archive/index.php/t-855777.html recommended removing the .Xauthority file in your home directory. As a paranoid, I would 'mv .Xauthority _Xauthority.bak' instead of deleting it.

See if that works.

LEGOManiac (bzflaglegomaniac) said : #3

Do you mean the home directory on the source machine, or the destination machine? The link doesn't specifiy, but I think the destination is implied.

I removed .Xauthority from both my user profile and root's but I still have the same problem.

Jacobsallan (jacobsallan) said : #4

Is there anything interesting recorded in /var/log/auth.log on either machine?

LEGOManiac (bzflaglegomaniac) said : #5

I copied auth.log to auth.log.old on both machines, then exited the ssh connection to the server.

I then used ssh to connect to the server and tried running nautilus to get the error message.

auth.log on both machines was not re-created. I created a blank one (echo >auth.log run as root) and repeated the procedure. Same results: nothing is written to auth.log

LEGOManiac (bzflaglegomaniac) said : #6

For what it's worth, I gather the desktop environment is lxde, but I can't call that up either without the same error about authentication (but nothing said about not being able to open the display).

Trying to run /usr/bin/xeyes fails a per the title of this quesiton.

LEGOManiac (bzflaglegomaniac) said : #7

Checking past questions, I had, back in March, apparently been able to launch the desktop by typing:

lxsession -s LXDE -e LXDE

But now it gives me:
X11 connection rejected because of wrong authentication.

LEGOManiac (bzflaglegomaniac) said : #8

OK. I stumbled upon the solution to this one while trying something else. It turns out that while I had oodles of disk space for the file server partition, the drive which was mapped to /home was out of disk space. Clearing out the recycle bin allowed everything to run smoothly again.