omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

The "top" command does not display output when executed through SSH on Ghostty

Open strasse86 opened this issue 2 months ago • 2 comments

System details

Omarchy v3.2.0

What's wrong?

I had the issue where top would return without output when executed through SSH. After searching a bit, I found some solutions here:

https://ghostty.org/docs/help/terminfo https://github.com/ghostty-org/ghostty/discussions/8984

Executingexport TERM=xterm-256coloron the remote machine would resolve it. Alternatively locally:

# .ssh/config
Host example.com
  SetEnv TERM=xterm-256color

or in order to automate this ( taken from the link above) :

shell-integration-features = ssh-terminfo to copy the terminfo entry the first time you log into a new server over SSH.
shell-integration-features = ssh-env to configure SSH to fall back to xterm-256color.

If both features are enabled (shell-integration-features = ssh-terminfo,ssh-env), Ghostty will try to install the terminfo entry first and use the fallback if installation failed.

strasse86 avatar Nov 22 '25 09:11 strasse86

Recommendation for the best default, @mitchellh?

dhh avatar Nov 22 '25 10:11 dhh

+1 on this. top fails silently (no output) for me too, while commands like clear throw the unknown terminal type error.

I'm currently using this workaround in ~/.config/ghostty/config: term = xterm-256color

odnmalau avatar Nov 26 '25 03:11 odnmalau