LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 11-17-2003, 01:48 PM   #1
MacKtheHacK
Member
 
Registered: Jul 2003
Location: Boston, MA, USA
Distribution: RedHat, SuSE, Gentoo, Slackware, Mandrake ...
Posts: 111

Rep: Reputation: 15
How to tell if GTK or Motif are installed?


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?
 
Old 11-17-2003, 10:22 PM   #2
mossy
Member
 
Registered: Aug 2003
Location: USexIRL
Distribution: *nix
Posts: 849

Rep: Reputation: 30
you can check up the on the desktop's site - it should tell you or try:

locate GTK
locate motif
 
Old 11-18-2003, 08:46 AM   #3
MacKtheHacK
Member
 
Registered: Jul 2003
Location: Boston, MA, USA
Distribution: RedHat, SuSE, Gentoo, Slackware, Mandrake ...
Posts: 111

Original Poster
Rep: Reputation: 15
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.
 
Old 11-18-2003, 11:50 AM   #4
mossy
Member
 
Registered: Aug 2003
Location: USexIRL
Distribution: *nix
Posts: 849

Rep: Reputation: 30
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.

Last edited by mossy; 11-18-2003 at 11:53 AM.
 
Old 11-18-2003, 11:52 AM   #5
mossy
Member
 
Registered: Aug 2003
Location: USexIRL
Distribution: *nix
Posts: 849

Rep: Reputation: 30
the locate command is the same as running:

find / -name "*Motif*"

except you don't have to be root.
 
Old 11-18-2003, 06:09 PM   #6
bergerdml
LQ Newbie
 
Registered: Oct 2003
Posts: 7

Rep: Reputation: 0
Are you the same Mack?

Are you the same Mack the Hack I used to hang out with in about 90 in New York City? Part of the MCS/SMF crew?

David, aka JT
 
Old 11-20-2003, 09:05 AM   #7
MacKtheHacK
Member
 
Registered: Jul 2003
Location: Boston, MA, USA
Distribution: RedHat, SuSE, Gentoo, Slackware, Mandrake ...
Posts: 111

Original Poster
Rep: Reputation: 15
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! :-)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Motif vs GTK augustus123 General 1 11-22-2004 08:03 AM
GTK vs Motif augustus123 Linux - Newbie 3 11-22-2004 04:33 AM
Gtk vs Motif augustus123 Linux - General 1 11-22-2004 03:55 AM
Azureus: Motif or GTK? Darkenedes Linux - Software 0 07-17-2004 12:49 AM
eclipse - motif or gtk spyghost Programming 2 09-19-2003 07:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration