From a9d7959228bd4247d583e684d5bfbc2add48dd69 Mon Sep 17 00:00:00 2001 From: billchurch Date: Thu, 23 Mar 2017 11:23:59 -0400 Subject: [PATCH] moved terminal selection to config.json Defaulting to xterm-color for better support across *nixs --- config.json | 5 +++-- index.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config.json b/config.json index 1fed90ee..6ad5258c 100644 --- a/config.json +++ b/config.json @@ -9,7 +9,8 @@ }, "ssh": { "host": null, - "port": 22 + "port": 22, + "term": "xterm-color", }, "header": { "text": "My Header", @@ -18,4 +19,4 @@ "options": { "challengeButton": true } -} \ No newline at end of file +} diff --git a/index.js b/index.js index 809fcf61..3dde6002 100644 --- a/index.js +++ b/index.js @@ -76,7 +76,7 @@ io.on('connection', function(socket) { socket.emit('status', 'SSH CONNECTION ESTABLISHED'); socket.emit('statusBackground', 'green'); socket.emit('allowreplay', config.options.allowreplay); - conn.shell( { term: 'xterm-256color' }, function(err, stream) { + conn.shell( { term: config.ssh.term }, function(err, stream) { if (err) { console.log (err.message); myError = myError + err.message;