Other Looking for an easy GUI builder

I wonder if I can get some recommendations for a simple GUI builder.

So far I have been learning Glade and specTCL. Done the obligatory Hello World tutorial.

devel/SpecTcl is pretty old and not much documentation exists for our ports version, but it is defiantly usable.

Is there any simple GUI builder I am missing? Nothing QT based please.
Glade and GTK Builder are mammoth, while specTCL is spartan and crusty. I like that.

My first GUI project is for a ports compiler front-end.
Something simple with 2 dropdowns for Ports Category and then a linked Port Name.
Some buttons for common ports compiling options. I.E. buttons for make install, make config-recursive and the such.
Maybe a Command prompt window to show operations in action.
Just a personal project I have been chewing on.
I would like to create a dd GUI for myself to begin with. Learn how to work with disk drives via code.

So I really want to build GUI's that run command line programs in the background.
TCL/TK seems to exist cross platform and I like that versatility.
So SpecTCL is what I am leaning tword. Any negatives?

x11-toolkits/fox17 has caught my attention too.
x11-toolkits/fltk Is anyone using this?
Are there any Xt based GUI build tools for barebone X GUI programs? How about GUI building Motif programs?

I have been pouring over the x11-toolkits category trying to find the unicorn.
Bare X11 is really really hard to use. Expect a learning curve of days (fulltime) for an experienced programmer. BTDT.
I've never tried Motif.
Traditional Tcl/Tk is actually quite easy, and very old.

I've heard wonderful things about Kivy, and I did a trivial example with it: Put up a window, with a button that says "Hello World", and if you click on it, it changes to "Goodbye world" and goes away. Took only a few hours, in the evening when tired (so not working "full time experienced programmer", but while drinking a glass of wine or 2 or 5). But it is tied into Python, which you may like or dislike. The advantage I see in Kivy is that it is OS- or GUI-independent: You can write source that works in MacOS (without X, which is de-facto obsolete on the Mac), and on Linux native X, and on a Raspberry Pi using the frame buffer without X. I only tried it on a Mac though.
Arm is exactly why I want something lightweight.
I also notice several widgets that interest me. Sliders and Dials for instrumentation.
I also see Tkinter but it is python based. I will checkout Kivy.

For learning I wonder if I am going the wrong path. There is little future for TCL/TK. No job openings.
But I am not doing this for a job. But I wonder if I am wasting my time learning something almost obsolete.
For Motif, it is probably difficult to separate from CDE but the dtbuilder is great:

Otherwise there is the commercial BX Pro: https://motif.ics.com/products/bx-pro
Note that this is closed source and has online DRM (which is easy to patch/crack but still...)

