Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Using ubuntu 12.10 and have putty installed, I am using ssh /putty to connect an AIX system once I do that I export the display and run something simple like 'xclock' or 'xterm'

Problem is its not working, I get the following 'Error: Can't open display:'

I have checked on the server side and on my laptop to make sure X11forwarding is enabled and it is within putty,

ssh_config (local) : ForwardX11 yes
                     ForwardX11Trusted yes

sshd_config (AIX Server) : X11Forwarding yes

I have tried connecting through Putty,and from the CLI

ssh -X user@<Aix_Server>

But no matter what I try I get the : Error: Can't open display: message This was working for me, but not since I have migrated to 12.10

Anyone out there come across this before have any suggestions?

EDIT

The below is from AIX after I login using Putty:

 echo $DISPLAY
 xclock Error: Can't open display: $
share|improve this question
    
Ok the below is from AIX after I login using Putty. $ echo $DISPLAY $ xclock Error: Can't open display: $ –  user138219 Mar 6 '13 at 23:23

2 Answers 2

Ok it seems that the following has resolved the issue.

After looking at this for the last while it appears that the xauth location changed from AIX 5 , so it wasn't able to find it.

So when using sudo after that, I used the following :

sudo DISPLAY=localhost:0.0 XAUTHORITY=/home/{home_dir}/.Xauthority {command_here}

Worked and I was able to launch and get done / installed what I needed.

Thanks to @zwets your help was great, sometimes after looking at something for too long you need some fresh input.

share|improve this answer

How about ssh -Y user@server?

share|improve this answer
    
Yeah tried both options ssh -Y and ssh -X but te same with both options. –  D1979 Mar 6 '13 at 20:33
    
@D1979 You say "I export the display". Using ssh -X, -x or -Y you shouldn't do that as the X11 output gets tunneled. Ssh will set it for you. What is the value of DISPLAY right after you login? What does echo $DISPLAY show? –  zwets Mar 6 '13 at 20:53
    
And to isolate that this is not a client-end issue, does DISPLAY get set when you ssh -Y localhost on the Ubuntu end? (Note: you are ssh-ing from a terminal window in the X environment, right? I once made the mistake to try and diagnose this from VT1.) –  zwets Mar 7 '13 at 7:32
    
ssh -Y localhost when I try this I get the following : ssh: connect to host localhost port 22: Connection refused I guess this is because I have not got openssh-server server installed. On my laptop I am using the ssh-agent to connect to the server. –  D1979 Mar 7 '13 at 9:18
    
OK, I assumed you had an ssh server running on your laptop. Everything seems in place (in fact, having X11Forwarding yes on the remote end normally suffices; the client options ForwardX11* are redundant with -X/-Y). Final check: do you have xauth? –  zwets Mar 7 '13 at 10:35

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.