You are not logged in.
This must be answered a gazillion times, but the very generic terms "window" and "caption" render a lot of false positives for search.
Providing I know the pid of a process running in X, is it possible to retrieve its window caption/title? No dcop or other fancy stuff.
Preferably in sh or perl, but anything will do.
Offline
xwininfo can do it by window ID. I think you solve your problem, after inspecting its sources
Offline
Thanks for the tip, I didn't know that command (I'm a total noob at X programming). It seems a good starting point for further investigation.
Offline
I downloaded the sources but after some reading I opted for the easy dirty solution: a xwininfo -root -tree (lists all windows) with some greps in bash
Maybe I polish it from the C sources if I have the time, but for the time being, albeit ugly, it's working.
BTW, freedesktop.org mirrors are a total mess, after several unsuccessful attempts I had to download the tarball from the main server.
Offline