LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Basic GUI (non-x) needed to run bash scripts (https://www.linuxquestions.org/questions/programming-9/basic-gui-non-x-needed-to-run-bash-scripts-526527/)

AP81 02-07-2007 05:09 PM

Basic GUI (non-x) needed to run bash scripts
 
Hi,

I have a set of simple bash scripts that I'd like run via a menu-driven system. I would like to add confirmation boxes, e.g. Continue? YES NO

I am guessing that the NCURSES API would be the way to go, but before I jump into it I'd like to hear some opinions on whether I am on the right track. The NCURSES API looks quite easy too.

My programming background is primarily PHP/JAVA/C++/some basic Python, but what I am after is something that will cause me the least headaches, debugging, etc.

Thanks heaps.

unSpawn 02-07-2007 05:35 PM

Well, if you want to do it in Bash you could use "select" statements, else maybe you could use dialog (as in "dialog --defaultno --yesno "Wanna boot windoze?" 10 40")?

AP81 02-07-2007 06:31 PM

Thanks heaps. I'll give this a try now!

pixellany 02-07-2007 08:29 PM

various simple utilities are out there, including Dialog, KDialog, and Zenity. I was pleased to find them ALL in the Mepis (Ubuntu) repositories.

Zenity, in particular, is really easy to use.

AP81 02-07-2007 09:12 PM

pixellany, they all require X to run. Thanks anyway.

introuble 02-08-2007 12:31 AM

Quote:

pixellany, they all require X to run. Thanks anyway.
Except dialog

pixellany 02-08-2007 08:16 AM

Quote:

Originally Posted by AP81
pixellany, they all require X to run. Thanks anyway.

Sorry--did not know that. but perhaps obvious now that I think of it.

alred 02-08-2007 09:24 AM

if going for x , there are also xdialog and gmessage ... probably by just using gtk configuration file in user home directories and by grabbing some window id(i donno how or is it possible ??) , maybe we can replace everything ...


.

gnashley 02-09-2007 09:38 AM

dialog does not need X to run. It uses the ncurses libs and has loads of built-in text-based 'widgets'. You can also use newt with it's 'whiptail' program which is similar.

They are bothe very easy to use and, especially for dialog there are lots of scripts in use out there which provide examples. (note that the Slakcware installer uses these dialogs and so did the old Yast1


All times are GMT -5. The time now is 11:13 AM.