Ncurses prompts look broken in PuTTY from Windows

16,297

Solution 1

Configure putty to read utf8. putty -> config -> window -> translation choose utf in "Recieved data in ..." This is not a byobu issue, it is a putty issue.

See also:

Solution 2

Related to Putty, I added this note to the byobu(1) manpage a while back:

> PuTTY  users have reported that the
> F2, F3, and F4 shortcut keys are not
> working properly.  PuTTY sends the
> same escape sequences as the linux
> console for F1-F4 by default.  You can
> fix this problem in the PuTTY config,
> Terminal -> Keyboard -> Function keys:
> Xterm R6.

See:

Solution 3

Ubuntu uses UTF-8 for its terminal, but byobu appears to use the "ISO-8859-1 (Western European)" charset for it menus. You can set the charset in Window -> Translation.

I've found the following code on the Internet, and I'm still happy with it. byobu might have more options, but I like this as well (~/.screenrc):

startup_message off
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]%{w} %l'
shelltitle "$ |bash"
termcapinfo xterm ti@:te@
altscreen on

Note: for byobu, shelltitle "$ |bash" must be removed / commented, otherwise byobu won't work.

Share:
16,297

Related videos on Youtube

youri
Author by

youri

Updated on September 17, 2022

Comments

  • youri
    youri over 1 year

    Byobu looks very broken in PuTTY. I've already fixed the key mapping issue, but this issue isn't specified in the man page or even Google:

    Broken PuTTY Console

    Notice the misplaced position of the list of windows, the broken selector position, the duplication of the last window, the random a in the top right, and the misplaced apply option. You can't see this, but the last option is not selectable.

    Is there some option in PuTTY I need to use in order to see this correctly?

    • Admin
      Admin over 13 years
      If someone wants to create the putty tag, that would be nice
    • Admin
      Admin over 13 years
      I don't have Windows anymore, so I can't test, but I would look into the charset settings of PuTTY.
    • Admin
      Admin over 13 years
      Screen is great - you just need to have a decent .screenrc
  • youri
    youri over 13 years
    Putty seems to default to ISO-8859-1:1998 (Latin-1, West Europe), so thats not the issue. Switching to UTF-8 made the terminal extremely slow but fixed the menu. What is that code supposed to do though? Didn't change anything in byobu
  • Lekensteyn
    Lekensteyn over 13 years
    By default, screen provides you just a shell with multiple (invisible) tabs. With that code, you can have a fancy shell, with on the bottom a (colored) bar like [ computername ][ 0$ bash 1-$ bash (2*$bash) ][2010-12-11 16:24 ] 1.30 1.40 1.43.
  • youri
    youri over 13 years
    I've already done that to make Byobu at least usable.
  • youri
    youri over 13 years
    Just to confirm what I said above for anyone else who comes along: I meant that the screenshot above is with putty in Xterm R6 mode. So this isn't a fix for this problem.
  • Dustin Kirkland
    Dustin Kirkland about 12 years
    Agreed. Note that this is specified in the byobu.1 manpage.