Advice for basic GUI development under Linux

While I’m an experienced software developer, I haven’t done any embedded stuff under Linux before that needed a GUI – the closest I’ve come is developing OpenLook apps under full desktop Solaris many years ago – so I need some advice, please.

What is the easiest/most straightforward GUI development tool that will produce code compatible with an embedded environment? Does it use an X-Windows environment underneath, or is that dead by now? If dead, what’s taken its place that would be most suitable for an embedded app with a GUI?

I haven’t decided what Linux distro to use for the end embedded product, but it will probably be Damn Small Linux (unless someone can suggest a better small-footprint (128 MB) Linux to use). For the development platform, I’ll be using Red Hat Linux 4 Workstation.

Please advise…

Oh, I should have said that something called Blackbox looks promising, but I’m really just shooting in the dark. I need wiser and more experienced hands to guide me, please.

What are the limitations of the particular embedded system you’re using? All the common GUI libraries currently in use for Linux are X11-based, but I’m sure there are libs available for doing stripped-down GUI stuff for more limited hardware.

Then again, it doesn’t take much to run an X11 server these days.

Blackbox is a window manager for X11 and is pretty lightweight, but you’ll still need a GUI toolkit like Tk, Gtk+ or Qt for the widgets.

You might consider OpenGL, and it’s brethren GLU and GLUT. Pretty simple (in both the positive and negative senses), plus you get Mac OS X and Windows for free in addition to Linux.

GLUT is the most common of several windowing systems for it; alternatively you can use the native window system (X11, GTK+, or something similar for Linux) and use OpenGL just for the content drawing – that produces a more native look and feel for a relatively small amount of additional work.

Qt is a pretty common cross-platform framework, too, which may or may not be free to you depending on what you want to do with it.

Of course, all this assumes you want C/C++ compatible layers. Java’s another alternative, is also very cross-platform, and has several windowing systems to choose from. It’s available in many, but not all, embedded environments.

Hey, thanks for your reply, friedo. I knew the SDMB could help.

The entire system will be a single app with an extremely simple GUI. The target system is a minuscule 300MHz 486 box explicitly designed for embedded apps – an eBOX micro PC with 128MB RAM – and which includes a basic VGA graphics chip, one PS/2 keyboard port, 3 USB ports (one of which will be used for the mouse, another for a cool “bodiless” flash chip by Sony that’s barely large enough to stick out from the end of the USB port, and leaving one spare), and built-in ethernet and so-called “compact” flash port (the biggest thing on the entire box).

Since the app’s so basic, I’ll be able to get by easily with a minimal window management system. X-Windows is overkill – trivial ancient ASCII codes mght have sufficed – but I’ll use it anyway to allow for future developments, especially for possible language localization. The user will not be able to launch any apps of his own – it’ll be strictly locked down to a single app.

I’ve done some more research on my own and discovered something called Fluxbox, which is described as an improvement on Blackbox which has an even smaller footprint, so it looks like I’ve answered part of my own question – but I appreciate as many suggestions as I can get.

Okay, here’s an area concerning which I need a lot of advice. What do you recommend for someone like me whose experience with X-windows GUI – hell, any GUI – development is so far out of date? 98% of my experience is with systems or other embedded GUI-less software development.

Also: Since I’ve been away from Linux and other Unix derivatives for so long, I’d appreciate suggestions for which shell people prefer these days and whether to go with KDE or Gnome or whatever, and things of that nature. I don’t need any sophisticated apps such as office apps and the like (although they’re included in the Red Hat Workstation I’m just now going to install).

Thanks again for your input.

Thanks, TimeWinder.

OpenGL and GLUT sound good for me, considering the simplicity angle. I was unable to find much on GLU yet, though. What is your recommendation?

I don’t need cross-platform support, but you didn’t know that until my previous post.

I’m going to develop under Red Hat Workstation 4, with a probable target of Damn Small Linux. I see lots of references to binaries for other distros, and not much explicitly for Red Hat (and almost nothing for DSL). Please excuse my ignorance, but can you or anyone tell me if binaries for another distro would work for development and target or should I count on having to build them from source or what? What can you tell me about Suze (sp?)

I plan to develop in c++, to answer your question. Unless you or others feel a 300MHz 486 doesn’t provide enough horsepower for that and I should stick with c. Java would be great, but the hardware configuration doesn’t really allow that, I shouldn’t think.

You definitely want to be using Trolltech products. See Qt for Embedded Linux. Qt is renowned for its developer-friendliness, cross-platform support (which you don’t need), and was recently purchased by Nokia, so it’s a solid bet in the long term. Thanks to the KDE-Qt Free Foundation, Qt will always be open source.

Thanks for the tip, alterego. I’m not sure its an option, though, as we plan to put a few hundred of these things out and the site seems a bit coy (at least to me) concerning the licensing costs and whether some kind of license is required per unit or not (I assume not, but it’s not clear from what I’ve been able to gather so far). The whole idea is to save money using free-licensed software as much as possible, and since this is such a trivial GUI, we really don’t need much power at all.

I see an option for small businesses, but no clue as to how much a one developer license for a small business actually costs (you have to submit extra info). Do you happen to know?

If you want to develop a proprietary application, you need to purchase a commercial license. If you are willing to comply with the terms of the GPL, then you can download the source code and hack away. You can find the source code here: Qtopia Core.

Well, I got a quote back from Trolltech for a single-developer small business license and it was beyond what even 50 full hardware/OS units would cost! Yikes!

Well, I may look into it, but I think I’d just be better off with an already built free-license app such as were being discussed above.

I’d like more info on them, please, if anyone has any advice to share…