====== dosemu2 for Synchronet ====== Synchronet on Linux runs DOS doors under dosemu2. The DOS version of LORD FP needs it, and so do DOS IGMs run from the Linux version. This page follows Nigel Reed's dosemu2 setup for Synchronet (original work by Eric Oulashin), with notes from running it on two BBSes. His files are a complete, working setup: config files plus a ready-made DOS boot environment. ===== What you need ===== * Synchronet BBS on Linux, installed in ''/sbbs''. This was written against Synchronet 3.21 on Ubuntu and 3.22 on Debian 13. * A shell login as the user Synchronet runs as. Door files must be owned by, or writable by, that user. * A backup of ''/sbbs'' before you change anything. If Synchronet is elsewhere, change the paths in the dosemu files too. ===== Install dosemu2 ===== ==== Ubuntu ==== sudo add-apt-repository ppa:dosemu2/ppa sudo apt update sudo apt install dosemu2 ==== Debian 13 (trixie) ==== Debian has no dosemu2 package, but the Ubuntu 24.04 (noble) PPA builds install on Debian 13. Two extra steps: Debian's signature checker rejects the PPA key as Launchpad serves it (an old SHA-1 binding), so take the key from the Ubuntu keyserver; and pin the PPA low, so it only supplies the packages Debian doesn't have. # the signing key, from the Ubuntu keyserver sudo mkdir -p /etc/apt/keyrings curl -s "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x6D9CD73B401A130336ED0A56EBE1B5DED2AD45D6" \ | sudo tee /etc/apt/keyrings/dosemu2-ppa.asc >/dev/null ''/etc/apt/sources.list.d/dosemu2-ppa-noble.sources'': Types: deb URIs: https://ppa.launchpadcontent.net/dosemu2/ppa/ubuntu/ Suites: noble Components: main Signed-By: /etc/apt/keyrings/dosemu2-ppa.asc ''/etc/apt/preferences.d/dosemu2-ppa'': # Debian packages always win; the PPA only fills in what Debian lacks Package: * Pin: origin ppa.launchpadcontent.net Pin-Priority: 100 sudo apt update sudo apt install dosemu2 ===== Copy the setup files ===== Nigel Reed's package contains these files. Put each one where the list says, then restart the BBS. ^ File ^ Goes in ^ What it is ^ | ''dosemu.conf'' | ''/sbbs/ctrl'' | dosemu2 settings for doors run by the BBS. COM1 is "virtual": it is wired to the caller. | | ''dosemu-local.conf'' | ''/sbbs/ctrl'' | Settings for the local DOS prompt (''de''). The same, without the virtual COM1, so programs draw on your screen. | | ''dosemu.ini'' | ''/sbbs/exec'' | The command line Synchronet uses to start dosemu2. A copy in a door's own directory overrides it for that door. | | ''external.bat'' | ''/sbbs/exec'' | The DOS batch file run for every DOS door: it changes to the door's directory, loads drivers and runs the door's command line. | | ''sbbs/ctrl/.dosemu'' | ''/sbbs/ctrl/.dosemu'' | A preconfigured dosemu2 boot environment (its ''drive_c'' is DOS drive C:). | | ''de'' | ''/sbbs/exec'' or ''/sbbs/bin'' | Opens a local DOS prompt with the same drives the BBS uses, for running door setup programs. Make it executable and put its directory on your PATH. | | ''scfg.txt'' | (reference) | A sample SCFG entry for a DOS door. | ===== Settings in sbbs.ini ===== In ''/sbbs/ctrl/sbbs.ini'', ''[BBS]'' section: UseDOSemu = true DOSemuPath = /usr/bin/dosemu DOSemuConfPath = /sbbs/ctrl/dosemu.conf The path is ''/usr/bin/dosemu'', the launcher script, not ''dosemu.bin''. Restart Synchronet afterwards (''sudo systemctl restart sbbs'' on a systemd install). ===== The FOSSIL driver ===== A FOSSIL driver is the standard DOS interface doors use to talk to a serial port. dosemu2 has one built in, but it only becomes active when its ''fossil.com'' is run inside DOS before the door starts; it is not loaded just because dosemu2 is running. Many doors work without it, because with no FOSSIL driver loaded they talk to the virtual COM port directly: LORD 4.06, LORD FP, TradeWars 2002, Barren Realms Elite and Esterian Conquest all work either way. Some doors only use a FOSSIL driver. The Pawn Shop 3.40 IGM is one: without the driver it shows the caller nothing. ''external.bat'' looks for a file called ''EMUSETUP.BAT'', first in the door's own directory, then in ''/sbbs/ctrl'' (drive F:). To load the FOSSIL driver for every DOS door, create ''/sbbs/ctrl/EMUSETUP.BAT'': REM Global DOS door setup, CALLed by Synchronet's external.bat before each REM DOS door (a door's own EMUSETUP.BAT in its folder is used instead). REM FOSSIL driver: dosemu2's fossil.com, for doors that need one. fossil.com >NUL * Save it with DOS line endings (CR LF). * A door with its own ''EMUSETUP.BAT'' uses that file instead of the global one. Add the ''fossil.com'' line to it too. * Load only one FOSSIL driver. The package's ''external.bat'' would also try to load X00 from a ''DOSUTILS'' directory, but only when there is no ''EMUSETUP.BAT'' and that directory exists. * Without any ''EMUSETUP.BAT'' or ''DOSUTILS'', ''external.bat'' prints "ERROR: No emusetup.bat" and carries on. That message is harmless. ===== DOS drive letters ===== When the BBS starts a DOS door, ''dosemu.ini'' maps the Synchronet directories to these drives. Door configuration files must use these DOS paths, not Linux paths. ^ Drive ^ Linux directory ^ What is there ^ | C: | ''/sbbs/ctrl/.dosemu/drive_c'' | dosemu2's own boot drive. | | D: | ''/sbbs/node1'', ''/sbbs/node2'' ... | The caller's node directory: drop files (''DOOR.SYS'', ''DORINFO1.DEF'' ...). | | E: | ''/sbbs/xtrn'' | The doors; ''/sbbs/xtrn/lordf'' is ''E:\LORDF''. | | F: | ''/sbbs/ctrl'' | The global ''EMUSETUP.BAT''. | | G: | ''/sbbs/data'' | BBS data. | | H: | ''/sbbs/exec'' | BBS programs. | dosemu2's own commands, including ''fossil.com'', are already on the DOS PATH. ===== The local DOS prompt ===== Most DOS doors have a setup program to run once on the local screen. Run ''de'' from a shell: it opens a DOS prompt with the drives above, using ''/sbbs/node1'' as D:. Then change to the door and run its setup: $ de C:\> E: E:\> CD \LORDF E:\LORDF> LORDCFG ... E:\LORDF> exitemu Run ''de'' from a real terminal. dosemu2 needs a terminal with a known size and draws nothing when started from a script or a terminal that doesn't report its size.