1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-02-12 11:01:52 +00:00

fix default linuxshell for mobile ui #6275

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458 2024-07-24 10:15:43 +01:00
parent 1cfe0e2c31
commit 10b57dcf9e
3 changed files with 3 additions and 4 deletions

View file

@ -2128,7 +2128,7 @@
"login" "login"
], ],
"default": "any", "default": "any",
"description": "Indicate what terminal options are available when the user clicks the right mouse button on the terminal connect button." "description": "Indicates the default linux terminal thats used when the user clicks the terminal connect button and disables the right mouse button on the terminal connect button when this is set."
}, },
"launchCommand": { "launchCommand": {
"type": "object", "type": "object",

View file

@ -5409,6 +5409,7 @@
if (termoptions.protocol == 1) { termoptions.protocol = 6; } // Switch to Powershell if (termoptions.protocol == 1) { termoptions.protocol = 6; } // Switch to Powershell
} }
} }
*/
// If the server requires a shell type // If the server requires a shell type
if ((serverinfo.linuxshell) != null && (currentNode.agent.id > 4)) { if ((serverinfo.linuxshell) != null && (currentNode.agent.id > 4)) {
@ -5416,7 +5417,6 @@
if (serverinfo.linuxshell == 'user') { termoptions.protocol = 8; delete termoptions.requireLogin; } if (serverinfo.linuxshell == 'user') { termoptions.protocol = 8; delete termoptions.requireLogin; }
if (serverinfo.linuxshell == 'login') { termoptions.protocol = 1; termoptions.requireLogin = true; } if (serverinfo.linuxshell == 'login') { termoptions.protocol = 1; termoptions.requireLogin = true; }
} }
*/
// Setup a mesh agent xterm terminal // Setup a mesh agent xterm terminal
QV('termarea3xdiv', true); QV('termarea3xdiv', true);

View file

@ -1783,14 +1783,13 @@
if (termoptions.protocol == 1) { termoptions.protocol = 6; } // Switch to Powershell if (termoptions.protocol == 1) { termoptions.protocol = 6; } // Switch to Powershell
} }
} }
*/
// If the server requires a shell type // If the server requires a shell type
if ((serverinfo.linuxshell) != null && (currentNode.agent.id > 4)) { if ((serverinfo.linuxshell) != null && (currentNode.agent.id > 4)) {
if (serverinfo.linuxshell == 'root') { termoptions.protocol = 1; delete termoptions.requireLogin; } if (serverinfo.linuxshell == 'root') { termoptions.protocol = 1; delete termoptions.requireLogin; }
if (serverinfo.linuxshell == 'user') { termoptions.protocol = 8; delete termoptions.requireLogin; } if (serverinfo.linuxshell == 'user') { termoptions.protocol = 8; delete termoptions.requireLogin; }
if (serverinfo.linuxshell == 'login') { termoptions.protocol = 1; termoptions.requireLogin = true; } if (serverinfo.linuxshell == 'login') { termoptions.protocol = 1; termoptions.requireLogin = true; }
} }
*/
// Setup a mesh agent xterm terminal // Setup a mesh agent xterm terminal
QV('termarea3xdiv', true); QV('termarea3xdiv', true);