[opensuse] Easy GUI or ncurses libraries/templates for kde3 or cli?
Listmates: I have a number of BASH scripts that I would like to develop a menu to display and then call the ones that I want to call. For example, I have a number of scripts for mounting CIFS/SMB shares on a number of different servers. I would like to develop a simple interface that lists all the scripts and lets me pick one (or more) to execute. Something like calling a file-open dialog and passing the results to be executed would work. For working in kde3 or from konsole/xterm what are the simple tools available? Is QT what I'm looking for as the gui? Is there a minimal c or c++ template/skeleton bit of code somewhere that would draw a basic window and let me add the file-open dialog to it? For the text environment, is there a set of BASH menu scripts that would work? I guess I could create my own with ls, awk '{print NR,NR,$0 }', read, and case, but if I can avoid reinventing the wheel, that would be great. Thanks for any links or suggestions you can provide. -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Monday 27 October 2008 02:00:44 David C. Rankin wrote:
Listmates:
I have a number of BASH scripts that I would like to develop a menu to display and then call the ones that I want to call. For example, I have a number of scripts for mounting CIFS/SMB shares on a number of different servers. I would like to develop a simple interface that lists all the scripts and lets me pick one (or more) to execute. Something like calling a file-open dialog and passing the results to be executed would work.
For a quickie solution, I would suggest looking at kdialog. For example scr=$(kdialog --radiolist "Which script do you want torun" script1 "mount foo on bar" off script2 "mount baz on baq" off) test -n $scr && exec $scr kdialog can also give you a full kde file dialog http://techbase.kde.org/Development/Tutorials/Shell_Scripting_with_KDE_Dialo... Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Anders Johansson wrote:
On Monday 27 October 2008 02:00:44 David C. Rankin wrote:
Listmates:
I have a number of BASH scripts that I would like to develop a menu to display and then call the ones that I want to call. For example, I have a number of scripts for mounting CIFS/SMB shares on a number of different servers. I would like to develop a simple interface that lists all the scripts and lets me pick one (or more) to execute. Something like calling a file-open dialog and passing the results to be executed would work.
For a quickie solution, I would suggest looking at kdialog. For example
scr=$(kdialog --radiolist "Which script do you want torun" script1 "mount foo on bar" off script2 "mount baz on baq" off) test -n $scr && exec $scr
kdialog can also give you a full kde file dialog
http://techbase.kde.org/Development/Tutorials/Shell_Scripting_with_KDE_Dialo...
Anders
If you are looking for something a bit more, try Kommander. http://kommander.kdewebdev.org/ Manne -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 David C. Rankin wrote:
Listmates:
I have a number of BASH scripts that I would like to develop a menu to display and then call the ones that I want to call. For example, I have a number of scripts for mounting CIFS/SMB shares on a number of different servers. I would like to develop a simple interface that lists all the scripts and lets me pick one (or more) to execute. Something like calling a file-open dialog and passing the results to be executed would work.
For working in kde3 or from konsole/xterm what are the simple tools available? Is QT what I'm looking for as the gui? Is there a minimal c or c++ template/skeleton bit of code somewhere that would draw a basic window and let me add the file-open dialog to it?
For the text environment, is there a set of BASH menu scripts that would work? I guess I could create my own with ls, awk '{print NR,NR,$0 }', read, and case, but if I can avoid reinventing the wheel, that would be great.
Thanks for any links or suggestions you can provide.
Glade + Perl could be alternative to Johns suggestion. There is a module that will take a Glade XML and load it and plugin the GUI and script together. For the module... http://search.cpan.org/~tsch/Gtk2-GladeXML-1.005/GladeXML.pm For an examples of how to use it http://gtk2-perl.sourceforge.net/doc/intro/ http://www.perlmonks.org/?node_id=104432 Not pretty, but not quite as complex as sorting out a QT development configuration for scripting purposes... (launching bash scripts from perl is not that difficult the only major problem is probably the number of ways you are given to do it).... - -- ============================================================================== I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone. Bjarne Stroustrup ============================================================================== -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkkFk1YACgkQasN0sSnLmgJ6OQCgjhp5nQxBuRsNTsY0FQ+T4beA rnwAoJUnS0ko/aQcQjZPxF5E7SGXM5AY =KbQ1 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 David C. Rankin wrote:
Listmates:
I have a number of BASH scripts that I would like to develop a menu to display and then call the ones that I want to call. For example, I have a number of scripts for mounting CIFS/SMB shares on a number of different servers. I would like to develop a simple interface that lists all the scripts and lets me pick one (or more) to execute. Something like calling a file-open dialog and passing the results to be executed would work.
For working in kde3 or from konsole/xterm what are the simple tools available? Is QT what I'm looking for as the gui? Is there a minimal c or c++ template/skeleton bit of code somewhere that would draw a basic window and let me add the file-open dialog to it?
For the text environment, is there a set of BASH menu scripts that would work? I guess I could create my own with ls, awk '{print NR,NR,$0 }', read, and case, but if I can avoid reinventing the wheel, that would be great.
Thanks for any links or suggestions you can provide.
Glade + Perl could be alternative to Johns suggestion. There is a module that will take a Glade XML and load it and plugin the GUI and script together. For the module... http://search.cpan.org/~tsch/Gtk2-GladeXML-1.005/GladeXML.pm For an examples of how to use it http://gtk2-perl.sourceforge.net/doc/intro/ http://www.perlmonks.org/?node_id=104432 Not pretty, but not quite as complex as sorting out a QT development configuration for scripting purposes... (launching bash scripts from perl is not that difficult the only major problem is probably the number of ways you are given to do it).... Oops forgot the most useful tutorial... http://live.gnome.org/GTK2-Perl/GladeXML/Tutorial - -- ============================================================================== I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone. Bjarne Stroustrup ============================================================================== -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkkFoJAACgkQasN0sSnLmgI6aACfXlXcJegfJPQ8J7DfNagdyWdq QqoAoO8Fstc3Q+AVJTJ1FaWseHxCcnW2 =KH7P -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
G T Smith wrote:
David C. Rankin wrote:
Listmates:
I have a number of BASH scripts that I would like to develop a menu to display and then call the ones that I want to call. For example, I have a number of scripts for mounting CIFS/SMB shares on a number of different servers. I would like to develop a simple interface that lists all the scripts and lets me pick one (or more) to execute. Something like calling a file-open dialog and passing the results to be executed would work.
For working in kde3 or from konsole/xterm what are the simple tools available? Is QT what I'm looking for as the gui? Is there a minimal c or c++ template/skeleton bit of code somewhere that would draw a basic window and let me add the file-open dialog to it?
For the text environment, is there a set of BASH menu scripts that would work? I guess I could create my own with ls, awk '{print NR,NR,$0 }', read, and case, but if I can avoid reinventing the wheel, that would be great.
Thanks for any links or suggestions you can provide.
Glade + Perl could be alternative to Johns suggestion. There is a module that will take a Glade XML and load it and plugin the GUI and script together.
For the module...
http://search.cpan.org/~tsch/Gtk2-GladeXML-1.005/GladeXML.pm
For an examples of how to use it
http://gtk2-perl.sourceforge.net/doc/intro/ http://www.perlmonks.org/?node_id=104432
Not pretty, but not quite as complex as sorting out a QT development configuration for scripting purposes... (launching bash scripts from perl is not that difficult the only major problem is probably the number of ways you are given to do it)....
Oops forgot the most useful tutorial...
Excellent, that looks very promising. I can already pick around in perl so this looks great. Thanks Manne & GT! -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Montag, 27. Oktober 2008, David C. Rankin wrote:
I have a number of BASH scripts that I would like to develop a menu to display and then call the ones that I want to call. For example, I have a number of scripts for mounting CIFS/SMB shares on a number of different servers. I would like to develop a simple interface that lists all the scripts and lets me pick one (or more) to execute. Something like calling a file-open dialog and passing the results to be executed would work.
For working in kde3 or from konsole/xterm what are the simple tools available? Is QT what I'm looking for as the gui? Is there a minimal c or c++ template/skeleton bit of code somewhere that would draw a basic window and let me add the file-open dialog to it?
The YaST2 UI abstraction layer is now available as a stand-alone libary for
use with C++ (there are also Python bindings, but they still have some
issues). It doesn't drag in a zillion dependencies; you only link against
libyui and libpthread. It loads the desired UI plug-in (Qt, Gtk, NCurses) as
needed.
I haven't gotten around yet to do any big-style marketing for it, just some
simple examples:
http://svn.opensuse.org/svn/yast/trunk/libyui/examples/HelloWorld.cc
http://svn.opensuse.org/svn/yast/trunk/libyui/examples/SelectionBox1.cc
http://svn.opensuse.org/svn/yast/trunk/libyui/examples/SelectionBox2.cc
http://svn.opensuse.org/svn/yast/trunk/libyui/examples/ComboBox1.cc
http://svn.opensuse.org/svn/yast/trunk/libyui/examples/ComboBox1-editable.cc
See for yourself if the code is simple enough for your requirements. ;-)
It's all well-tested; YaST2 uses it all the time.
CU
--
Stefan Hundhammer
Forgot the links to the documentation:
http://forgeftp.novell.com///yast/doc/SL11.0/tdg/Book-UIReference.html
http://forgeftp.novell.com///yast/doc/SL11.0/tdg/bk08ch01.html#layout-howto
http://forgeftp.novell.com///yast/doc/SL11.0/tdg/UI-Events.html
Even though the documentation is about how to use it from YCP, I think you can
make that abstraction. ;-)
Specific C++ docs are in each header file in /usr/include/YaST2/yui (install
package yast2-libyui-devel) or at
http://svn.opensuse.org/svn/yast/trunk/libyui/src
CU
--
Stefan Hundhammer
Stefan Hundhammer wrote:
Forgot the links to the documentation:
http://forgeftp.novell.com///yast/doc/SL11.0/tdg/Book-UIReference.html http://forgeftp.novell.com///yast/doc/SL11.0/tdg/bk08ch01.html#layout-howto http://forgeftp.novell.com///yast/doc/SL11.0/tdg/UI-Events.html
Even though the documentation is about how to use it from YCP, I think you can make that abstraction. ;-)
Specific C++ docs are in each header file in /usr/include/YaST2/yui (install package yast2-libyui-devel) or at
http://svn.opensuse.org/svn/yast/trunk/libyui/src
CU
That is excellent. I will take a look. If it can select environments (ncurses, QT, Gtk) like you say, this is exactly what I'm looking for. Thank you Stefan for all the links. -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mittwoch, 29. Oktober 2008, David C. Rankin wrote:
That is excellent. I will take a look. If it can select environments (ncurses, QT, Gtk) like you say, this is exactly what I'm looking for. Thank you Stefan for all the links.
You're welcome.
Please notice that currently you have to unset $DISPLAY to get a program to
use NCurses in an X11 environment.
If you have any further questions, please use the yast-devel@opensuse.org
mailing list; I am much less likely to miss any message there (much less
traffic) than here.
CU
--
Stefan Hundhammer
Stefan Hundhammer wrote:
http://svn.opensuse.org/svn/yast/trunk/libyui/examples/HelloWorld.cc
I think using the YUI namespace is likely to cause considerable confusion with YUI! (i.e. the Yahoo! User Interface Library) http://developer.yahoo.com/yui/ Perhaps it might be sensible to choose something else before it is too widespread to change? Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Dienstag, 28. Oktober 2008, Dave Howorth wrote:
Stefan Hundhammer wrote:
http://svn.opensuse.org/svn/yast/trunk/libyui/examples/HelloWorld.cc
I think using the YUI namespace is likely to cause considerable confusion with YUI! (i.e. the Yahoo! User Interface Library) http://developer.yahoo.com/yui/
Perhaps it might be sensible to choose something else before it is too widespread to change?
Ours is much older - it goes back to 1999. ;-)
CU
--
Stefan Hundhammer
On Tuesday 28 October 2008 08:19, Dave Howorth wrote:
Stefan Hundhammer wrote:
http://svn.opensuse.org/svn/yast/trunk/libyui/examples/HelloWorld.c c
I think using the YUI namespace is likely to cause considerable confusion with YUI! (i.e. the Yahoo! User Interface Library) http://developer.yahoo.com/yui/
How much overlap is there between C++ and JavaScript development??
Perhaps it might be sensible to choose something else before it is too widespread to change?
TLAs will always be ambiguous, I don't think it's worth trying to ensure each is used only one way. Someone somewhere (probably several someones) will create a conflicting use. It's a losing battle.
Cheers, Dave
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (7)
-
Anders Johansson
-
Dave Howorth
-
David C. Rankin
-
G T Smith
-
Manne Merak
-
Randall R Schulz
-
Stefan Hundhammer