From df7adc2237b895b05b49741a5bc7672c6f8c9eae Mon Sep 17 00:00:00 2001 From: dcorral Date: Thu, 6 Nov 2025 21:45:36 +0100 Subject: [PATCH] Add xterm --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 1c4625b..d4a2922 100644 --- a/main.go +++ b/main.go @@ -95,7 +95,7 @@ func handleConn(conn net.Conn, config *ssh.ServerConfig) { func handleChannel(channel ssh.Channel, requests <-chan *ssh.Request) { defer channel.Close() var ptmx *os.File - var termWidth, termHeight uint32 = 15, 15 + var termWidth, termHeight uint32 = 80, 24 for req := range requests { switch req.Type { case "pty-req": @@ -130,7 +130,7 @@ func handleChannel(channel ssh.Channel, requests <-chan *ssh.Request) { command = "/app/tui" } cmd := exec.Command(command) - cmd.Env = []string{"PATH=/bin"} + cmd.Env = []string{"PATH=/bin", "TERM=xterm"} cmd.Dir = "/" var err error ptmx, err = pty.Start(cmd)