I installed Dwarf Fortress on my Linux VPS to use with dfterm. It's running Ubuntu 10.04 Server x86-32. I'm fairly certain I have all the dependencies:

I've installed:

  • ncurses
  • ncursesw
  • libsdl
  • libsdl-image
  • libgtk
  • libglu
  • libopenal1

I had to turn sound off or it will instantly segfault, and I set the display mode to text. I've made no other changes to the config.

However, even before I go near dfterm, it won't run properly. It just displays a blank screen. What could be causing this? Is there a dependency I missed? Is there something else I should have changed in the config?

Given that it is a server, there is a good chance that if there is a missing dependency, it's something that the devs went "Sure, everyone has that" and didn't bother to list.

Other ncurses applications (vim, irssi use it, I think?) work fine.

  • I originally asked this on gaming, but people there suggested to ask here: gaming.stackexchange.com/questions/4716/…
    – Macha
    Aug 7 '10 at 22:27
  • Huh, what an interesting idea. Can you tell if the game is trying to do anything? Run 'top' from another terminal and see if it's using any CPU. Aug 8 '10 at 2:54

I was able to recreate the segfaulting by running df on a regular Ubuntu install with X turned off.

(Dwarf_Fortress:5346): Gdk-CRITICAL **: gdk_window_new: assertion `GDK_IS_WINDOW (parent)' failed
Segmentation fault

I suspect the problem is that this game expects to have a functioning GL driver available. And for that you need X running. But a VPS doesn't have X!

Instead, use Xvfb, which is a "fake" virtual X. You'll need to install xvfb and whatever dependencies it wants (probably xorg-server-core and a bunch of other stuff that may not be installed on Ubuntu Server).

Start the fake xserver up like this:

 $ Xvfb :1 -screen 0 1024x768x16 &

Then make sure your DISPLAY variable is pointed to it:

$ export DISPLAY=:1
$ ./df

I also needed to disable sound and run in TEXT mode, but it worked this way, with no X running. I hope it works for you.

  • The segfault is gone, but when I run it, I get "Fallback: Opened libncurses, output may be broken. Symbol not found: waddnwstr.", and gives no more output, which can be exited with Ctrl-X but totally messes up the ssh session. (makes the width 80+the prompt rather than 80 inc. the prompt). This is the closest answer I got, so I'm giving you the bounty anyway, before it expires, but I hope that this new problem can also be solved also.
    – Macha
    Aug 20 '10 at 17:45
  • Right, I was missing a symlink there. Fixed that. Now all I get is grey output (not the black of my terminal, but a different grey colour).
    – Macha
    Aug 20 '10 at 18:07
  • I got that symbol not found error, and installing lib32ncursesw5-dev and lib32ncursesw5 (I'm on 64-bit) solved it.
    – Bryce
    Aug 21 '10 at 23:21
  • I am using 32 bit. I had to create a symlink for /usr/lib/libncursesw.so -> /lib/libncursesw.so.5 for the symbol not found error.
    – Macha
    Aug 24 '10 at 16:16

Have you seen this DFTerm article on the DF Wiki? It lists some dependencies that you don't seem to have listed above....

  • Those dependencies are to compile dfterm, which I have done. It is Dwarf Fortress that won't run.
    – Macha
    Aug 20 '10 at 17:26

You could try to use ldd to see if there is a shared object missing.

For example, something like:

ldd /usr/local/bin/df

Everything that ldd lists as "not found" is missing.

You should also try to look at all the *.so files (with ldd) if any in the game folder. You can find the *.so files by using this command: find . -iname '*.so' -type f

  • It's Dwarf Fortress itself, not dfterm, that won't run.
    – Macha
    Aug 8 '10 at 20:26
  • Then use ldd on that executable, I don't know the program so I don't know the name of it. I don't even know if it is in the /usr/local/bin folder... Aug 8 '10 at 22:09
  • ldd gives: "Not a dynamic executable."
    – Macha
    Aug 10 '10 at 19:23
  • Oh, there's two, one just runs the other. How will I tell what's a missing shared object?
    – Macha
    Aug 10 '10 at 19:38
  • everything that ldd lists as "not found" is missing ;) Aug 10 '10 at 19:46

You need to edit your init.txt. Look for a setting for [PRINT_MODE:2D] and change it to [PRINT_MODE:TEXT]

You probably want to change to [SOUND:NO] as well.

You'll only run at 80x24 unless you run inside of screen or tmux though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.