Question

i have been making a GUI for my Bash script using Glade. Is there anyway i can convert the .glade file to a executable file for Linux?

Was it helpful?

Solution

You can't.

Glade (or GtkBuilder) are just descriptions of the UI, which gets parsed by a (in C with Gtk3) GtkBuilder object which in turn creates your widgets according UI xml description at runtime. It does not generate any (with the exception for some callback/model-view connections) application logic.

OTHER TIPS

@drahnr has the correct answer: the way to make a glade file "runnable" is to write code that uses it. I'll just mention zenity in case that's good enough for your use case -- it allows creation of simple dialogs and can be a fast way to create very simple UIs for scripts:

entry=$(zenity --entry \
               --title="Info needed" \
               --text="Enter a value:" \
               --entry-text "Default value")
echo "return value was $?";
echo "entered value was $entry";

Note that the possibilities are very limited compared to what you can do with actual code.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top