comparison webtty.js @ 7:d1b3c3af34d6

WebTTY: switch terminal size to 80x25.
author John "Elwin" Edwards <elwin@sdf.org>
date Mon, 07 May 2012 16:03:10 -0700
parents bfdc775a574f
children 826a7ced69f8
comparison
equal deleted inserted replaced
6:21738794755e 7:d1b3c3af34d6
4 var path = require('path'); 4 var path = require('path');
5 var fs = require('fs'); 5 var fs = require('fs');
6 var child_process = require("child_process"); 6 var child_process = require("child_process");
7 7
8 var serveStaticRoot = "/home/elwin/hk/nodejs/rlg/s/"; 8 var serveStaticRoot = "/home/elwin/hk/nodejs/rlg/s/";
9 var ptyhelp = "/home/elwin/hk/nodejs/rlg/ptywreck/ptyhelperC"; 9 var ptyhelp = "/home/elwin/hk/nodejs/rlg/ptyhelper";
10 var sessions = {}; 10 var sessions = {};
11 11
12 var env_dontuse = {"TMUX": true, "TMUX_PANE": true}; 12 var env_dontuse = {"TMUX": true, "TMUX_PANE": true};
13 13
14 /* Constructor for TermSessions. Note that it opens the terminal and 14 /* Constructor for TermSessions. Note that it opens the terminal and
18 var childenv = {}; 18 var childenv = {};
19 for (var key in process.env) { 19 for (var key in process.env) {
20 if (!(key in env_dontuse)) 20 if (!(key in env_dontuse))
21 childenv[key] = process.env[key]; 21 childenv[key] = process.env[key];
22 } 22 }
23 childenv["PTYHELPER"] = "25x80";
23 // Should setsid get set? 24 // Should setsid get set?
24 var spawnopts = {"env": childenv, "cwd": process.env["HOME"]}; 25 var spawnopts = {"env": childenv, "cwd": process.env["HOME"]};
25 this.child = child_process.spawn(ptyhelp, ["bash"], spawnopts); 26 this.child = child_process.spawn(ptyhelp, ["bash"], spawnopts);
26 var ss = this; 27 var ss = this;
27 /* Eventually we'll need to make sure the sessid isn't in use yet. */ 28 /* Eventually we'll need to make sure the sessid isn't in use yet. */