Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'd like to automatically determine if my program is running on a machine that has either GTK or Motif (or both) installed on it, so I can dynamically use whatever is available. I'm pretty new to programming GUIs, so is there a standard way to test for the presence of a particular GUI system?
For GTK, I'm supposed to use pkg-config to ask if GTK is installed, but if that's not in my PATH I'm out of luck. And there's nothing like that for Motif.
Using locate is an interesting idea, but what if that's not installed? And when I ran it on a RH9 box to look for motif, it found lots of stuff within the Java Swing, Qt, and wxWindows packages, but not Motif itself.
Am I going to have to write something that searches the usual library directories for the various libraries that implement GTK or Motif? Other projects must be doing something like this, I thought this problem had been solved already. Sorry to be a complainer, but it seems that there must be a better way.
when I run locate on Motif I get lots of stuff in:
/usr/X11R6/LessTif/Motif1.2/include/*
for GTK the only thing I got was:
/usr/share/xemacs-21.4.12/lisp/ChangeLog.GTK
actually a tonne of stuff comes up when I run locate gtk [no capitals] - one of them tells me I am running:
/etc/gtk-2.0
THerefore I know I have both installed - which makes sense as I have both Gnome and KDE installed on this system for reasons of compatibility with applications etc.
Nope, not me. You must have met some imposter. Hey! They were misappropriting my nickname! I'm calling David Boies. I'm sure he'll take on this clear case of nickname infringement! And ... uh ... I'll demand license fees from anyone who says my nickname! Yeah, that's the ticket! :-)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.