From 45243279184b635fe1712810f3bda60c95720b56 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Tue, 23 Mar 2021 17:01:38 +0100 Subject: Reworked the adyxax.org docs articles --- content/docs/adyxax.org/nethack.md | 56 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 content/docs/adyxax.org/nethack.md (limited to 'content/docs/adyxax.org/nethack.md') diff --git a/content/docs/adyxax.org/nethack.md b/content/docs/adyxax.org/nethack.md new file mode 100644 index 0000000..095f0ca --- /dev/null +++ b/content/docs/adyxax.org/nethack.md @@ -0,0 +1,56 @@ +--- +title: "nethack" +description: nethack.adyxax.org game server +--- + +## Introduction + +I am hosting a private nethack game server accessible via ssh for anyone who will send me a ssh public key. It all runs chrooted on an OpenBSD server. + +## dgamelaunch + +TODO + +{{< highlight sh >}} +groupadd -r games +useradd -r -g games nethack +git clone +{{< /highlight >}} + +## nethack + +TODO + +{{< highlight sh >}} +{{< /highlight >}} + +## scores script + +TODO + +{{< highlight sh >}} +{{< /highlight >}} + +## copying shared libraries + +{{< highlight sh >}} +cd /opt/nethack +for i in `ls bin`; do for l in `ldd bin/$i | tail -n +1 | cut -d'>' -f2 | awk '{print $1}'`; do if [ -f $l ]; then echo $l; cp $l lib64/; fi; done; done +for l in `ldd dgamelaunch | tail -n +1 | cut -d'>' -f2 | awk '{print $1}'`; do if [ -f $l ]; then echo $l; cp $l lib64/; fi; done +for l in `ldd nethack-3.7.0-r1/games/nethack | tail -n +1 | cut -d'>' -f2 | awk '{print $1}'`; do if [ -f $l ]; then echo $l; cp $l lib64/; fi; done +{{< /highlight >}} + +## making device nodes + +TODO! For now I mount all of /dev in the chroot : +{{< highlight sh >}} +#mknod -m 666 dev/ptmx c 5 2 +mount -R /dev /opt/nethack/dev +{{< /highlight >}} + +## debugging + +{{< highlight sh >}} +gdb chroot +run --userspec=nethack:games /opt/nethack/ /dgamelaunch +{{< /highlight >}} -- cgit v1.2.3