For C++, possibly also wxWidgets (wxSmith: http://wiki.codeblocks.org/index.php/WxSmith_tutorial:_Hello_world)

Have you considered Java? Its an annoying language but there are lots of GUI builders.

Personally, I would just suggest keep your GUIs simple and do it by hand. With a decent "table-like" layout manager, it isn't too bad; and much more maintainable than relying on volatile GUI builders.

For quick prototypes I use an immediate mode GUI called imgui. It might be slightly annoying to hook up to OpenGL if you are not already in that environment but then it is really quick to add buttons etc.: https://github.com/ocornut/imgui/blob/master/examples/example_glut_opengl2/main.cpp

Finally; FVWM (if you use that WM) includes a simple GUI builder.


Profile disabled
If you want to do something which would work for some upcoming decades, then you may want to consider creating GUI's with HTML/CSS/JS/SVG. You know, you may run a web server on localhost and some web clients can be stripped down to kiosk mode and can be restricted to localhost only. So the front-end may be sort of a web-browser and at the backend you could simply get away with a CGI which does the dynamic stuff. For example, Mathematica came with this frontend/backend technic since the beginning in the 80’s (it was not HTTP but another protocol, however this does’t really matter). What matters is, if this technic is suitable for rocket-science mathematics it would also serve for a push button.

This would be also the ideal platform for implementing the MVC design pattern (Model–view–controller). I know there are many CSS/JS haters in the world, however, I am quite sure they don’t know very well what they’re actually hating.
I know there are many CSS/JS haters in the world, however, I am quite sure they don’t know very well what they’re actually hating.

While I am not a massive fan of this client server architecture for small util programs, I don't have any real issue with the web server. My real issue is more that web browsers these days are absolute scumm.


Profile disabled
... web browsers ... scumm

A quite general affirmation that is hard to defend, but give it a try.

Take for example Epiphany. This is my favorite on FreeBSD (besides Safari on the Mac) for the front-end side. Absolutely beautiful text rendering with font-kerning done well. Beautiful GUI elements, which can be adapted to any needs using CSS and JS. Perfect HTML/CSS/JS debugger. So, why is this scumm in the given respect?
I notice Dillo is written using fltk. I think it looks presentable.

I did check out wxHatch which is not in our ports and is stale.

Just to see what I missed I resurrected Visual Tcl which went out of ports tree with tcl 8.4
So to summarize what I have found that there are many GUI builders. This work is cosmetic.
Building the code that corresponds to widgets is where the work is.
The Editor in SpecTcl does not take pasted text. I did'nt dig much on why.
This is good and bad. Manually typing the text helps me memorize what I am doing.
But it is an early warning sign. Cut'n'paste in an editor should not be verboten.
Crusty I can deal with but non-functional is another thing.
I don't have any real issue with the web server.
I totally agree. lighttpd is amazing. It is everything I want in a web server. My Linode instance has been so solid.
When I want to step up nginx seemed really pliable from my small experience following tutorials and with zoneminder..

lighttpd now performs strict URL parsing and normalization on HTTP requests. This is configurable, but the defaults are now strict unless explicitly configured otherwise.
Hallelujah. Screw them malformed URL 'hackers'.
If you want to make simple interfaces I strongly reccomend you use Tk. A wrapper for dd ? Tk is ideal. I made myself several of these utilities e.g. my-rename-file and a few wmaker-like widgets.

I would advise against GUI builders for a simple reason. It is much harder to learn to use a graphical tool then a command line one, unless you are ready to watch hours of terrible youtube videos. It is faster to forget how to use them. It is hard for you to document how to use them, so, to remember them. Finally, they tend to change fast and produce really ugly code you will need to mix with your code.

My reccomenation is against a web interface. This is abolutely not a smart thing to do if it is not needed. Ok Google is pushing it, but, good for them, does not mean that will be a good for you. If you are the only user of a program that runs locally there is no logical reason to build a web interface. If not, that you already know how to do it and you don't want to learn a non-web GUI toolkit. RATIONALE(s) **1** If you develop for the web you need a tremendous amunt of uncontrollable extra software to make the most silly GUI. 1] A web browser 2] a web server. **2** All web browsers are different, remember this well. **3** You will need to develop the backend and the frontend separately so you will need to write 2 pieces of software, most probably using fully different tools and languages.

If you decide to go with Tk, don't use the place nor the grid layout manager. Use pack ! Pack rules. It will take you a few days to learn but you will see, Perl motto holds here, it will make the easy things easy and the hard things possible. The same principle it uses holds in a lot of other GUI. From Java to, gtk to HTML/CSS. I sold only 2 end-user desktop applications in my life, both based on Python+Tk. Developed in Unix, sold for Windows. I would redo the same technical choice tomorrow.

There are 3 ways to learn Tk. Use Tcl, that is kind of the most fun. But I really never liked much Tcl. So second choice is, go with Python. There is a huge amount of documentation about it because Guido Van Rossum has been smart enough to keep a GUI into the language. I wrote the FreeBSD Tk gem for Ruby, so, that is where my heart stands;) In this moment i think Ruby is more fun and more practical then Python, but ... well this is another story.

Many years ago, to learn Tk in Python, I used a lot this booklet, give it a look. Also Ousterout book is worh reading of course.


Take for example Epiphany.

Epiphany, "Extremely lightweight and simple web browser for GNOME 3"

Other than the sheer number of dependencies (over 200!) and most of Gnome 3; and GTK2 as well as GTK3... its certainly not elegant compared to Tk's 16 deps simply to display some utility dialogs and buttons.

Possibly not fair because it was made to "bind" tightly with Gnome but even Firefox is quite a bit lighter; but then we get into ethical / privacy issues as we get away from the slightly niche browsers.
You could always use a RAD tool like Lazarus in /usr/ports/editors (which installs the Free Pascal Compiler). I recently started adding FreeBSD-specific info to the Lazarus Wiki and there's a very active forum for it. The applicarion I compiled on FreeBSD 12 using the GTK2 widget set ran fine on FreeBSD 11.2 as well. It creates single file GUI executables.

Be aware you need either a GENERIC kernel or to enable the COMPAT_FREEBSD6 and COMPAT_FREEBSD7 options in your custom kernel config. (I've filed a bug report).
I think tcl/tk is a great learning start. Nothing mindblowing yet. Does use argc/argv and other C similarities.
Slight detour as I am trying to reset the /devel/vtcl port.
SpecTcl is just too crufty.

Did some bare Tk tutorials and I think I could deal with command line only, but I don't see a reason why.
Visual Tcl only depends on Tcl so it is compact. I am trying to layout stuff, so a GUI make sense.
I do understand learning the Tk fundamentals is important.

I had trouble figuring out how to best write scripts using tclsh and wish and the shebang line. Still not sure I got it right.
Symlinked tclsh8.6 to tchsh and the same with wish8.6.
They were using a version number in addition to the name.
I figure this way my script is version agnostic: hello.tk
button .hello -text Hello \
-command {puts stdout "Hello, World!"}
pack .hello -padx 20 -pady 10
Just change the symlink when a new version hits.
This post was useful in running tcl:

I am not sure why the shebang line remains /bin/sh and then they exec tclsh. Why?
It can go in the shebang line alone. Why shell to sh and then tclsh?
exec uname &

This was early attempt before symlinking.
# \
exec tclsh8.5 "$0" "$@"
puts [open messages.log w] "This is my Tcl tutorial"