Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an interesting issue - on Windows using Xming I can forward X11 requests to my client (PC) successfully and can run the applications. However, I have recently installed Ubuntu 13.04 on my PC and somehow I couldn't make it work.

My /etc/ssh/ssh_config has the following lines:

Host *
ForwardAgent yes
ForwardX11 yes

And I try connecting using the command:

ssh -X -v username@xxx.xxx.xxx.xxx 

The verbose output shows me:

X11 forwarding request failed on channel 0

I have also executed xhost + to disable all access control on client, but the weird thing is on my client the DISPLAY variable is set to :0 and I cannot replace it with anything else such as localhost:0 or even $Local_IP:0, X11 won't work when I do that, see sample output below - I suspect this could lead to an answer:

koray@koray-Latitude:~$ export DISPLAY=localhost:0 # $localip:0 doesn't work either
koray@koray-Latitude:~$ emacs
Display localhost:0 unavailable, simulating -nw
koray@koray-Latitude:~$
share|improve this question

1 Answer 1

up vote 0 down vote accepted

I solved it - it was an authentication issue. Executing the following line on Server resolved the issue:

$ xauth add ${client_ip}:0 . ${hex_key}
xauth:  creating new authority file /homes/${username}/.Xauthority

where ${client_ip} is the client with X server running, ${hex_key} is the 32-character hex string. Afterwards upon assinging the $DISPLAY env variable I can now connect successfully.

share|improve this answer

Your Answer

 
discard

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.