VOGONS

Common searches


First post, by effigy345

User metadata
Rank Newbie
Rank
Newbie

I've been trying to figure out how to launch DOSBox with an alternative config file for some time on my Mac. I've got a few games that I want to specify an alternative keymap for and, if my understanding is correct, that can only be done by having a separate config file for these few games. Everything I can find online pertaining to DOSBox specifically skips over how to do this on Mac or gives only the vaguest of details. I've found some instructions online for adding command line arguments to an application on Mac that weren't specific to DOXBox, but I'm having trouble adapting them to DOSBox. For the longest time, I thought my arguments weren't getting passed to DOSBox, but now I understand that they are, but the "-conf" CLA (command line argument) is being ignored. If I use "-startmapper", then it works without issue. But no matter what I try, I can't get it to use a config file I specify. I've tried this from the Terminal window, and I get no errors indicating what the problem is. The command I'm using is:

/Applications/DOSBox.app/Contents/MacOS/DOSBox -conf /Users/<username>/Documents/DOSBox/DOSBox 0.74-2 Preferences

I modified it for pasting here to omit my username since its my IRL first name. Also, before running this, I copied my DOSBox config file to this place and made an alteration to the auto exec section so I can tell which config is loading. But no matter how I format this command (I tried using the "open -a" command, too), it keeps telling me:

Loading primary settings from config file /Users/<username>/Library/Preferences/DOSBox 0.74-2 Preferences

Can anyone offer some advice on how to get DOSBox to load my alternative config file?

Reply 1 of 6, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Dosbox should give you an error because it can't find the config you specify in the -conf command line. As there are spaces in the path you need to put it in quotes
/Applications/DOSBox.app/Contents/MacOS/DOSBox -conf "/Users/<username>/Documents/DOSBox/DOSBox 0.74-2 Preferences"
As it can't find /Users/<username>/Documents/DOSBox/DOSBox it falls back to the default config again

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 2 of 6, by effigy345

User metadata
Rank Newbie
Rank
Newbie
Dominus wrote:

Dosbox should give you an error because it can't find the config you specify in the -conf command line. As there are spaces in the path you need to put it in quotes
/Applications/DOSBox.app/Contents/MacOS/DOSBox -conf "/Users/<username>/Documents/DOSBox/DOSBox 0.74-2 Preferences"
As it can't find /Users/<username>/Documents/DOSBox/DOSBox it falls back to the default config again

Thanks for the suggestion, Dominus. When I added quotes, it didn't make a difference. For giggles, I renamed the config to remove spaces (while also leaving the quotes). For some reason that I do not understand, this worked. Thank you. I spent so much time trying to figure this out.

Reply 3 of 6, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

If the quotes didn't work then you likely didn't set them correctly or something else was wrong in your path or file name. I did test this before writing here.
On the wiki you can find an AppleScript I made which lets you choose a config in ~/documents/dosbox/ to start DOSBox with.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 4 of 6, by effigy345

User metadata
Rank Newbie
Rank
Newbie

I'm willing to accept the fact that I probably fat fingered the command the first time.

Also, I'm not seeing that command you referenced as being in the wiki. Can you specify where it is? I'd like to give it a read. Even though this problem is resolved for me, I'm still curious.

Reply 5 of 6, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

It's an AppleScript, not a command at https://www.dosbox.com/wiki/Mac_OSX_Advanced

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 6 of 6, by kode54

User metadata
Rank Member
Rank
Member

You can also pass arguments to macOS GUI applications by running them with the “open” command from the Terminal. Read the “open” man page, or pass it a —help. That’s supposed to be two normal hyphens, but fracking iOS won’t let me type two hyphens without automatically merging them into an em dash.