From fca9b86d62b11c15cc82d581f40716bfa826abd5 Mon Sep 17 00:00:00 2001 From: TotallyNotElite <1yourexperiment@protonmail.com> Date: Wed, 5 Feb 2020 20:45:42 +0100 Subject: [PATCH] Fix issues with linux/macos terminal --- agents/meshcore.js | 2 +- public/scripts/amt-terminal-0.0.2.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/agents/meshcore.js b/agents/meshcore.js index 84807037..40508924 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -1240,7 +1240,7 @@ function createMeshCore(agent) { var sh = fs.existsSync('/bin/sh') ? '/bin/sh' : false; var login = process.platform == 'linux' ? '/bin/login' : '/usr/bin/login'; - var env = { HISTCONTROL: 'ignoreboth', TERM: 'xterm' }; + var env = { HISTCONTROL: 'ignoreboth' }; if (this.httprequest.xoptions) { if (this.httprequest.xoptions.rows) { env.LINES = ('' + this.httprequest.xoptions.rows); } diff --git a/public/scripts/amt-terminal-0.0.2.js b/public/scripts/amt-terminal-0.0.2.js index eabce6e5..890133d7 100644 --- a/public/scripts/amt-terminal-0.0.2.js +++ b/public/scripts/amt-terminal-0.0.2.js @@ -73,7 +73,7 @@ var CreateAmtRemoteTerminal = function (divid, options) { } obj.xxStateChange = function (newstate) { - //if ((newstate == 3) && (options != null) && (options.xterm == true)) { obj.TermSendKeys(' stty rows ' + obj.height + ' cols ' + obj.width + '\n clear\n'); } + if ((newstate == 3) && (options != null) && (options.xterm == true)) { obj.TermSendKeys(' stty rows ' + obj.height + ' cols ' + obj.width + ';clear\n'); } } obj.ProcessData = function (str) {