Safe way to start DOSBox with config

DOSBox is great, but for general use on Linux, having to type “-conf /path/to/my/config” with every single load sucks.

If you want to make it automatically load your config file in addition to any other commands you pass, crease a shell script like the one in the following example:

#!/bin/sh
dosbox -conf ~/.dosbox/dosbox.conf "$@"

Save this as something like /usr/local/bin/dos and CHMOD it to 755.

Now, from anywhere on your system, you can run any dosbox command line you want, substituting “dos” for the initial “dosbox.” Your flags will pass perfectly, and your config file will always be loaded automatically.

Using the ~ in the script is great for keeping per-user settings for DOSBox.


About this entry