How can I run Dwarf Fortress in text mode (ncurses) on my Linux VPS?
Solution 1:
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.
Solution 2:
Have you seen this DFTerm article on the DF Wiki? It lists some dependencies that you don't seem to have listed above....
Solution 3:
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
Solution 4:
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.