Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-07-2007, 05:09 PM
|
#1
|
|
Member
Registered: Mar 2005
Posts: 32
Rep:
|
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.
|
|
|
|
02-07-2007, 05:35 PM
|
#2
|
|
Moderator
Registered: May 2001
Posts: 24,786
|
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")?
|
|
|
|
02-07-2007, 06:31 PM
|
#3
|
|
Member
Registered: Mar 2005
Posts: 32
Original Poster
Rep:
|
Thanks heaps. I'll give this a try now!
|
|
|
|
02-07-2007, 08:29 PM
|
#4
|
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,797
|
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.
|
|
|
|
02-07-2007, 09:12 PM
|
#5
|
|
Member
Registered: Mar 2005
Posts: 32
Original Poster
Rep:
|
pixellany, they all require X to run. Thanks anyway.
|
|
|
|
02-08-2007, 12:31 AM
|
#6
|
|
Member
Registered: Apr 2004
Distribution: Debian -unstable
Posts: 700
Rep:
|
Quote:
|
pixellany, they all require X to run. Thanks anyway.
|
Except dialog
|
|
|
|
02-08-2007, 08:16 AM
|
#7
|
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,797
|
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.
|
|
|
|
02-08-2007, 09:24 AM
|
#8
|
|
Member
Registered: Mar 2005
Location: singapore
Distribution: puppy and Ubuntu and ... erh ... redhat(sort of) :( ... + the venerable bsd and solaris ^_^
Posts: 658
Rep:
|
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 ...
.
|
|
|
|
02-09-2007, 09:38 AM
|
#9
|
|
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,592
|
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
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:52 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|