I have Ubuntu 12.04 Server at virtual machine and installed OpenSSH server on it. I have simple script with whiptail
#!/bin/sh
whiptail --title "Example dialog" --infobox "TTTTTT" 8 78
On server this script is working and i seen the infobox. But in SSH session i have no output.
user@ubuntu:~$ ./script
user@ubuntu:~$ ./script
user@ubuntu:~$
Bash script using dialog doesn't working on server.
How i can create visual menu script working in SSH session?
Running
whiptail --infobox
in xterm can do this, which results in no visible display:smcup=\E[?1049h, rmcup=\E[?1049l,
smcup
at the beginning--infobox
in the alternate screenrmcup
, switching back to the normal screen--infobox
is lostThis 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).
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