LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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

Reply
 
LinkBack Search this Thread
Old 02-07-2007, 05:09 PM   #1
AP81
Member
 
Registered: Mar 2005
Posts: 32

Rep: Reputation: 15
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.
 
Old 02-07-2007, 05:35 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,524
Blog Entries: 51

Rep: Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601
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")?
 
Old 02-07-2007, 06:31 PM   #3
AP81
Member
 
Registered: Mar 2005
Posts: 32

Original Poster
Rep: Reputation: 15
Thanks heaps. I'll give this a try now!
 
Old 02-07-2007, 08:29 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
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.
 
Old 02-07-2007, 09:12 PM   #5
AP81
Member
 
Registered: Mar 2005
Posts: 32

Original Poster
Rep: Reputation: 15
pixellany, they all require X to run. Thanks anyway.
 
Old 02-08-2007, 12:31 AM   #6
introuble
Member
 
Registered: Apr 2004
Distribution: Debian -unstable
Posts: 700

Rep: Reputation: 31
Quote:
pixellany, they all require X to run. Thanks anyway.
Except dialog
 
Old 02-08-2007, 08:16 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
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.
 
Old 02-08-2007, 09:24 AM   #8
alred
Member
 
Registered: Mar 2005
Location: singapore
Distribution: puppy and Ubuntu and ... erh ... redhat(sort of) :( ... + the venerable bsd and solaris ^_^
Posts: 658
Blog Entries: 8

Rep: Reputation: 31
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 ...


.
 
Old 02-09-2007, 09:38 AM   #9
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,724

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i run two bash scripts at same time? helptonewbie Programming 3 09-05-2006 06:25 PM
How to run Bash scripts like thread in Java? nguyenzoro Linux - General 1 11-11-2005 02:08 AM
Cannot run install sh scripts, and bash is FUBAR...what to do? asdfjkl Linux - Software 5 11-20-2004 09:09 PM
How to Run perl scripts using bash Boudewijn Linux - Software 2 11-26-2003 03:37 AM
bash scripts won't run aamehl Linux - General 10 09-06-2003 02:25 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration