Mercurial > hg > rlgwebd
annotate README.txt @ 197:5041ec1fb426
Update the documentation.
author | John "Elwin" Edwards |
---|---|
date | Thu, 14 Jan 2016 21:31:23 -0500 |
parents | b5df69715001 |
children | 34e1bc4fd6b2 |
rev | line source |
---|---|
146
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
1 ===== RLGWebD ===== |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
2 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
3 RLGWebD is a node.js app that enables playing roguelike games in the |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
4 browser. It is intended to be compatible with dgamelaunch. |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
5 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
6 Node |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
7 --- |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
8 RLGWebD currently works with Node v0.10. |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
9 |
197 | 10 It requires the 'posix', 'pty.js', and 'websocket' modules. Currently, |
11 it expects them to be installed in the global location, which is | |
12 "/usr/lib/node_modules". It is planned to eventually use a different | |
13 location so that npm will not need to run as root. | |
14 | |
15 init | |
16 --- | |
17 RLGWebD now includes a systemd unit file, which is the recommended way | |
18 to run it. See below for more instructions. | |
19 | |
20 For other init systems, a shell script is provided. This is not really | |
21 a proper initscript, but it could form the basis of one. | |
22 | |
23 Configuration | |
24 --- | |
25 You can change the location of the chroot, the name of the dgamelaunch | |
26 user, and the port number by editing the first few lines of the rlgwebd | |
27 script. If you change the chroot location, change it in the Makefile | |
28 too. | |
146
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
29 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
30 Installation |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
31 --- |
151 | 32 RLGWebD expects to be run in a chroot used by dgamelaunch, and it makes |
146
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
33 some assumptions about the configuration. It expects the dgamelaunch |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
34 playground to be at /dgldir inside the chroot. It expects the |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
35 in-progress files to be in /dgldir/inprogress/<gamename>. RLGWebD |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
36 creates in-progress files in those locations, and dgamelaunch must be |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
37 patched to prevent it from deleting them. |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
38 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
39 It needs the devpts filesystem mounted inside the chroot. This can be |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
40 done with a line in /etc/fstab like the following: |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
41 devpts CHROOT/dev/pts devpts newinstance,ptmxmode=666 0 0 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
42 |
197 | 43 RLGWebD uses two separate programs written in C. sqlickrypt operates |
44 on the dgamelaunch user database. dglwatcher monitors the inprogress | |
45 directories. Run "make" to build both of them. | |
146
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
46 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
47 sqlickrypt needs /dev/urandom to exist in the chroot. Run as root: |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
48 mknod CHROOT/dev/urandom c 1 9 |
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
49 |
197 | 50 Running "make install" will: |
51 Copy the Web assets into the chroot | |
52 Copy the C programs and the libraries they need into the chroot | |
53 Install the main RLGWebD script in /usr/local/bin | |
54 Place the systemd unit file in the proper directory | |
178 | 55 |
197 | 56 If you don't use systemd, or want to change the installation locations, |
57 you will have to edit the Makefile. | |
58 | |
59 You will still need to run "systemctl enable rlgwebd" to make the | |
60 server start on boot, and "systemctl start rlgwebd" to make it start | |
61 immediately. | |
178 | 62 |
63 Starting and stopping RLGWebD | |
146
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
64 --- |
197 | 65 If you are using systemd, "systemctl start" and "systemctl stop" should |
66 work as with any other service. | |
146
5baa2d4d798b
Add a README though it's still incomplete.
John "Elwin" Edwards
parents:
diff
changeset
|
67 |
197 | 68 If you are using the initscript, running it with no arguments will |
69 start RLGWebD. Stop by running it with 'stop' as an argument. (This | |
70 requires socat to be installed.) | |
151 | 71 |
72 webtty | |
73 --- | |
74 webtty.js is a Node app which uses the terminal emulator to run a shell. It | |
75 includes NO SECURITY WHATSOEVER and should only be used for testing the | |
76 terminal emulator. Copy index-sh.html to index.html before running it. |