0

I have a bash script that calls an executable (some commercial software) in "batch mode". On the commandline, if X is available the program runs to completion and then quits, but if not the program hangs. I think this because:

  • It works over VNC
  • It doesn't work over ssh if ssh -X has not been specified.
  • It works over ssh if -X has been specified
  • It doesn't work with Grid Engine. When I qsub the script it just stays on status 'r' indefinitely and I cannot see any output in the .sh.o.XXX or .sh.e.XXX files

The upshot is, I want to submit this script to Grid Engine, but I can't!

The program never asks for user input when in the so-called "batch mode".

Is there some way to provide an X environment in Grid Engine, just to allow the program to complete on its own? I guess one problem is that, since I cannot see the source code, it is difficult to see exactly what the program is asking for.

migrated from serverfault.com Jun 15 '16 at 8:06

This question came from our site for system and network administrators.

  • you might be able to see where it is hanging if you run the binary with strace to see the system calls. – meuh Jun 15 '16 at 8:47
0

You need Xvfb which is a "headless" X display. Run it somewhere and in your script's env set $DISPLAY to that location.

  • Can you explain why Xvfb would work, but why setting the DISPLAY variable in my qsub script to some VNC server on the head node would not work? – feedMe Jan 11 '17 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.