RLGWebD
Find a file
2015-01-11 07:41:36 -05:00
about.html Update documentation and bump the version number. 2015-01-11 07:39:59 -05:00
bell.svg Put this project under version control, finally. 2012-05-06 08:45:40 -07:00
dglwatcher.c Rename watcher to dglwatcher. 2015-01-07 13:49:37 -05:00
index-rlg.html Update documentation and bump the version number. 2015-01-11 07:39:59 -05:00
index-sh.html Use SVG for the bell icon instead of PNG. 2013-10-31 20:44:35 -07:00
options.html Options-related UI improvements. 2012-09-12 16:03:09 -07:00
options.js Options-related UI improvements. 2012-09-12 16:03:09 -07:00
README.txt Mostly finish README.txt. 2014-03-09 16:15:42 -07:00
rlgterm.js RLGWebD: overhaul the list of current games. 2015-01-04 16:55:57 -05:00
rlgwebd RLGWebD: use NODE_PATH to find modules. 2013-08-14 08:04:36 -07:00
rlgwebd.js RLGWebD: fix simultaneous watcher bugs. 2015-01-10 18:54:55 -05:00
shterm.js WebTTY: remove polling. 2014-01-27 16:02:27 -08:00
sqlickrypt.c Increase max username length to 20. 2014-03-30 20:42:48 -07:00
style-rlg.css Options-related UI improvements. 2012-09-12 16:03:09 -07:00
termemu-keys.js Improve the probability of detecting numpad 5. 2012-08-12 08:22:55 -07:00
termemu.js termemu.js: implement cursor hiding. 2014-01-26 19:56:02 -08:00
tty.css Improvements to the keyboard. 2012-06-23 17:11:51 -07:00
webtty.js WebTTY: remove polling. 2014-01-27 16:02:27 -08:00

                        =====   RLGWebD   =====

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

Node
---
RLGWebD currently works with Node v0.10.

It requires the 'posix', 'pty.js', and 'websocket' modules.

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

It creates a socket in the filesystem which is used to control the 
server.

The following files need to be copied into CHROOT/var/www:
  about.html
  bell.svg
  options.html
  options.js
  rlgterm.js
  style-rlg.css
  termemu.js
  termemu-keys.js
  tty.css
Copy index-rlg.html to CHROOT/var/www/index.html.

sqlickrypt
---
RLGWebD uses a separate program written in C to operate on the 
dgamelaunch user database.  Compile this with:
	cc -o sqlickrypt sqlickrypt.c -lcrypt -lsqlite3

The binary should be placed in /bin inside the chroot.  It requires 
libcrypt and libsqlite3 to be installed in the chroot.  Depending on 
your system, these may have other dependencies.  Make sure to check by 
running ldd.

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

Starting and stopping
---
Run the 'rlgwebd' shell script as root.

Stop by passing 'stop' as an argument.  (This requires socat to be 
installed.)

webtty
---
webtty.js 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.