VOGONS

Common searches


First post, by Commander Spleen

User metadata
Rank Newbie
Rank
Newbie

Is it possible to setup a global configuration file for DOSBox in Linux? By this I mean a single dosbox.conf that the program defaults to if it is not found in the current or home directories?

Putting dosbox.conf in the user's home directory, at least in Ubuntu, works fine when launching a DOS executable or batch file with a file manager's 'open with' function, but when it's run from within a terminal (i.e. '$dosbox keen1.exe') the internal defaults are used. Placing dosbox.conf in the /usr/bin or /etc directories doesn't work as I'd have expected.

Reply 3 of 5, by XulChris

User metadata
Rank Member
Rank
Member

Although from a system administration perspective it would be nice to set a global configuration file which could be modified by settings in a local configuration file in the user's HOME directory on multi-user systems.

From a packaging point of view, it would be nice for a packager of a distribution to be able to supply default dosbox settings for their particular linux distribution or flavor. However system compliant packages can only install into global system wide directories.

I seem to recall sending you a patch to support this, but you did not know how to query the system's global configuration directory using the gnu autoconf tools (nor did I, and trying to learn autoconf is about as plesant as the morning after drinking three pan-galactic gargle blasters.) However I have picked up some autoconf skillz over the years and can take another look if you think it would be something you would apply.

Reply 5 of 5, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

$ mv /bin/dosbox /bin/real-dosbox
$ printf '#!/bin/sh\nexec /bin/real-dosbox -conf /etc/dosbox.conf "$@"\n' > /bin/dosbox
$ chmod 755 /bin/dosbox

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32