server: custom terminal type support

This commit is contained in:
Shuanglei Tao
2018-09-01 21:02:43 +08:00
parent 60a9bf1ab6
commit aac89aa617
6 changed files with 19 additions and 3 deletions

View File

@@ -171,7 +171,7 @@ thread_run_command(void *args) {
lwsl_err("forkpty, error: %d (%s)\n", errno, strerror(errno));
break;
case 0: /* child */
if (setenv("TERM", "xterm-256color", true) < 0) {
if (setenv("TERM", server->terminal_type, true) < 0) {
perror("setenv");
pthread_exit((void *) 1);
}