GameServerManagers / GameServerManagers/LinuxGSM

[Bug]: server status always STOPPED if connected via ssh with ghostty or kitty terminal emulators

Open
#4,861 0 comments 0 reactions 0 assignees View on GitHub
command: details distro: Ubuntu engine: lwjgl2 game: Minecraft info: alerts info: docs type: bug
Dominant language
Shell
Stars
4.9k
Forks
864
PR merge metrics
No merged PRs in 30d

Description

### User story

As a server manager, I want the details command to show when the server is running so that I am not misinformed

### Game

Minecraft

### Linux distro

Ubuntu 24.04

### Command

command: details

### Further information

When connected to a server via ssh on a new terminal emulator (such as ghossty or kitty), calls to tmux will fail with 'unsupported terminal' errors.

These errors are not surfaced by non-interactive scripts, e.g. `./mcserver details`, so they result in either silent failures or don't work at all.

`./mcserver details` on my server shows 0% CPU, 0% Memory, and STOPPED for the server status when the server is actually running. This was because the tmux commands to get this info failed.

I am able to manually resolve by running `infocmp -x xterm-kitty | ssh root@myserver -- tic -x -` **OR** by setting `TERM=xterm-256color` in my ssh config, but that shouldn't be necessary.

### Relevant log output

```shell
╭─ ~ ··································································· ✔  10:16:51 AM ─╮
╰─ echo $TERM ─╯
xterm-ghostty

╭─ ~ ··································································· ✔  10:16:55 AM ─╮
╰─ ssh root@myserver
Welcome to Ubuntu 24.04.3 LTS (GNU/Linux 6.8.0-88-generic x86_64)

* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro

System information as of Mon Dec 1 18:17:11 UTC 2025

System load: 0.37 Processes: 125
Usage of /: 5.0% of 115.20GB Users logged in: 1
Memory usage: 26% IPv4 address for eth0: REDACTED
Swap usage: 0% IPv4 address for eth0: REDACTED

Expanded Security Maintenance for Aplications is not enabled.

33 updates can be applied immediately.
To see these additional updates run: apt list --upgradable

Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status

Last login: Mon Dec 1 18:15:59 2025 from REDACTED
root@myserver:~# su - mcserver
mcserver@myserver:~$ ./mcserver details

Distro Details
==============================================================================================
Date: Mon Dec 1 18:17:30 UTC 2025
Distro: Ubuntu 24.04.3 LTS
Arch: x86_64
Kernel: 6.8.0-88-generic
Hostname: myserver
Environment: kvm
Uptime: 4d, 0h, 1m
tmux: 3.4
glibc: 2.39
Java: openjdk version "21.0.9" 2025-10-21

Server Resource
==============================================================================================
CPU
Model: DO-Premium-Intel
Cores: 2
Frequency: 1999.997MHz
Avg Load: 0.27, 0.20, 0.11

Memory
Mem: total used free cached available
Physical: 3.9GB 985MB 2.7GB 2.0GB 2.7GB
Swap: 0B 0B 0B

Storage
Filesystem: /dev/vda1
Total: 116G
Used: 5.8G
Available: 110G

Network
IP: REDACTED
Internet IP: REDACTED

Minecraft Resource Usage
==============================================================================================
CPU Used: 0%
Mem Used: 0% 0MB

Storage
Total: 3.0G
Serverfiles: 751M
Backups: 2.3G

Minecraft Server Details
==============================================================================================
Server name: REDACTED
Branch: release
Server IP: REDACTED
Internet IP: REDACTED
Query enabled: true
RCON password: REDACTED
Maxplayers: 20
Game mode: survival
Status: STOPPED
Query Check: REDACTED

mcserver Script Details
==============================================================================================
Script name: mcserver
LinuxGSM version: v25.2.0
Discord alert: on
IFTTT alert: off
Update on start: off
User: mcserver
Location: /home/mcserver
Config file: /home/mcserver/serverfiles/server.properties

Backups
==============================================================================================
No. of backups: 5
Latest backup:
date: Mon Dec 1 18:09:16 UTC 2025 (less than 1 day ago)
file: /home/mcserver/lgsm/backup/mcserver-2025-12-01-180904.tar.zst
size: 585M

Command-line Parameters
==============================================================================================
java -Xmx3072M -jar ./fabric_server.jar nogui

Ports
==============================================================================================
Change ports by editing the parameters in:
/home/mcserver/serverfiles/server.properties

Useful port diagnostic command:
ss -tuplwn | grep java

DESCRIPTION PORT PROTOCOL LISTEN
Game REDACTED tcp 1
Query REDACTED udp 1
RCON REDACTED tcp 0

Status: STOPPED

mcserver@myserver:~$ echo $TERM
xterm-ghostty

WITH xterm-256color

╭─ ~ ·························································· ✔  4m 48s  10:21:57 AM ─╮
╰─ export TERM=xterm-256color ─╯

╭─ ~ ··································································· ✔  10:22:09 AM ─╮
╰─ ssh root@myserver
Welcome to Ubuntu 24.04.3 LTS (GNU/Linux 6.8.0-88-generic x86_64)

* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro

System information as of Mon Dec 1 18:22:14 UTC 2025

System load: 0.19 Processes: 118
Usage of /: 5.0% of 115.20GB Users logged in: 1
Memory usage: 26% IPv4 address for eth0: REDACTED
Swap usage: 0% IPv4 address for eth0: REDACTED

Expanded Security Maintenance for Applications is not enabled.

33 updates can be applied immediately.
To see these additional updates run: apt list --upgradable

Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status

Last login: Mon Dec 1 18:17:12 2025 from REDACTED
root@myserver:~# su - mcserver
mcserver@myserver:~$ ./mcserver details

Distro Details
==============================================================================================
Date: Mon Dec 1 18:22:56 UTC 2025
Distro: Ubuntu 24.04.3 LTS
Arch: x86_64
Kernel: 6.8.0-88-generic
Hostname: myserver
Environment: kvm
Uptime: 4d, 0h, 6m
tmux: 3.4
glibc: 2.39
Java: openjdk version "21.0.9" 2025-10-21

Server Resource
==============================================================================================
CPU
Model: DO-Premium-Intel
Cores: 2
Frequency: 1999.997MHz
Avg Load: 0.10, 0.14, 0.10

Memory
Mem: total used free cached available
Physical: 3.9GB 995MB 2.7GB 2.0GB 2.7GB
Swap: 0B 0B 0B

Storage
Filesystem: /dev/vda1
Total: 116G
Used: 5.8G
Available: 110G

Network REDACTED
IP: REDACTED

Internet IP: REDACTED
Minecraft Resource Usage
==============================================================================================
CPU Used: 7.1%
Mem Used: 21% 823MB

Storage
Total: 3.0G
Serverfiles: 751M
Backups: 2.3G

Minecraft Server Details
==============================================================================================
Server name: REDACTED
Branch: release
Server IP: REDACTED
Internet IP: REDACTED
Query enabled: true
RCON password: REDACTED
Maxplayers: 20
Game mode: survival
Status: STARTED
Query Check: REDACTED

mcserver Script Details
==============================================================================================
Script name: mcserver
LinuxGSM version: v25.2.0
Discord alert: on
IFTTT alert: off
Update on start: off
User: mcserver
Location: /home/mcserver
Config file: /home/mcserver/serverfiles/server.properties

Backups
==============================================================================================
No. of backups: 5
Latest backup:
date: Mon Dec 1 18:09:16 UTC 2025 (less than 1 day ago)
file: /home/mcserver/lgsm/backup/mcserver-2025-12-01-180904.tar.zst
size: 585M

Command-line Parameters
==============================================================================================
java -Xmx3072M -jar ./fabric_server.jar nogui

Ports
==============================================================================================
Change ports by editing the parameters in:
/home/mcserver/serverfiles/server.properties

Useful port diagnostic command:
ss -tuplwn | grep java

DESCRIPTION PORT PROTOCOL LISTEN
Game REDACTED tcp 1
Query REDACTED udp 1
RCON REDACTED tcp 0

Status: STARTED

mcserver@myserver:~$ echo $TERM
xterm-256color
```

### Steps to reproduce

1. Run a server (e.g a Minecraft server)
2. Run `TERM=xterm-kitty ./mcserver details` and observe that the status says "STOPPED" even when the server is running
3. Run `TERM=xterm-kitty ./mcserver console` to see the tmux error

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.