dgamelaunch attempts to be lean and at least somewhat portable though development is rather Linux-specific. It will most likely compile on a modern Linux distro and you won't need any esoteric headers or libraries.
The most important thing to be away of are the defines in dgamelaunch.h, they are pretty much self-explanatory. Realize however, these are all in their own chroot jail.
dgamelaunch was originally developed by M. Drew Streib <dtype@dtype.org> but is now a collaborative project. Copyright and contact information is in the COPYING file, included with this package.
Mailing list: http://alt.org/mailman/listinfo/nethack/
BASIC SETUP INSTRUCTIONS
========================
1) Setup a chroot jail. There is a helpful script included to this but it will require modification if you change the defines in dgamelaunch.h
dgamelaunch]$ ./dgl-create-chroot
You will probably want to run this as root as it writes to generally non-world-writable places.
2) Compile nethack. Make sure that it knows where the playground will be, this can be automated through dgl-create-chroot. If you don't understand this, the defaults will probably do. A static compile of nethack is recommended unless you want to copy all the libraries into the jail.
(Note: Try not to, for security, to put anything else in the chroot. You may need to put gzip in there though if you compile nethack to use it for compression.)
3) Before you continue double check that the user id's in dgamelaunch.h's defines are the owners of the chroot directory and all it's files. This is required for all files except executables (which can be only by anyone as long as they are executable.)
4) Setup dgamelaunch as one of the following:
a) The shell for a single login.
b) An (x)inetd service.
If you choose a login shell make sure dgamelaunch is set-uid root. It will shed privs right after chroot though.
Example xinetd lines:
service telnet
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/in.telnetd
server_args = -h -L /opt/nethack/nethack.dtype.org/dgamelaunch
rlimit_cpu = 3600
bind = 64.71.163.206
}
A classic inetd line would look like this:
telnet stream tcp nowait root.root /usr/sbin/tcpd /usr/sbin/in.telnetd -h -L /usr/sbin/dgamelaunch
In both cases, the -L specifies an alternate login program (telnetlogin is
invoked by default) and -h prevents revealing of a login banner (for example,
"Debian GNU/Linux testing/unstable influx") before starting the login shell.
5) Test your compilation of dgamelaunch by running it as root. If this works, a shell login or (x)inetd will work with the correct configuration. If you have problems with dgamelaunch's display make sure that your chroot's /etc/terminfo directory is populated.