Whiptail or dialog don't working by ssh

烂漫一生 提交于 2019-12-02 05:15:16
leu

whiptail seems to be buggy displaying infoboxes on certain terminals (see How to display infobox in whiptail?). Maybe you can try a --msgbox instead to verify your script works

whiptail --title "I am the title" --msgbox "Hi there" 8 45
Thomas Dickey

Running whiptail --infobox in xterm can do this, which results in no visible display:

  • suppose that xterm's terminal description includes the alternate-screen switching (which most do, since that is the way xterm and ncurses define it): smcup=\E[?1049h, rmcup=\E[?1049l,
  • alternate-screen switching is enabled.
  • conventional terminal applications send smcup at the beginning
  • whiptail is conventional...
  • it displays the --infobox in the alternate screen
  • there's nothing more to do (no buttons to click), so whiptail exits
  • on the way out, it sends rmcup, switching back to the normal screen
  • the output from the --infobox is lost

This matches the behavior reported in OP's question. The Red Hat report mentioned in How to display infobox in whiptail? is describing the same problem, as well as the one in Ubuntu.

The problem was first addressed in dialog in 2003 (though there have been occasional maintenance fixes since then).

The solution used in the other questions was to use dialog (the actual program, rather than the generic "dialog" mentioned in OP's question).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!