diff --git a/terminus-terminal/src/components/shellSettingsTab.component.pug b/terminus-terminal/src/components/shellSettingsTab.component.pug index 523f8909..68c0c1b1 100644 --- a/terminus-terminal/src/components/shellSettingsTab.component.pug +++ b/terminus-terminal/src/components/shellSettingsTab.component.pug @@ -25,6 +25,9 @@ h3.mb-3 Shell (ngModelChange)='config.save()' ) +.alert.alert-info.d-flex.align-items-center(*ngIf='config.store.terminal.useConPTY && isConPTYAvailable && !isConPTYStable') + .mr-auto Windows 10 build 18309 or above is recommended for ConPTY + .alert.alert-info.d-flex.align-items-center(*ngIf='config.store.terminal.shell.startsWith("wsl") && (config.store.terminal.frontend != "hterm" || !config.store.terminal.useConPTY)') .mr-auto WSL terminal only supports TrueColor with ConPTY and the hterm frontend diff --git a/terminus-terminal/src/components/shellSettingsTab.component.ts b/terminus-terminal/src/components/shellSettingsTab.component.ts index ede4f51c..b32ba545 100644 --- a/terminus-terminal/src/components/shellSettingsTab.component.ts +++ b/terminus-terminal/src/components/shellSettingsTab.component.ts @@ -1,3 +1,4 @@ +import * as os from 'os' import { Component } from '@angular/core' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' import { Subscription } from 'rxjs' @@ -15,6 +16,7 @@ export class ShellSettingsTabComponent { profiles: Profile[] = [] Platform = Platform isConPTYAvailable: boolean + isConPTYStable: boolean private configSubscription: Subscription constructor ( @@ -31,6 +33,9 @@ export class ShellSettingsTabComponent { }) this.reload() this.isConPTYAvailable = uac.isAvailable + this.isConPTYStable = hostApp.platform === Platform.Windows + && parseFloat(os.release()) >= 10 + && parseInt(os.release().split('.')[2]) >= 18309 } async ngOnInit () { diff --git a/terminus-terminal/src/services/sessions.service.ts b/terminus-terminal/src/services/sessions.service.ts index 2ef75628..8a86ff3c 100644 --- a/terminus-terminal/src/services/sessions.service.ts +++ b/terminus-terminal/src/services/sessions.service.ts @@ -118,7 +118,7 @@ export class Session extends BaseSession { rows: options.height || 30, cwd, env: env, - experimentalUseConpty: this.config.store.terminal.useConPTY, + experimentalUseConpty: this.config.store.terminal.useConPTY && 1, }) this.guessedCWD = cwd