Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm looking for a way to automatically list all X resources that are used in an application. To give you an example, for xterm I'd expect a list similar to the following but with all the resources that are used by xterm.

 background
 foreground
 cursorColor
 vt100.geometry
 scrollBar
 scrollTtyOutput
 ...

The method can work on the source code of the application but if it is possible to do it with only the application binary that would also be interesting.

share|improve this question
add comment

2 Answers

editres

share|improve this answer
add comment

You can explore the resources of an existing window with editres. That's an interactive program, which lets you browse the resource tree, and find the location of a widget in that tree by clicking on the widget in the application. You can even modify a resource if the application supports it. That, however, requires that the application supports the Editres protocol, which is not so common even amongst the dwindling proportion of applications that use X resources. Furthermore, the GUI editres client is the only application I know of that knows how to send Editres queries, so no command line listing.

You can see what resource settings are defined for a particular application with appres. The application might support other settings. That's different from xrdb -query which only list settings that the user has explicitly overloaded (appres also lists system defaults).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.