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.

Is there some way to inspect which .Xresources settings are in effect at the moment (unlike xrdb -query)? For example, I'm on a host which doesn't seem to respect *reverseVideo: true, but I don't know whether that is because I wrote it the wrong way (even *florb: glorb doesn't raise an error when running xrdb -merge $HOME/.Xresources), because the setting is not supported, or some other reason.

share|improve this question

3 Answers 3

up vote 4 down vote accepted

xrdb -query lists the resources that are explicitly loaded on the X server.

appres lists the resources that an application would receive. This includes system defaults (typically found in a directories like /usr/X11R6/lib/X11/app-defaults or /etc/X11/app-defaults) as well as the resources explicitly set on the server with xrdb. You can restrict a particular class and instance, e.g. appres XTerm foo to see what resources apply to an xterm invoked with xterm -name foo.

The X server only stores a list of settings. It cannot know whether a widget will actually make use of these settings. Invalid resource names go unnoticed because you are supposed to be able to set resources at a high level in the hierarchy, and they will only apply to the components for which they are relevant and not overridden.

X resource specs obey fairly intricate precedence rules. If one of your settings doesn't seem to apply, the culprit is sometimes a system default that takes precedence because it's more specific. Look at the output of appres Class to see if there's a system setting for something.reverseVideo. If your application is one of the few that support the Editres protocol, you can inspect its resource tree with the editres program.

share|improve this answer

There is a difference as to if resources are loaded into an X11 server and they're loaded by a client. For instance, you could change the server's resources after launching a client.

To get the current server resources, you can use 'xrdb -query -all'.

For getting the current client resources, I'm not aware of a solution, but editres(1) will allow you to send resources to a compliant client while it is running. You'll probably have luck with applications that use the Xaw and Motif-era toolkits, but less (or no) luck with GTK and QT applications. A good example is 'xterm', you can turn the scrollbar on and off via editres without restarting the client.

share|improve this answer

Doesn't xrdb -query -all do what you want?

I have some fairly unorthodox settings loaded at X-startup from my .Xresources, and it gives them back to me:

 6:14AM 68 % xrdb -all -query
XTerm*VT100*translations:       #override \n <Key>F2: insert-selection(PRIMARY,CUT_BUFFER0)
XTerm*VT100.charClass:  33:48,35:48,37:48,42:48,45-47:48,64:48,95:48,126:48
XTerm*VT100.cutNewLine: false
XTerm*VT100.cutToBeginningOfLine:       false
XTerm*VT100.saveLines:  1000
XTerm*VT100.scrollBar:  true
scrollstyle:    plain
share|improve this answer

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.