Forum:How do I run the graphical interface for NetHack4 on linux?

From NetHackWiki
Jump to: navigation, search


Title is self explanatory, new to nethack.--Crimson2877 (talk) 04:49, 15 November 2014 (UTC)

Much depends on your distribution. For Debian and its derivatives (Ubuntu, Mint, Knoppix and many others), you need the nethack-x11 package. Then set OPTIONS=windowtype:X11 in your ~/.nethackrc.
See also the X11 article.
There is also a Qt interface, but Debian no longer supports it, because Debian no longer includes Qt version 3.--Ray Chason (talk) 23:53, 16 November 2014 (UTC)
I think you're confusing the vanilla NetHack (3.4.3, etc.) with NetHack 4 there. (And the graphical interfaces for vanilla NetHack on Linux suck; the Windows one is much better). Ais523 (talk)

Here's how you build NetHack 4 on Linux:

  • Install the relevant development tools and dependencies. On Debian derivatives (Ubuntu, Linux Mint, etc.), you can do this with the command sudo apt-get install build-essential bison flex libz-dev libsdl2-dev libpng-dev. Other distributions will have a similar command, but the details will be different.
  • Download the NetHack 4 source. This link will give you the latest development version, which might or might not be broken in various ways. (Once we iron out all the bugs, I'll have a binary package available for download, so that these steps will be unnecessary.)
  • Extract the archive to a new directory (from the command line, this is tar xvf path-to-file.tar.gz`; you can also typically do it using an "Extract All" command or the like via the GUI).
  • In the command line, switch to that directory (<code>cd path/to/directory) then type: mkdir build; cd build; ../aimake -i ~/nethack4 ..
  • After about 10 minutes processing, the build process should install NetHack 4 in the nethack4 subdirectory of your home directory. The graphical version is called nethack4-sdl.

Once I've got the latest round of bugs ironed out, there'll be a link you can click on and have all this done automatically, but for the time being, you'll have to do it the long way round. Ais523 (talk)