PDA

View Full Version : Need info about Linux Graphics Programming



rsbriggs
08-26-2003, 05:37 PM
What is the easiest way to do Linux graphics programming? The libraries and so forth that need to be loaded to do any graphic programming under Linux seem ridiculous.....

Was even thinking about doing some GTK# programming - got mono installed OK, but after two hours of chasing down dependencies I still didn't couldn't get all the libraries installed that I needed to be able to compile and run a GTK# program.

Is GTK+ mostly for Gnome?
Do I fire up gcc and write in (raw) GTK+ ?
PERL with graphics extensions?
Python?
Java? (gasp)
Something else?

I'm wanting to do something fairly simple - something along the lines of DCMonitor for my Linux server. All the DF directories are available locally - the clients NFS mount directories under /home.

So --- a graphics program that allows you to enter/edit a list of file paths. Simple list-box type gadget would be fine. Reads through the list. Reads and parses progress.txt for each entry in the list. Shows changes from last (selectable interval) update...

In C# under Windows, I'd have this done in a matter of a few minutes, even though my main expertise is 'C' under UNIX (but not X programming).

Suggestions? Comments? Rude Remarks?

Dyyryath
08-26-2003, 06:31 PM
It mostly depends on what you want to write in. I'd pick the language and then pick the graphics toolkit. If you want to write in Perl then TK is pretty easy. If you want to use C/C++ then GTK or QT would work. If you want to use Python then TK is again a decent choice, though you could easily use GTK or QT there, too.

I've written several monitoring and install/control apps for distributed computing projects in the past and I tend to use Perl/TK under Linux, but that's just because it's my favorite. Under Windows, I used C# for the last one.

If you're not doing something too involved, I'd probably suggest Perl/TK, but that's just me. Of course, you get the added benefit of it being cross platform, too. You can easily compile it into an executable for Windows with little to no changes.

I haven't mentioned Java primarily because I rarely use it for anything other than applets. It'd work, too, though it'd have a larger memory footprint...

Kosh
08-27-2003, 10:38 AM
There are some graphical designers if you don't want to go straight for the gtk+ extensions. If C is what you know you might want to look at using something like glade (link) (http://glade.gnome.org/), if you prefer C++ then you might have a look at gtkmm (link) (http://gtkmm.sourceforge.net/) or QT Designer (link) (http://www.trolltech.com/products/qt/designer.html). If you're thinking of going the python route then you might want to check out boa constructor (link) (http://boa-constructor.sourceforge.net/).

Mind you I haven't done any major GUI design work in linux outside of Java and the only think I have to say regarding that is never again. I've installed boa constructor on my machine and I've been playing with it but I haven't had enough time to really do anything interesting with it yet. I've played around a bit with glade and qt designer at university, but again not long enough to really get a feel (of the two I prefer qt designer though -- but I like the look of gtk+ better), gtkmm is just something I've heard about and passing along. As for GTK+ working outside of gnome, it does, it might look a bit out of place in KDE but I know a fair number of people who mix QT and GTK+ apps and don't really mind the difference in feel.

Good luck, I hope you have fun with your project.

:cheers:

rsbriggs
08-27-2003, 11:17 AM
Well, looks like some heavy reading about GTK+ development and Glade might be where I'm headed....

Thanks!