LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Need exampel for frontend(gui) shell command (like iwconfig or ifconfig etc) (https://www.linuxquestions.org/questions/programming-9/need-exampel-for-frontend-gui-shell-command-like-iwconfig-or-ifconfig-etc-219301/)

Esid 08-18-2004 12:16 PM

Need exampel for frontend(gui) shell command (like iwconfig or ifconfig etc)
 
okay, i want to make my life a bit more easy :]

each time i wants to configure stuff about my wireless card i go to my shell and type tens of thousinds of lines.. or almost that much.

In the great spirit of easyness i would like to ask if anyone could produce a exampel i can look at, so i can figure out how to do this :)

a exampel that could do the next things would be great :) -

have ifconfig as the basic command
do stuff like ifconfig $ethX $ip $promisc($-promisc) and orther options like that (where $ indicates the vars that can be altered in a box etc)
-
just to make a exampel more so it sould not be misunderstood right!

iwconfig $ethX essid(could be indicatet by a radiobutton) $essidname
iwconfig $ethX mode(radiobotten again maybe?) monitor(a list to pick from $monitor managed etc)



i hope i am clear and you understand what i am trying to explain and ask for :)

best wishes.

:)

cppkid 08-19-2004 12:28 AM

Hey its simple you Why don't you write a script for that, May be you want different options each time so you can build a GUI for that. And i think sending you such an example will be dificult for you to go with your modifications and if you do it yourself, It would be a lot more simple.
Hope you have got a little knowledge of C++. Just open the QT Designer, make a new wedget (gui), and drag drop some push buttons and radio buttons and all that stuff and declare a few slots for them. then save them and open the kdevelope and give the implementation of those slots. Its simple.
How to do it?? just go to www.kde.org and see the tutorial of QT Designer wih Kdevelope (I Think its in documentation section), Anyway in this they have given an example to make gui step by step and very eassy.
When you click the OK button in your GUI, your GUI will just have to make an script file with your selected options and then you can use, "system" command to execute that script.

tonyfreeman 08-19-2004 07:24 PM

If you just want to put a GUI to your script in a quick and simple way ... you can use Xdialog, zenity, gdialog, dialog, etc. Go to freshmeat.net and search for zenity or Xdialog.


All times are GMT -5. The time now is 12:36 PM.