6

I use tmux, and tmuxline which uses the powerline fonts to look pretty. tmuxline working

The problem is that when I ssh into a server, the font doesn't work. tmuxline nonworking

I installed the fonts as according to these instructions.

How do I even start debugging this?

3
  • 3
    I would check that the remote server has the correct terminfo and locale set...
    – jasonwryan
    Commented Mar 9, 2015 at 21:37
  • 1
    @jasonwryan Yeah, that was it. Locale was en_US instead of en_US.UTF-8
    – mtfurlan
    Commented Mar 9, 2015 at 21:54
  • You should write that up as an answer (with a little more of the gory details, naturally)...
    – jasonwryan
    Commented Mar 9, 2015 at 23:29

2 Answers 2

7

For the benefit of those searching for a solution to this, or to a similar issue, the above answer led me onto what solved the problem for me on FreeBSD. Adding in the ssh server's sshd_config:

AcceptEnv LANG LC_CTYPE

had the effect of enabling me to see the Powerline font glyphs in a ssh+tmux session started using:

ssh user@host -t "tmux attach || tmux new -s ssh"

Interestingly, this issue only surfaced when using the ssh -t (force pseudoterminal) option, not when starting tmux after plain sshing into the server.

2
  • Currently having this issue on freebsd, turns out ssh -t fixes it, but the sshd_config entry does not. Well then, just thought that was curious, I'll go on debugging this then.
    – Jemus42
    Commented Mar 14, 2019 at 22:33
  • I had the same issue with ssh -t having $LANG empty, as opposed to normal ssh. In my case, AcceptEnv didn't help, but I could manually set $LANG in the ssh command, i.e. ssh user@host -t 'export LANG=blah; command'
    – Sparhawk
    Commented May 21, 2021 at 8:34
3

As jasonwryan suggested, it was actually a locale issue.

The client was using en_US.UTF-8, while the server was using en_US. Not entirely clear on why it matters, but whatever it works.

For slackware, to set it globally, modify /etc/profile.d/lang.sh, as specified here

To just modify it on a per user basis, just set LANG in your .bashrc or whatever.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .