whiptail

How to display command output in a whiptail textbox

こ雲淡風輕ζ 提交于 2020-02-04 01:31:29
问题 The whiptail command has an option --textbox that has the following description: --textbox <file> <height> <width> The first option requires a file as input; I would like to use the output of a command in its place. It seems like this should be possible in sh or bash. For the sake of the question, let's say I'd like to view the output of ls -l in a whiptail textbox. Note that process substitution does not appear to work in whiptail (e.g. whiptail --textbox <(ls -l) 40 80 does not work. This

Error with Linux whiptail/dialog arguments from bash variable

孤街浪徒 提交于 2019-12-12 11:46:10
问题 could someone explain why the code below doesn't work? I'm going crazy trying to find out. #!/bin/bash TEST="M1 \"1-wire Interface\" ON" echo $TEST RESULT=$(dialog --title "Config Modules State" --checklist "Choose modules to activate" 20 50 1 $TEST) It prints this at the output, as expected: M1 "1-wire Interface" ON 'dialog' gives an error saying: Error: Expected 3 arguments, found only 1. 'whiptail' doesn't give any error but just exits listing out its options. If I were to take the string

Whiptail or dialog don't working by ssh

∥☆過路亽.° 提交于 2019-12-02 07:56:07
问题 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? 回答1: whiptail seems to be buggy displaying

Whiptail or dialog don't working by ssh

烂漫一生 提交于 2019-12-02 05:15:16
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? leu whiptail seems to be buggy displaying infoboxes on certain terminals (see How to display infobox in whiptail? ). Maybe you can try a --msgbox