+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 19

Thread: bash to GUI

  Share/Bookmark
  1. #1

    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    3,223
    Blog Entries
    5
    Thank Post
    516
    Thanked 267 Times in 155 Posts
    Rep Power
    71

    Default bash to GUI

    Ive made a few basic 'frontend' (if you can call them that) bash scripts for some programs that require many -flags where it will prompt for each setting, and then run the program based on the user input.

    Similar to the oldschool batch files, which any tom dick and pony could make, there wasnt really a GUI equivelent until AutoIT (as far as I know)

    My question is, is there anything a complete newbie like me can use to make a GUI frontend, that will take the options inserted into fields in a GUI, and then launch an external program populating the various flags with what has been entered into the various boxes in the GUI?

    Hope this makes sense?/

    Cheers

    RB

  2. #2

    Reputation
    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,445
    Thank Post
    342
    Thanked 687 Times in 576 Posts
    Rep Power
    144

    Default

    Hmm, I don't know if ncurses can do what you're after, it's worth looking at. But I think you'll probably be looking at a more complex language like python and PyGtk, which I think it probably the 'easiest' combination.

  3. #3

    Reputation Reputation Reputation
    box_l's Avatar
    Join Date
    May 2007
    Location
    Herefordshire
    Posts
    265
    Thank Post
    30
    Thanked 48 Times in 40 Posts
    Rep Power
    15

    Default

    try gambas

    Gambas - Gambas Almost Means Basic

    very like visual basic,

    BoX

  4. #4

    Reputation
    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead, Somerset
    Posts
    8,384
    Blog Entries
    22
    Thank Post
    264
    Thanked 755 Times in 604 Posts
    Rep Power
    197

    Default

    How about building little C Sharp applications with Mono? C Sharp is an easy language to pick up for things like this I'd say.

  5. #5

    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Alton, Hampshire
    Posts
    3,483
    Thank Post
    620
    Thanked 396 Times in 342 Posts
    Rep Power
    101

    Default

    Quote Originally Posted by RabbieBurns View Post
    is there anything a complete newbie like me can use to make a GUI frontend
    A web page. It's the exact processing model you're after - stick a form on the screen, the user fills it in and hits "submit", the data is sent to a web server and calls the command-line application via system() or whatever. All you need is a small web server to listen out on a port (doesn't have to be port 80). Python has a web server module that lets you write a small web server in about 3 lines of code.

    --
    David Hicks

  6. #6

    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    3,223
    Blog Entries
    5
    Thank Post
    516
    Thanked 267 Times in 155 Posts
    Rep Power
    71

    Default

    Quote Originally Posted by dhicks View Post
    A web page. It's the exact processing model you're after - stick a form on the screen, the user fills it in and hits "submit", the data is sent to a web server and calls the command-line application via system() or whatever. All you need is a small web server to listen out on a port (doesn't have to be port 80). Python has a web server module that lets you write a small web server in about 3 lines of code.

    --
    David Hicks
    I was imagining something that would be distributable, rather than having to have them run a web server seems a bit complicated. Thanks though.

    building little C Sharp applications with Mono
    and
    gambas
    Im afraid I am going to have to look up as I have no clue.

    Python again I have not dabbled with. But will give it a look.

  7. #7

    Reputation Reputation Reputation Reputation Reputation
    Arcath's Avatar
    Join Date
    Feb 2009
    Location
    Lancashire
    Posts
    601
    Thank Post
    32
    Thanked 54 Times in 48 Posts
    Rep Power
    19

    Default

    if your using gnome you could allways use "zenity" your script can bring up a series of simple 1 line input boxes.

    Zenity examples

    it basically works by putting "var=$(zenity --entry --text "Does this work")", the users input is now in $var

  8. Thanks to Arcath from:

    RabbieBurns (04-03-2009)

  9. #8

    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Alton, Hampshire
    Posts
    3,483
    Thank Post
    620
    Thanked 396 Times in 342 Posts
    Rep Power
    101

    Default

    Quote Originally Posted by RabbieBurns View Post
    I was imagining something that would be distributable, rather than having to have them run a web server seems a bit complicated.
    No, Python lets you write a web server in a few lines of code, it's the simples thing ever!

    --
    David Hicks

  10. Thanks to dhicks from:

    RabbieBurns (04-03-2009)

  11. #9

    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    jinnantonnix's Avatar
    Join Date
    Nov 2007
    Location
    Wales
    Posts
    1,443
    Blog Entries
    7
    Thank Post
    44
    Thanked 211 Times in 174 Posts
    Rep Power
    55

    Default

    RealBasic looks interesting, but it's $75.
    REAL Software: REALbasic, Cross-Platform Development Environment


    Here's a portal to some free stuff which might be of some use:
    Free cross-platform programming Tools, free cross-platform compilers, programming languages, etc.

  12. Thanks to jinnantonnix from:

    RabbieBurns (04-03-2009)

  13. #10

    Reputation Reputation Reputation Reputation Reputation
    Arcath's Avatar
    Join Date
    Feb 2009
    Location
    Lancashire
    Posts
    601
    Thank Post
    32
    Thanked 54 Times in 48 Posts
    Rep Power
    19

    Default

    Is the machine that will be running the bash script a webserver? if it is write a simple PHP page with a form on it, then take the POST data and do this:

    system("sh /path/to/script/script.sh -flag \"{$_POST['value']}\")

    not sure if using \" will work, or if {$var['var']} will, but you get the idea

  14. #11

    Reputation
    linuxgirlie's Avatar
    Join Date
    Jul 2005
    Location
    Kent
    Posts
    294
    Thank Post
    35
    Thanked 17 Times in 14 Posts
    Rep Power
    13

    Default

    Xdialog is a nice simple frontend for bash scripts.

    Xdialog

    That is the website, gives you lots of examples so you can copy and paste (just highlight what one you want and the script appears below), its what we use to use before we went web-based and is really simple.

    Jo

  15. Thanks to linuxgirlie from:

    RabbieBurns (04-03-2009)

  16. #12

    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    Gatt's Avatar
    Join Date
    Jan 2006
    Location
    Rochdale
    Posts
    4,111
    Thank Post
    434
    Thanked 218 Times in 159 Posts
    Rep Power
    98

    Default

    looking at dialog at the moment for servers without X on them...

  17. #13

    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    3,223
    Blog Entries
    5
    Thank Post
    516
    Thanked 267 Times in 155 Posts
    Rep Power
    71

    Default

    Thanks, looks the business Ill give that a play tonight

  18. #14

    Reputation

    Join Date
    May 2010
    Posts
    4
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Smile

    Please take a look to my BASH library: EasyBashGUI
    sites.google.com/site/easybashgui

    Goal is making very easy bash "GUI" script creation...
    :-)

  19. #15

    Reputation
    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    webman's Avatar
    Join Date
    Nov 2005
    Location
    County Durham
    Posts
    7,471
    Blog Entries
    2
    Thank Post
    534
    Thanked 588 Times in 431 Posts
    Rep Power
    168

+ Reply to Thread
Page 1 of 2 1 2 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. bash script doesnt like folders with spaces
    By RabbieBurns in forum Scripts
    Replies: 20
    Last Post: 12-02-2009, 12:28 PM
  2. batch to bash rewrite help needed please
    By RabbieBurns in forum Scripts
    Replies: 4
    Last Post: 22-09-2008, 09:05 AM
  3. GUI and some help needed
    By MK-2 in forum Windows
    Replies: 4
    Last Post: 01-03-2007, 05:18 PM
  4. One time runas gui
    By plexer in forum Coding
    Replies: 4
    Last Post: 29-07-2006, 10:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts