Questions tagged [dialog]

106 questions
21
votes
4 answers

whiptail or dialog

I am going to create a script which will use user input, so I decided to use whiptail. But now I'm a little bit confused about which one is portable and will work on Ubuntu 10.x and higher and CentOS 5.x and higher. I know read, but I want a tool…
Rahul Patil
  • 24,281
  • 25
  • 80
  • 96
14
votes
1 answer

How can I keep netcat connection open?

I have two files, client.sh and server.sh. All the necessary data is on the server, which is sent to the client using netcat. The client just get these data and display it to the end user. The problem is, when I try to show the dialog loading screen…
henriquehbr
  • 818
  • 2
  • 9
  • 28
5
votes
2 answers

Bash console progress dialog with command output

I have dialog installed, where I would like to have a nice progress dialog, like this: +-------[ title ]--------+ | | | +-[ console output ]-+ | | | output line11 ^ | | | output line12 | | | | output line13 |…
pihentagy
  • 448
  • 4
  • 9
5
votes
1 answer

Shell exits when I source a script with dialog/whiptail call

I have the following script: #!/bin/bash set -e TITLE="Choose version" VERSIONS=$(cat <<'END' AAA BBB END ) VERSION_LIST=$(echo "$VERSIONS" | awk '{print NR, " ", $0}') INDEX=$(whiptail \ --no-cancel \ --menu "$TITLE" 15 40 15 \ …
5
votes
1 answer

dialog or zenity?

I am working on a project. I have two options for the GUI part. Either use dialog or zenity. I never used any of these tools before. I have to learn one of them. Suggest me which one should I learn and which will be more beneficial to learn? Which…
Chankey Pathak
  • 1,833
  • 8
  • 27
  • 35
5
votes
2 answers

dialog, trap and SIGTRAP

I've seen a lot of examples using dialog tools into scripts with lines as follows: trap "rm $datafile" 0 1 2 5 15 What I don't understand is the meaning of SIGNAL 5, ok I know is SIGTRAP. But shame on me, still I don't understand its real…
sebelk
  • 4,209
  • 10
  • 35
  • 54
4
votes
1 answer

how to make my bash script look 100% like a GUI app (so user never sees terminal)

I created a bash script using kdialog (and it runs on Kubuntu 12.04). The GUI is used for every user interaction (after the first one). However, the script still has to be launched from the terminal and the terminal is still visible even though the…
MountainX
  • 17,168
  • 59
  • 155
  • 264
4
votes
2 answers

Variables in dialog radiolist

I have the following dialog radiolist, which works fine. #!/bin/bash ch1a="1" ch1b="Fri, 20/3/15" ch2a="2" ch2b="Sun, 21/6/15" ch1="\"$ch1a\" \"$ch1b\"" dialog --title "Equinoxes and Solistices" \ --radiolist "When is the Winter Solictice?" 15 60…
Theo
  • 255
  • 2
  • 3
  • 9
4
votes
1 answer

Why doesn't `dialog` display the menu (but accepts acceptance) when started through a command substitution expression?

I want to, from a bash shell script, present the user with a menu of choices to pick from. The selection should then be stored in an environment variable for further use later. If I run from the command line: dialog \ --backtitle "Make a choice"…
user
  • 28,161
  • 13
  • 75
  • 138
3
votes
2 answers

Fluxbox menu entry that prompts for some input

How do I ask 'which man file would you like to open?' in one command from the commandline, which will also open xterm at the same time. This is needed for a fluxbox menu item. For it to be a fluxbox menu item, it must fulfil this format [exec]…
boudiccas
  • 393
  • 1
  • 4
  • 12
3
votes
4 answers

How to display a (zenity/GUI) dialog to the user after a root cron task has completed

I have a simple periodic cron task that must run as root. I want to use Zenity (or similar) to display a GUI informational dialog to user 1000 (or logged in user or all users) when the cron task finishes. I'm looking for a simple, easy, quick…
MountainX
  • 17,168
  • 59
  • 155
  • 264
3
votes
1 answer

curses-based program for selection item from the list

Is there in the linux any program which can represent (via pipe or something like that) results of such commands as, for example, ls, cat, grep, ps etc, by means of curses (for example as listbox)? So by means of such program I would like to select…
3
votes
1 answer

Is it possible to pass commands as variables to a --dialog script?

Currently I have the below dialog function that I am trying to make into a reusable yes/no prompt where I will be able to call it using YesNoPrompt followed by variables it will be needing. The function looks like this: function YesNoPrompt { …
Chris
  • 31
  • 1
3
votes
2 answers

dpkg-reconfigure: what packages are supported?

dpkg-reconfigure gives a way to set options for installed packages in a "user-friendly" way (e.g. not editing files but selecting from dialogs). How can I find out what package has such options? e.g. "dpkg-reconfigure tzdata" does have it while…
chris01
  • 519
  • 1
  • 9
  • 22
3
votes
2 answers

Bash script function that changes the value of a variable

I'd like to make a function for a BASH script that changes the value of one of its arguments, that is a variable. The function that I did is: chck_rgx () { # Checks that the given name for a user/group fulfills the regex. The function's parameters…
ctafur
  • 59
  • 1
  • 3
1
2 3 4 5 6 7 8