Question

I have an windowed App (f.i. an App with a graphic or GUI X-window) which takes a text file as input (stdin) and writes an output text file. During computation, it briefly opens a window which is necessary for graphical computations and then the app quits. How can I integrate this program in a purely textual and automated batch environment of a shell in linux? When I try to just run it in the shell then of course I get an error "Can't open display".

Is there a way to keep the APP window hidden such that it can run purely in the shell?

(in my case it is actually an AIR app, but I hope this is solvable in general for all kinds of xwindow-based apps)

Was it helpful?

Solution

Seems I can answer my own question. The answer is: Xvfb. It provides a 'fake' virtual framebuffer.

In Ubuntu linux I did:

apt-get install xvfb

After installation a xvfb-run wrapper script became available which does exactly what I need:

xvfb-run myapp

Perfect!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top