[torqueusers] Displaying X apps from a job

Troy Baer troy at osc.edu
Thu Feb 16 12:37:11 MST 2006

On Wed, 2006-02-15 at 13:47 -0700, John Hanks wrote:
> I'm trying to set up our cluster so that users can submit jobs with X
> apps and have them display back at the users workstation. Everything
> I've googled up says that 
> qsub -V job.sh
> should work if job.sh starts up an X app. This is not working for me and
> I don't understand the mechanics of how jobs run well enough to know
> where to go to troubleshoot. I can ssh to any node and display an X app
> without any problems, it's just when I go through torque that I get:
> Error: can't open display.
> when starting X applications. Any pointers would be appreciated.

In principle, this should "just work".  In practice, there are a number
of things at work that have little to do with TORQUE itself that all
have to be configured correctly.  The best way to debug this problem
would be to submit this job and see what it returns:

There are several possibilities of what could be wrong, including the

1.  The compute nodes may not have a route back to the user's
workstation (particularly if they're on a non-routable private network),
so they can't connect to the X display.

2.  The user is logging into the login node in an ssh session, and the
ssh client is not requesting an X pseudo-display.  (This seems to be the
default in recent OpenSSH release, and I'm not sure why.)  If that's the
case, the user would need to add the following to $HOME/.ssh/config on
their workstation:

Host name-of-login-node
  ForwardX11 yes
  # the following may also be needed to make things that use
  # X extensions like OpenGL/GLX work with recent OpenSSH releases
  ForwardX11Trusted yes

3.  The user is logging into the login node in an ssh session with X
forwarding enabled on the client side, and sshd either isn't creating an
X psuedo-display at all or is attaching the X pseudo-display to
localhost on the login node rather than a real IP address.  (This is
another odd default in recent OpenSSH releases.)  To disable that
behavior, set the following in /etc/ssh/sshd_config and restart sshd:

X11Forwarding yes
X11UseLocalhost no

Hope this helps,
Troy Baer                       troy at osc.edu
Science & Technology Support    http://www.osc.edu/hpc/
Ohio Supercomputer Center       614-292-9701

More information about the torqueusers mailing list