Whiptail 或对话框不能通过 ssh 工作 [英] Whiptail or dialog don't working by ssh
问题描述
我在虚拟机上安装了 Ubuntu 12.04 服务器并在其上安装了 OpenSSH 服务器.我有一个带有whiptail的简单脚本
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
在服务器上,这个脚本正在运行,我看到了信息框.但是在 SSH 会话中我没有输出.
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 脚本在服务器上不起作用.
Bash script using dialog doesn't working on server.
如何创建在 SSH 会话中工作的可视菜单脚本?
How i can create visual menu script working in SSH session?
推荐答案
whiptail 在某些终端上显示信息框似乎有问题(请参阅 如何在whiptail中显示信息框?).也许您可以尝试使用 --msgbox 来验证您的脚本是否有效
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
这篇关于Whiptail 或对话框不能通过 ssh 工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!