view README.txt @ 199:34e1bc4fd6b2

Some fixes to the documentation.
author John "Elwin" Edwards
date Mon, 01 Feb 2016 21:20:12 -0500
parents 5041ec1fb426
children 2667aaad8e08
line wrap: on
line source

                        =====   RLGWebD   =====

RLGWebD is a node.js app that enables playing roguelike games in the 
browser.  It is intended to be compatible with dgamelaunch.

RLGWebD currently works with Node v0.10.

It requires the 'posix', 'pty.js', and 'websocket' modules.  Currently,
it expects them to be installed in the global location, which is 
"/usr/lib/node_modules".  It is planned to eventually use a different
location so that npm will not need to run as root.

RLGWebD now includes a systemd unit file, which is the recommended way
to run it.  See below for more instructions.

For other init systems, a shell script is provided.  This is not really
a proper initscript, but it could form the basis of one.

You can set some options by changing some variables in the first few
lines of the rlgwebd script:

Option		Variable	Default

Chroot path	chrootDir	/var/dgl
Username	dropToUser	rodney
Server port	httpPort	8080

If you change the chroot location, change it in the first line of the 
Makefile too.

RLGWebD expects to be run in a chroot used by dgamelaunch, and it makes 
some assumptions about the configuration.  It expects the dgamelaunch 
playground to be at /dgldir inside the chroot.  It expects the 
in-progress files to be in /dgldir/inprogress/<gamename>.  RLGWebD 
creates in-progress files in those locations, and dgamelaunch must be 
patched to prevent it from deleting them.

It needs the devpts filesystem mounted inside the chroot.  This can be 
done with a line in /etc/fstab like the following:
	devpts	CHROOT/dev/pts	devpts	newinstance,ptmxmode=666 0 0

RLGWebD uses two separate programs written in C.  sqlickrypt operates
on the dgamelaunch user database.  dglwatcher monitors the inprogress
directories.  Run "make" to build both of them.

sqlickrypt needs /dev/urandom to exist in the chroot.  Run as root:
	mknod CHROOT/dev/urandom c 1 9

Running "make install" will:
  Copy the Web assets into the chroot
  Copy the C programs and the libraries they need into the chroot
  Install the main RLGWebD script in /usr/local/bin
  Place the systemd unit file in the proper directory

If you don't use systemd, or want to change the installation locations,
you will have to edit the Makefile.

You will still need to run "systemctl enable rlgwebd" to make the 
server start on boot, and "systemctl start rlgwebd" to make it start

Starting and stopping RLGWebD
If you are using systemd, "systemctl start" and "systemctl stop" should
work as with any other service.

If you are using the initscript, running it with no arguments will 
start RLGWebD.  Stop by running it with 'stop' as an argument.  (This 
requires socat to be installed.)

"webtty" is a Node app which uses the terminal emulator to run a shell.  It
includes NO SECURITY WHATSOEVER and should only be used for testing the 
terminal emulator.  Copy index-sh.html to index.html before running it.

Copyright status
All files in this project are in the public domain.