Saturday 16 March 2019

Running DOSBox completely headless


I have an old compiler written for DOS that I need to be able to use on a modern Linux system. I have written a wrapper around DOSBox that allows me to invoke it from a Linux command line.


The only problem is that DOSBox does not seem to have an option to suppress the main emulator window that pops up while it is running. It does not hinder the program's functionality (I have the output piped to a file), but I would like to be able to run DOSBox without the emulator window appearing. Is there a way to do this?



Answer



DOSBox uses SDL, which can be told to use a different display driver by setting the environment variable SDL_VIDEODRIVER. The dummy driver will display nothing at all, not even a window.


On Unix, use the export shell command:


export SDL_VIDEODRIVER=dummy

and on Windows, use set.


set SDL_VIDEODRIVER=dummy

Note that on Windows, you will need to use -noconsole to prevent DOSBox from generating the status terminal window.


Source: this forum post.


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...