aboutsummaryrefslogtreecommitdiff
path: root/content/docs/adyxax.org/nethack.md
blob: 777ed408c318fdd9794dc33418a513542ff0e5a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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

```sh
groupadd -r games
useradd -r -g games nethack
git clone 
```

## nethack

TODO

```sh
```

## scores script

TODO

```sh
```

## copying shared libraries

```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
```

## making device nodes

TODO! For now I mount all of /dev in the chroot :
```sh
#mknod -m 666 dev/ptmx c 5 2
mount -R /dev /opt/nethack/dev
```

## debugging

```sh
gdb chroot
run --userspec=nethack:games /opt/nethack/ /dgamelaunch
```