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 am trying to script an visualization application, grads, to generate a bunch of maps in a preprocessing batch.

The application normally takes input from the console and launches an X window to display the results in. After the results are display, you can write them to an image file.

is there a way to set the X display to be some kind of null device that ignores all the input and output?

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

According to the section on starting and quitting in the GrADS User's Guide, you can use -b as command line option when starting the program to run it in batch mode. It won't use a display window at all. You can also specify a command to run as soon as the program starts (-c) and have it quit (-x) as soon as that command finishes. The documentation on the command line options says that you can use

grads -pbxc 'my_script.gs'

or

grads -lbxc 'my_script.gs'

to run the script silently and exit when it completes. (The first command uses portrait mode while the second uses landscape mode.)

The documentation on scripting in the user's guide explains how to write the output to a file.

share|improve this answer
    
thanks, i could of sworn i tried something like this out of the docs but it was still trying to connect to X –  user43856 Jul 25 '10 at 4:34
add comment

I am not really sure about what you are asking. You want to set the X display without having X installed?

/dev/null is anyway a file that basically ignores everything you passes to it.

share|improve this answer
    
no, i want to run an X application without actually having X installed. –  user43856 Jul 25 '10 at 1:26
    
Okay, then I assume that you don't need to control it in any way? it should just run in the background? –  bleakgadfly Jul 25 '10 at 11:23
    
yeah i want it to run in the background so to speak, i want to control it via some other means like a socket or something else. –  user43856 Jul 27 '10 at 22:57
add comment

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.