How to Play Dwarf Fortress in the Terminal

  1. Enable multi-lib for pacman: sudo vim /etc/pacman.conf
  2. Search for the following and remove the # symbols. I was missing SigLevel in my conf so if you are also missing just add it in the correct spot as shown.
            SigLevel = PackageRequired
            Include = /etc/pacman.d/mirrorlist
  3. Save and exit
  4. Run: sudo pacman -Syyu
  5. Install from your Arch mirrors: sudo pacman -S dwarffortress
  6. Add your user account to a "games" group: gpasswd -a [user] games.
    1. This gives you the config files in your home directory
    2. So you do not have to edit the defaults as root/sudo.
  7. Log out and log back into your server.
  8. Edit your Dwarf Fortress config: vim .dwarffortress/data/init/init.txt
  9. Change [SOUND:YES] to [SOUND:NO]
  10. Change [PRINT_MODE:2D] to [PRINT_MODE:TEXT]
  11. Install sudo pacman -S xorg-server-xvfb
    1. This will act as your virtual X server.
    2. Dwarf Fortress basically gets tricked into thinking you have a GUI installed.
  12. Setup the virtual X server: Xvfb :1 -screen 0 1024x768x16 &
    1. Pick whatever resolution you want
    2. Dwarf Fortress will out scale as you resize your terminal anyway.
  13. Point your display variable to the virtual X server: export DISPLAY=:1

That's it!

Now you can log in over SSH and play Dwarf Fortress in your terminal! Keep in mind you may have to export the display before each new run if you are using tmux or screen.

To run Dwarf Fortress on Arch type: dwarffortress

Happy Fort'n!