LinuxCommandLibrary

appres

List application resource database values

SYNOPSIS

appres [ -a ] [ -l ] [ -s ] [ -u ] [ -V ] [ resource_name ... ] class_name [ instance_name ]

PARAMETERS

-a
    Show all resources in the database, not just those specific to the application.

-l
    List resources from the lowest level of the resource database, typically the most specific ones.

-s
    List resources from the highest level of the resource database, typically the least specific ones.

-u
    List resources that are unrecognized by the toolkit for the specified application or class.

-V
    Print the program version and exit.

resource_name ...
    One or more specific resource names to query from the database.

class_name
    The application class name (e.g., "XTerm", "Emacs") for which resources are queried. This argument is required.

instance_name
    The application instance name (e.g., "xterm", "emacs"). This argument is optional and provides more specific resource matching.

DESCRIPTION

appres is a utility for displaying resources specific to a given X application or class from the X resource database. It's primarily used by application developers and users for debugging and understanding how resources are applied. The command queries the merged resource database (constructed from .Xdefaults, application-specific resource files, and other sources) for entries matching the specified application class and optionally an instance name. It helps to verify if resources are being loaded correctly and if the precedence rules are working as expected. By default, it shows resources specifically scoped for the application, but options allow viewing all resources or focusing on unrecognized ones.

CAVEATS

appres relies on the X resource database being properly configured and accessible by the X server. The -a option can show resources not directly scoped to the specified application, which might require careful interpretation. A good understanding of X resource precedence rules is essential to effectively analyze the output.

RESOURCE FILES AND ENVIRONMENT VARIABLES

appres consults standard X resource files such as ~/.Xdefaults (or ~/.Xresources depending on configuration), application-specific resource files (often found in ~/.Xresources/), and files referenced by the XAPPLRESDIR environment variable. The XENVIRONMENT variable can also point to a specific file to be loaded. These files and variables define the resource database that appres queries.

HISTORY

appres is a standard utility within the X Window System distribution, dating back to early releases like X11R3 or X11R4. Its development is intertwined with the evolution of the X Toolkit Intrinsics (Xt) and the X resource manager, serving as a fundamental tool for debugging X client configurations and resource loading behaviors.

SEE ALSO

xrdb(1), editres(1)

Copied to clipboard