Main Page | Report this Page
Linux Forum Index  »  Linux Miscellaneous Topics 2  »  pop up for bash scripts?...
Page 1 of 1    

pop up for bash scripts?...

Author Message
Todd...
Posted: Sun Nov 01, 2009 10:42 pm
Guest
Hi All,

Is there a pop up dialog box for use
with bash scripts? The idea is
to prompt the user for information in
a fancy way. (If not, guess I finally
have to learn Perl.)

Many thanks,
-T
 
Bit Twister...
Posted: Sun Nov 01, 2009 10:42 pm
Guest
On Sun, 01 Nov 2009 19:42:47 -0800, Todd wrote:
Quote:
Hi All,

Is there a pop up dialog box for use
with bash scripts?

Simple method,
xmessage -print -buttons abort,continue,fatal "some message here"
man xmessage for more info.

Since you mentioned dialog, surprise, surprise there is dialog.
man dialog



#!/bin/bash
DIALOG=${DIALOG=Xdialog}

DIALOG=${DIALOG=dialog}

$DIALOG --title " My first dialog" --clear \
--yesno "Hello , this is my first dialog program" 10 30

case $? in
0)
echo "Yes chosen.";;
1)
echo "No chosen.";;
255)
echo "ESC pressed.";;
esac
 
Todd...
Posted: Sun Nov 01, 2009 11:08 pm
Guest
Bit Twister wrote:
Quote:
On Sun, 01 Nov 2009 19:42:47 -0800, Todd wrote:
Is there a pop up dialog box for use
with bash scripts?

Simple method,
xmessage -print -buttons abort,continue,fatal "some message here"
man xmessage for more info.

Since you mentioned dialog, surprise, surprise there is dialog.
man dialog

#!/bin/bash
DIALOG=${DIALOG=Xdialog}

DIALOG=${DIALOG=dialog}

$DIALOG --title " My first dialog" --clear \
--yesno "Hello , this is my first dialog program" 10 30

case $? in
0)
echo "Yes chosen.";;
1)
echo "No chosen.";;
255)
echo "ESC pressed.";;
esac



Thank you! AWESOME! (You do realize you just created a monster!)
-T
 
Todd...
Posted: Sun Nov 01, 2009 11:14 pm
Guest
Bit Twister wrote:
Quote:
On Sun, 01 Nov 2009 19:42:47 -0800, Todd wrote:
Hi All,

Is there a pop up dialog box for use
with bash scripts?

Simple method,
xmessage -print -buttons abort,continue,fatal "some message here"
man xmessage for more info.

Is there something like xmessage that will accept text input
from the user?
 
Keith Keller...
Posted: Sun Nov 01, 2009 11:17 pm
Guest
On 2009-11-02, Todd <todd at (no spam) invalid.com> wrote:
Quote:

Thank you! AWESOME! (You do realize you just created a monster!)

Much of the Slackware installer is based on dialog, so the monster
already exists. :)

--keith

--
kkeller-usenet at (no spam) wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
 
Todd...
Posted: Sun Nov 01, 2009 11:35 pm
Guest
Todd wrote:
Quote:
Bit Twister wrote:
On Sun, 01 Nov 2009 19:42:47 -0800, Todd wrote:
Hi All,

Is there a pop up dialog box for use
with bash scripts?

Simple method, xmessage -print -buttons abort,continue,fatal "some
message here"
man xmessage for more info.

Is there something like xmessage that will accept text input
from the user?

Just came across "kdialog"

kdialog --inputbox "text to operator" "prefilled answer from operator"

Any better methods?

-T
 
Todd...
Posted: Mon Nov 02, 2009 12:07 am
Guest
Todd wrote:
Quote:
Todd wrote:
Bit Twister wrote:
On Sun, 01 Nov 2009 19:42:47 -0800, Todd wrote:
Hi All,

Is there a pop up dialog box for use
with bash scripts?

Simple method, xmessage -print -buttons abort,continue,fatal "some
message here"
man xmessage for more info.

Is there something like xmessage that will accept text input
from the user?

Just came across "kdialog"

kdialog --inputbox "text to operator" "prefilled answer from operator"

Any better methods?

-T

Also found "zenity":

zenity --entry --text "Add or remove user? (A/R)" --entry-text="A"
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Mon Nov 23, 2009 6:31 am