LinuxCommandLibrary

listres

List X server resources

SYNOPSIS

listres [-all] [-global] [-font] [-cursor] [-bitmap] [-pixmap] [-name <instance>] [-class <class>] [program_name]

PARAMETERS

-all
    Lists all resource specifications, including default values.

-global
    Lists only global resource specifications (those not tied to a specific program instance).

-font
    Lists only font resources.

-cursor
    Lists only cursor resources.

-bitmap
    Lists only bitmap resources.

-pixmap
    Lists only pixmap resources.

-name <instance>
    Lists resources for a specific application instance name (e.g., xterm for the terminal emulator).

-class <class>
    Lists resources for a specific application class name (e.g., XTerm for the terminal emulator class).

program_name
    Specifies the name of the program for which to list resources. If not provided, it lists global resources or resources for the current X session.

DESCRIPTION

listres is a utility for displaying resource specifications currently loaded in the X resource database. Often known as xlistres in modern X Window System distributions, it helps developers and power users debug and understand how X applications acquire their configurable properties like colors, fonts, and window geometry.

It queries the RESOURCE_MANAGER property on the root window or the ~/.Xdefaults file (and other X resource files) to show the values of resources for a given application or globally. This command is primarily used in an active X session for diagnosing resource-related issues and confirming that application resources are correctly applied.

CAVEATS

This command is part of the X Window System utilities and requires an active X server to function. It is primarily used for debugging and understanding X application resource loading, rather than general system administration. The command is more commonly known as xlistres in modern X.Org distributions, and `listres` might be an alias or a symbolic link to `xlistres`.

X RESOURCES

The X Window System uses a hierarchical resource database to allow users to customize the appearance and behavior of X applications. Resources can specify fonts, colors, window sizes, and many other properties, making applications highly configurable without recompilation.

RESOURCE PRECEDENCE

X resources are loaded from various sources with specific precedence rules. These sources include application defaults files, the ~/.Xdefaults or ~/.Xresources file, and the RESOURCE_MANAGER property on the root window. listres helps visualize the effectively loaded resources after these precedence rules have been applied.

HISTORY

listres originates from the early days of the X Window System, developed as a tool to help developers and users manage and understand the complex resource system used by X applications for customization. It provided a crucial way to inspect what resources an application was set to use. Over time, its name evolved, and it is now typically distributed as xlistres within the xorg-x11-apps or similar packages, maintaining its core functionality for querying the X resource database.

SEE ALSO

xrdb(1), appres(1), xprop(1)

Copied to clipboard