< Guide to X11

Xt Clients

This window from "xman" contains three rectangular buttons. Each button is a widget using the X Toolkit Intrinsics.

Some X clients are Xt clients, that is, they use the X Toolkit Intrinsics. This is a mechanism to divide a window into smaller windows called widgets such as buttons and menus. You can configure these widgets using X resources.

For example, a typical "xterm" window contains a scroll bar and the emulated screen of the terminal. The "xman" program, for viewing manual pages, contains three widgets of buttons on its tiny main screen. By using the "Manual Page" button, you obtain a larger window with several widgets: menu buttons, a scroll bar, and a text box containing the manual page.

However, developers of libraries like GTK+ and Qt have decided not to use these intrinsics. Thus, X resources are not available to GTK+ and Qt programs.

The X resources are settings that you write in a text file in a certain syntax and then load with xrdb.

xrdb

To set X resources, you need to put them in some text file like ~/.Xresources and then load it with:

$ xrdb -merge ~/.Xresources

There is a difference between "XTerm.resource" and "xterm.resource".

If you want one xterm to use the resources "GameTerm.resource" instead of "XTerm.resource", you would start it with:

$ xterm -class GameTerm

xrdb with standard input

You can also input resources using standard input.

xterm

xterm has menus. You must hold Control and click with mouse button 1, 2, or 3.

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.