2

I am trying to use the st terminal, but after starting tmux (or screen) in a remote ssh session, the text becomes all garbled. Exiting tmux/screen makes text normal again.

Now, I have found that this is due to the alternate character set becoming active, and echoing ^N fixes things. In the shell.

Inside tmux, though, apparently the alternate character set remains active.

Since tmux uses a pseudo-terminal for itself, I tried echoing ^N to this particular device, hoping this would reset the character set for tmux too, but it didn't work.

Any idea how to reset the character set for tmux itself?

  • Does the problem go away if you do the following? 1) Suspend/detach, 2) Run printf '\017';tput rmacs in the shell running directly under st, 3) Resume/attach — BTW, you probably want to use ^O (C-o) to get back to the normal character set (in VT-100-like terminals ^N starts the alternate set). – Chris Johnsen Nov 29 '13 at 4:36
  • Executing the above sequence didn't change anything. You are correct that ^N starts (shifts in to) and ^O ends (shifts out of) the alternate character set, but I meant ^N when I said it in the question. It is precisely ^N that brings things back to normal. I don't know why. – user18469 Nov 29 '13 at 17:11
  • Just found out that once the problem has occurred remotely, even locally started tmux gives the same behavior. Before triggering the issue remotely, local tmux is just fine. – user18469 Nov 30 '13 at 6:09
1

Turned out to be a terminfo issue.

I was trying to fool tmux into believing that TERM=screen-256color, because there were no st terminfo entries on the remote machines I use.

Copying the st-256color terminfo to the remote machine did it.

Not convenient when you need to access various remote hosts, but hopefully st will become more popular and distributions will have its terminfos by default.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy