2

I'm running a program (concretely xfoil) and during calculations it opens and closes a window automatically. I would like the pop-up window to keep hidden.

Create control file:

cat <<EOF > controlfile.xfoil
NACA 0012
GDES
Flap0.8 0.0425 0.1
eXec

OPER
RE 1388888
MACH0.0561930287789
v
ITER
300
ALFA 10
FMOM 0.8 0.0425

QUIT
EOF

Run file from terminal and save output:

xfoil < controlfile.xfoil >outputfile.out

When running it you'll see briefly a pop-up window.

How can I keep the pop-up window hidden? Luckily the source code of xfoil is available and I could compile a version without the window, but I would prefer not having to.

1

It is a bit excessive, but you can start a 2nd X11 server with no framebuffer and direct your display there:

Xvfb :1 &
sleep 2
DISPLAY=:1 xfoil <controlfile.xfoil >outputfile.out
kill -15 $!
  • Why is sleep 2 necessary? – Jacek Jun 24 '16 at 13:59
  • 2 is an arbitrary number, you may need more or less. The problem is you have to wait for Xvfb to run far enough for it to create the socket needed by xfoil to connect to. To avoid all problems you should really run a small loop, doing sleep 1 and then checking if Xvfb is ready, eg with if DISPLAY=:1 xdpyinfo >/dev/null... – meuh Jun 24 '16 at 14:49
0

There is a top menu in XFoil called plotting options, which you can access with PLOP. Then the command G F for graphic output : false will disable these pop-ups.

So in your program that would be the addition of:

PLOP
G F

At the very beginning. Don't forget the empty line so that you go back to top menu !

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.