• articles
  • retro
  • A guide for using Dosemu2 to play Door Games on Mystic BBS
  • A guide for using Dosemu2 to play Door Games on Mystic BBS

    Author:
    Published:

    Setting Things Up

    I am going to start this How-To quite simply, at the beginning.

    Assumptions:

    • You are running Debian 12
    • Installed a copy of Mystic BBS Alpha 48
    • Mystic is installed in the user “Home” directory, mine is named “Mystic” (“/home/mystic”)
    • We are using the Build 2.0pre9 edition of Dosemu2 compiled for Ubuntu 22

    I have chosen to install in the “home” directory to keep my directory structure clean and to make permissions more manageable. 

    This will become important later.

    Realization:

    Running Dosemu2 doesn’t require Mystic BBS (or Ubuntu) and this guide should work equally well on with Synchronet BBS.  Once you get Dosemu2 running it is simply a matter of hooking into the individual infrastructure(s).  Mystic treats doors like external programs (which they are) so you need to build a command for Dosemu2 to execute.  Synchronet is similar but, does more behind the scenes with automated menus.

    If you would like for me to build a similar article for Synchronet + Dosemu2, send me an email.

    Now, back to Mystic BBS

    Mystic is built with two parts. 

    • The first is the actual BBS handling things like logging in, menus, displaying menus, etc…
    • The second is the Mystic Internet Server and is in control of the interface and getting people connected and executing events.

    This is an important distinction because, like most gatekeepers, they only know what they know, and what they don’t know will keep you from succeeding.

    The Mystic BBS installation instructions will tell you that you need to run MIS under your root account when you want to bind to ports lower than 1000.  If you are using the Startup/Shutdown mystic-systemd files from vswitchzero it even tells you to run the service under root with the assumption that it will switch back to the file owner after it launches.

    This is not entirely accurate.

    Yes, it will bind the ports correctly AND the BBS will run under your system account however, MIS is still running under root and creates issues when trying to execute Dosemu2

    You will get errors like

    mkdir: cannot create directory ”/root” Permission denied
    ERROR: local dir ~/.dosemu does not exist
    can’t create dir /root/.dosemu: Permission denied

    This is simply telling us that the root account doesn’t know where its home directory is and when it tries to create one it cannot because, it already exists.  That is kinda stupid but, is how service accounts remain secure.

    To solve this trivial error, you need to “setcap” the MIS executable.

    sudo setcap 'cap_net_bind_service=+ep' /home/mystic/mis

    This allows the MIS executable to have root permissions while also running under the “mystic” user account.  (like Sudo)  This allows the service to bind the ports is needs and also allows Dosemu2 to be launched under the same user account giving access to the .dosemu folder in the same directory as the executable.

    Again, if you are using the mystic-systemd service files, edit the “mis.service’ file to include your mystic (non-root) user account.  The commands below will reload the service, restart the service and show you the account information for the service. 

    With luck, you will see “mystic”

    sudo systemctl daemon-reload
    sudo systemctl restart mis
    sudo systemctl show -pUser,UID,home mis