Skip to main content

Configuring DOSBox and its window size

Menghuan1918About 2 min

By default, DOSBox's window size is specified in pixels, which is a little bit too small for modern screens. It is not possible to drag and drop the window to resize it, although it is possible to use alt + Enter to switch it to full-screen mode, but for efficiency reasons it is better to resize the window.

Install DOSBox

Use the Package Manager to install more easily and quickly on each system! Just open your Terminal/PowerShell and enter the command to install.

In particular, for Windows, its own package manager winget should be supported on Windows 10 1709 and above. If the winget command is not found, you can see Microsoft's instructions for installing wingetopen in new window or go directly to the DOSBox websiteopen in new window to download DOSBox and install it manually.

Windows
winget install DOSBox
After install
After install

Configure window size

The file path on Windows and Arch Linux
The file path on Windows and Arch Linux

Note the directory of conf files loaded on the command line after startup (as shown above) and open it using a file editor.

For Windows

Find about 30 lines where the change is made:

windowresolution=1280x1000
output=overlay

Where windowresolution is followed by the value of the window size you want to set. output You can fill in one of overlay, opengl, openglnb, ddraw.

For Linux

Find about 30 lines where the change is made:

windowresolution=1920x1080
output=opengl

Where windowresolution is followed by the value of the window size you want to set.

Subsequent restart of DOSBox window size is mostly better.

Like this
Like this

Setting up automatic mounting

Still with the configuration file mentioned above, scroll to the bottom and there is a part like:

[autoexec]
# Lines in this section will be run at startup.
# You can put your MOUNT lines here.

Just put the command you want it to execute automatically here. For example, if you want to mount a folder:

Windows

[autoexec]

MOUNT C c:\masm

C:

It's automatically mounted on startup
It's automatically mounted on startup

For Linux...

For Linux, you can directly open the programme you want to run in DOSBox without doing a manual mount! Just right click on the programme you want to open, select Open with another application and then select DOSBox.

I didn't realise this until I looked at the official docs either...
I didn't realise this until I looked at the official docs either...

You can also use this Github projectopen in new window to interact with DOSBox in scripted form on Linux!Like showing in the Vedioopen in new window below: