TerminalShell: better support for environment running with su

This commit is contained in:
李通洲
2023-11-01 08:55:00 +08:00
parent a2f576f3e5
commit 761c649817
2 changed files with 20 additions and 0 deletions
@@ -139,6 +139,7 @@ static void getTerminalShell(FFTerminalShellResult* result, pid_t pid)
strcasecmp(name, "sshd") == 0 ||
strcasecmp(name, "gdb") == 0 ||
strcasecmp(name, "lldb") == 0 ||
strcasecmp(name, "login") == 0 ||
strcasecmp(name, "guake-wrapped") == 0 ||
strcasestr(name, "debug") != NULL ||
strcasestr(name, "command-not-found") != NULL ||
@@ -251,6 +252,9 @@ static void getTerminalFromEnv(FFTerminalShellResult* result)
if(!ffStrSet(term))
term = getenv("TERM_PROGRAM");
if(!ffStrSet(term))
term = getenv("LC_TERMINAL");
//Normal Terminal
if(!ffStrSet(term))
term = getenv("TERM");