complexplasma
complexplasma

Reputation: 11

How to run the code without the GUI

I have a rather long perltk code in my hand and I would like to run the simulation in a batch mode (without using the GUI). e.g. I would like to run it with script like "myprog.pl -b" in stead of setting all the parameters in the GUI and click buttons.

My current method is using a separated XML file for config and the function "after" which means the GUI will pop-out and start the simulation then exit after sometime. It is now working, but I have a question: is there a better way solve this problem? Is that possible to have the GUI shown in the background (so we wont see it) in stead of pop-out?

Upvotes: 1

Views: 431

Answers (1)

daxim
daxim

Reputation: 39158

  • Change the program so it is accessible from both a graphical and command-line interface. Factor out its real functionality into subroutines.
  • Run the program in an xvfb so that no window is shown on the main display.
  • Configure the window manager to always start instances of this program minimised and/or with a 0x0 size.

Upvotes: 3

Related Questions