Hello. I was wondering which command would allow me to know factually check which graphic library an application uses?
For instance, which UI library does telegram or firefox use? strace
wouldn’t work for that purpose as it deals with system calls, right? What about ltrace
which works for library calls? I was able to find some gtk strings in the output of ltrace, but mostly strncmp(), strchr(), strlen(), memchr(), and one setenv(GTK_IM_MODULE, "gtk-im-context- simple")
. Is that enough to conclude the process uses gtk?
It’s a little verbose, so I wondered what about lsof to show open files. lsof -p <pid>
shows me that the pid opens up libgtk-3.0.so… That seems conclusive enough, right? There wouldn’t be any reason to open that libgtk-3.0.so shared object if it didn’t use gtk?
Seems like lsof is better for getting this information rather than ltrace, right?
In the specific case of firefox, lsof does show that firefox uses libgtk-3.0.so
as well as something called libmozgtk.so
so I guess they don’t fully use gtk, but their own thing as well?
In summary, what’s the best and most reliable command to figure out which graphic library (QT, GTK, something else) an application uses? lsof?
Thanks
Thanks a lot for your reply, learned a lot of things!
In Fedora
/usr/bin/firefox
also is a bash script so I ran into the samenot a dynamic executable
issue as well.readelf
looks interesting, I’ll have to play around with it.