1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

DosBox Generic Guide

Discussion in 'Guides' started by Daerandin, Nov 10, 2013.

  • by Daerandin, Nov 10, 2013 at 7:05 PM
  • Daerandin

    Daerandin Well-Known Member

    Joined:
    Oct 18, 2013
    Messages:
    1,157
    Likes Received:
    259
    Trophy Points:
    83
    Location:
    Northern Norway
    Home page:
    Most DosBox games are pretty similar to set up, so I have made this generic DosBox guide with steps to follow for any DosBox games I write guides for. Since a lot of old Dos games are available on gog.com, I also include steps here for downloading and extracting installers from GOG for use with DosBox. With this guide, you don't have to take the time to learn how to use DosBox if you find it too complicated, simply follow this guide.

    dosb_1.png

    DosBox should be available for install in the repositories of most Linux distros. The official website is located here: DosBox

    Downloading GOG games

    GOG games can be downloaded on Linux by using a web browser, just make sure the "GOG.com Downloader mode" is OFF

    dosb_2.png

    Or you can use the lgogdownloader, which is my personal preferred choice. It is a very useful program for downloading GOG games. There is no graphical interface for it, but it is very fast and provides error free downloads.

    For some Linux distros it may be found in community repositories or similar community provided packages. Installation and usage instructions are located here: lgogdownloader

    On first use, you must log in by opening a terminal and using the command:

    lgogdownloader --login

    You will be prompted for your gog.com account email and password, which you must type in correctly before you can use lgogdownloader to download games.

    To list all games you own, type:

    lgogdownloader --list

    If you only want to see specific games you own, for example any games with 'heroes' in the name, then type:

    lgogdownloader --list | grep heroes

    dosb_3.png

    Example of downloading Heroes of Might and Magic 1 with none of the GOG extras and no cover artwork:

    lgogdownloader --download --game heroes_of_might_and_magic$ --no-extras --no-cover --directory /path/to/folder

    You have to type the game name exactly as it appears from the --list command. The game name you type in will be compared to all games you own, and lgogdownloader will download every game that includes the name you typed in.

    In my particular example, I used the '$' symbol at the end of the name, this specifies that it will only download games that end with the text you typed in. If I had omitted the '$', then it would actually download all 5 heroes games as they all have 'heroes_of_might_and_magic' in the name.

    Unpacking GOG installers

    There is a specific tool created for the purpose of extracting the contents of GOG installers. Innoextract was made to extract the contents of windows installers made with Inno Setup, such as GOG installers.

    The official website is located here: Innoextract

    For Arch users, it is available in the AUR. Ubuntu and Mint users can get the latest version from a PPA on Launchpad. Even though Innoextract is available in the official Ubuntu and Mint repositories, that version is a bit old so I suggest using the PPA.

    If you use Ubuntu or Mint, you can install innoextract with the following commands:

    sudo add-apt-repository ppa:arx/release

    sudo apt-get update

    sudo apt-get install innoextract

    With innoextract installed, navigate in terminal to the folder where you have the GOG installer you wish to unpack:

    cd /path/to/folder

    To extract the contents of the GOG installer, make sure your terminal is in the same folder as the installer, then type:

    innoextract name_of_setup_file.exe

    Note: You can begin typing in the name of the setup file, and then hit TAB on your keyboard to have the terminal automatically finish the name for you

    dosb_4.png

    This will create an 'app' and 'tmp' folder, and in many cases a third 'sys' folder as well. The 'tmp' and 'sys' folders are unimportant and may be safely deleted. All the game content is located in the app folder.

    dosb_5.png

    Note: Inside the 'app' folder you will usually find a 'Dosbox' folder. This can be safely deleted if you wish to conserve space. This folder is only used when installing on windows.

    Important

    To keep this consistent for the rest of the guide, I will assume that you rename the app folder to something similar to the name of the game, and move it to a /games folder in your home directory, like:

    /home/username/games/game_name

    Where username is your user account name, and game_name is the name of the game

    Setting up DosBox

    It would be a good idea to have a folder for your dosbox start scripts, so go to your home directory and create a new folder there which you can call "dosbox_shortcuts". Inside this folder, create a new folder called "config"

    Dosbox has a default config file within a hidden folder in your home directory. Most file managers have the option to view hidden files under "View" or you can press < CTRL + H > on your keyboard to make hidden files visible.

    dosb_6.png

    Go to the .dosbox folder and copy the .conf file you see there over to the /dosbox_shortcuts/config/ folder you just created. You should use the default config file as a template for custom config files for games.

    You are going to want a copy of the dosbox config file for each game, and name each config to something similar to the game so keep it easy to find. If I continue the Heroes of Might and Magic example, I would name it: homm1.conf

    At this point, you should consult the specific game guide for what changes you should make in the custom config file for your game.


    Useful tip for all games

    You can specify if the mouse should be locked within DosBox when running windowed, however this can easily be toggled at any point by simply pressing "CTRL + F10" on your keyboard.

    Do note that certain window managers might not let DosBox handle CTRL presses properly. If "CTRL + F10" does not toggle mouselock for you, then you may want to try "CTRL + Shift + F10"

    Creating game shortcuts

    To make executable shortcuts for your DosBox games, you can make very simple scripts. Open a terminal and type in:

    echo -e "#! /bin/bash\ndosbox -conf ~/dosbox_shortcuts/config/name.conf" > ~/dosbox_shortcuts/shortcut_name

    Replace name.conf with the name of the config file for the game, and replace shortcut_name with the game name. The last thing needed is just to make the shortcut executable:

    chmod +x ~/dosbox_shortcuts/shortcut_name

    Now you have an executable shortcut for the game. You can safely move this shortcut anywhere you want if you'd prefer to have it another place. Many desktop environments also let you create launchers that you can link to a file, such as this shortcut.

    That is all you need for setting up an easy way to start games in DosBox
    Last edited: Jun 8, 2014
    cmdl and booman like this.
  • Categories:

Comments

Discussion in 'Guides' started by Daerandin, Nov 10, 2013.

  1. Daerandin
    I edited the guide to add a tip on enabling and disabling mouselock in windowed DosBox.
  2. Indru
    Hi,
    I don't seem to have hidden files in my /home/indru/ folder. My OS is Solus Budgie and DosBox is installed via eopkg. Any clues where I can find the config files?
  3. Daerandin
    I am not familiar with Solus Budgie, but if it is a Linux distro then you should have plenty of "hidden" files in your home directory. Have you verified this in a terminal?

    Open a terminal, first ensure you are in your home directory, then check for all files:

    Code:
    cd ~
    ls -a
    In the output you should see a directory called .dosbox (note the dot ( . ) in the beginning of the file name).

    This does not appear unless you have already run DosBox at least once. So trying all this before having run DosBox would be pointless.
    booman likes this.
  4. booman
    In Mint I just right-click and click on "Show Hidden files"
    Most Debian and Ubuntu releases allow you to do that
  5. Indru
    You were right with this statement, this was the cause. I had to run DOSBox once for the hidden files to appear.
    This should be stated in the guide, presumably not all people will have DOSBox preinstalled & already ran once when doing this.
    Thank you and have a nice day!

Share This Page