"Can't open display" even after access with xhost

Posted by Yann on Ask Ubuntu See other posts from Ask Ubuntu or by Yann
Published on 2012-05-23T15:35:06Z Indexed on 2012/11/28 11:18 UTC
Read the original article Hit count: 255

Filed under:
|

I'm trying to run a graphical program remotely, without using ssh. I've set the display variable on the server (let's say server.com, Linux, not ubuntu, and no su rights) to point to my workstation (workstation.com, ubuntu 10.04)

setenv DISPLAY workstation.com:0

Then on my workstation I've tried both

xhost +server.com

and

xhost +

Then I ssh into the server (to test things):

ssh [email protected]

and try to run xclock, and get the following error:

Error: Can't open display: workstation.com:0

I've looked at /etc/ssh/ssh_config on the workstation and I should be forwarding correctly: X11Forwarding yes.

How do I go about troubleshooting this?

What logs on the workstation document these failed attempts?

To explain why I'm doing this: I want to run a batch job on a server to debug an MPI-based parallel program. I want to run xterm as the batch job executable, per the instructions provided by the system admins.

This setup use to work. I reinstalled things on my workstation and since then I frequently get one-time message along the lines The authenticity of host 'hostname (XXX.XXX.XXX.XX)' can't be established.

My attempt to fix the above was to move my ~/.ssh/known_hosts file to a back up on both server and host, and then to ssh from each to the other with the flag -o StrictHostKeyChecking=no. I no longer get that message, but I was wondering does this play a part in why X11 forwarding is not working?

© Ask Ubuntu or respective owner

Related posts about ssh

Related posts about x11-forwarding

  • How to use X11 forwarding with putty

    as seen on Super User - Search for 'Super User'
    I have a VM with RHEL 5 without an X server. My host has Windows 7. I need to connect to the VM and redirect the X11 output of the commands to my host. I know that if my host were a GNU/Linux machine it would be as easy as ssh -X . I'm ussing PuTTy to connect by SSH to the VM, I tried enabling… >>> More

  • fast X11 forwarding

    as seen on Super User - Search for 'Super User'
    Hi, I am using ssh -X to display GUI apps locally. Is there a better way to speedup this processes - something similar what NoMachine Nx server / client does? Thanks, Mariusz. >>> More

  • failed to enable x11 forwarding

    as seen on Super User - Search for 'Super User'
    I am trying to enable X11 forwarding on my server which is running on FreeBSD 7.1. I have a putty installed in my windows in which i have enabled X11 forwarding by checking on Enable X11 forwarding and specifying following parameter X display location localhost:0 after that i run… >>> More

  • failed to enable x11 forwarding

    as seen on Super User - Search for 'Super User'
    I am trying to enable X11 forwarding on my server which is running on FreeBSD 7.1. I have a putty installed in my windows in which i have enabled X11 forwarding by checking on Enable X11 forwarding and specifying following parameter X display location localhost:0 after that i run… >>> More

  • ssh xauth error Mac OS 10.6.3

    as seen on Super User - Search for 'Super User'
    Whenever I ssh with X11 forwarding to a remote box from my macbook I get the following error after a few seconds pause: Warning: untrusted X11 forwarding setup failed: xauth key data not generated Warning: No xauth data; using fake authentication data for X11 forwarding. Any ideas on how to fix… >>> More