dgamelaunch =========== dgamelaunch is a network-based game shell where anyone can sign up for an account and start playing any game which suits your fancy - currently, though, it only supports NetHack (see http://www.nethack.org). It requires the ncurses library and development headers to build and should compile without issue on Linux and FreeBSD 4/5. Other platforms have not been tested yet. dgamelaunch was originally developed by M. Drew Streib 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 accomplish this, called dgl-create-chroot, in the source directory. The default settings are viewable by editing the script; to customize the installation, look at dgl-create-chroot.conf.example (also in the source directory) and edit it to suit your needs, and save it into the same directory as dgl-create-chroot as dgl-create-chroot.conf. Depending on what you choose to do you may need to run the script as root. If you decide to not use dgl-create-chroot, you're on your own and we assume you have enough clue to figure out exactly what's needed for the chroot to operate correctly. 2) Compile nethack. Make sure the directories in the chroot match up with where nethack thinks everything is. You may need to edit the VAR_PLAYGROUND variable in include/unixconf.h and/or the HACKDIR variable in include/config.h. (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) Edit dgamelaunch.conf. This will contain information for dgamelaunch about what uid/username, gid/group to shed privileges to at runtime. It must also contain the path to nethack, and needs to know certain aspects of your chroot. If you used dgl-create-chroot, the defaults are appropriate, except of course that you will need to install the nethack binary into the specified location. 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 setuid root. (that is, chmod 755 dgamelaunch.) It will shed privs right after entering the chroot jail 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 /etc/dgamelaunch.conf 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 /etc/dgamelaunch.conf 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. It goes without saying that the argument after -L must point to dgamelaunch's exact location. Also, the location of dgamelaunch.conf is variable and of course should be customized by you. 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.