480 lines
17 KiB
HTML
480 lines
17 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of XPROP</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>XPROP</H1>
|
|
Section: User Commands (1)<BR>Updated: xprop 1.2.4<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
xprop - property displayer for X
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>xprop</B>
|
|
|
|
[-help] [-grammar] [-id <I>id</I>] [-root] [-name <I>name</I>]
|
|
[-frame]
|
|
[-font <I>font</I>]
|
|
[-display <I>display</I>]
|
|
[-len <I>n</I>] [-notype] [-fs <I>file</I>]
|
|
[-remove <I>property-name</I>]
|
|
[-set <I>property-name</I> <I>value</I>]
|
|
[-spy]
|
|
[-version]
|
|
[-f <I>atom</I> <I>format</I> [<I>dformat</I>]]*
|
|
[<I>format</I> [<I>dformat</I>] <I>atom</I>]*
|
|
<A NAME="lbAD"> </A>
|
|
<H2>SUMMARY</H2>
|
|
|
|
<P>
|
|
|
|
The
|
|
<I>xprop</I>
|
|
|
|
utility is for displaying window and font properties in an X server.
|
|
One window or font is selected using the command
|
|
line arguments or possibly in the case of a window, by clicking on the desired
|
|
window. A list of properties is then given, possibly with formatting
|
|
information.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-help</B>
|
|
|
|
<DD>
|
|
Print out a summary of command line options.
|
|
</DL>
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="2"><B>-grammar</B>
|
|
|
|
<DD>
|
|
Print out a detailed grammar for all command line options.
|
|
</DL>
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="3"><B>-id </B><I>id</I>
|
|
|
|
<DD>
|
|
This argument allows the user to select window <I>id</I> on the
|
|
command line rather than using the pointer to select the target window.
|
|
This is very useful in debugging X applications where the target
|
|
window is not mapped to the screen or where the use of the pointer might
|
|
be impossible or interfere with the application.
|
|
</DL>
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="4"><B>-name </B><I>name</I>
|
|
|
|
<DD>
|
|
This argument allows the user to specify that the window named <I>name</I>
|
|
is the target window on the command line rather than using the pointer to
|
|
select the target window.
|
|
</DL>
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="5"><B>-font </B><I>font</I>
|
|
|
|
<DD>
|
|
This argument allows the user to specify that the properties of font
|
|
<I>font</I> should be displayed.
|
|
</DL>
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="6"><B>-root</B>
|
|
|
|
<DD>
|
|
This argument specifies that X's root window is the target window.
|
|
This is useful in situations where the root window is completely
|
|
obscured.
|
|
</DL>
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="7"><B>-display </B><I>display</I>
|
|
|
|
<DD>
|
|
This argument allows you to specify the server to connect to;
|
|
see <I><A HREF="/cgi-bin/man/man2html?7+X">X</A>(7)</I>.
|
|
</DL>
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="8"><B>-len </B><I>n</I>
|
|
|
|
<DD>
|
|
Specifies that at most <I>n</I> bytes of any property should be read or
|
|
displayed.
|
|
</DL>
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="9"><B>-notype</B>
|
|
|
|
<DD>
|
|
Specifies that the type of each property should not be displayed.
|
|
</DL>
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="10"><B>-fs </B><I>file</I>
|
|
|
|
<DD>
|
|
Specifies that file <I>file</I> should be used as a source of more formats
|
|
for properties.
|
|
</DL>
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="11"><B>-frame</B>
|
|
|
|
<DD>
|
|
Specifies that when selecting a window by hand (i.e. if none of <B>-name</B>,
|
|
<B>-root</B>, or <B>-id</B> are given), look at the window manager frame (if
|
|
any) instead of looking for the client window.
|
|
</DL>
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="12"><B>-remove </B><I>property-name</I>
|
|
|
|
<DD>
|
|
Specifies the name of a property to be removed from the indicated window.
|
|
</DL>
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="13"><B>-set </B><I>property-name</I> <I>value</I>
|
|
|
|
<DD>
|
|
Specifies the name of a property and a property value, to be set on the
|
|
indicated window.
|
|
</DL>
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="14"><B>-spy</B>
|
|
|
|
<DD>
|
|
Examine window properties forever, looking for property change events.
|
|
</DL>
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="15"><B>-version</B>
|
|
|
|
<DD>
|
|
Print program version information and exit.
|
|
</DL>
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="16"><B>-f </B><I>name</I> <I>format</I> [<I>dformat</I>]
|
|
|
|
<DD>
|
|
Specifies that the <I>format</I> for <I>name</I> should be <I>format</I> and that
|
|
the <I>dformat</I> for <I>name</I> should be <I>dformat</I>. If <I>dformat</I>
|
|
is missing, " = $0+\n" is assumed.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
For each of these properties, its value on the selected window
|
|
or font is printed using the supplied formatting information if any. If no
|
|
formatting information is supplied, internal defaults are used. If a property
|
|
is not defined on the selected window or font, "not defined" is printed as the
|
|
value for that property. If no property list is given, all the properties
|
|
possessed by the selected window or font are printed.
|
|
<P>
|
|
|
|
A window may be selected in one of four ways. First, if the desired window
|
|
is the root window, the -root argument may be used.
|
|
If the desired window is not the root window, it may be selected
|
|
in two ways on the command line, either by id number such as might be obtained
|
|
from <I>xwininfo</I>, or by name if the window possesses a name. The -id
|
|
argument selects a window by id number in either decimal or hex (must start
|
|
with 0x) while the -name argument selects a window by name.
|
|
<P>
|
|
|
|
The last way to select a window does not involve the command line at all.
|
|
If none of -font, -id, -name, and -root are specified, a crosshairs cursor
|
|
is displayed and the user is allowed to choose any visible window by pressing
|
|
any pointer button in the desired window. If it is desired to display properties
|
|
of a font as opposed to a window, the -font argument must be used.
|
|
<P>
|
|
|
|
Other than the above four arguments and the -help argument for obtaining help,
|
|
and the -grammar argument for listing the full grammar for the command line,
|
|
all the other command line arguments are used in specifying both the format
|
|
of the properties to be displayed and how to display them. The -len <I>n</I>
|
|
argument specifies that at most <I>n</I> bytes of any given property will be
|
|
read and displayed. This is useful for example when displaying the cut buffer
|
|
on the root window which could run to several pages if displayed in full.
|
|
<P>
|
|
|
|
Normally each property name is displayed by printing first the property
|
|
name then its type (if it has one) in parentheses followed by its value.
|
|
The -notype argument specifies that property types should not be
|
|
displayed. The -fs argument is used to specify a file containing a list of
|
|
formats for properties while the -f argument is used to specify the format
|
|
for one property.
|
|
<P>
|
|
|
|
The formatting information for a property actually consists of two parts,
|
|
a <I>format</I> and a <I>dformat</I>. The <I>format</I> specifies the actual
|
|
formatting of the property (i.e., is it made up of words, bytes, or longs?,
|
|
etc.) while the <I>dformat</I> specifies how the property should be displayed.
|
|
<P>
|
|
|
|
The following paragraphs describe how to construct <I>format</I>s and
|
|
<I>dformat</I>s. However, for the vast majority of users and uses, this should
|
|
not be necessary as the built in defaults contain the <I>format</I>s and
|
|
<I>dformat</I>s necessary to display all the standard properties. It should
|
|
only be necessary to specify <I>format</I>s and <I>dformat</I>s
|
|
if a new property is being dealt with or the user dislikes the standard display
|
|
format. New users especially are encouraged to skip this part.
|
|
<P>
|
|
|
|
A <I>format</I> consists of one of 0, 8, 16, or 32 followed by a sequence of one
|
|
or more format characters. The 0, 8, 16, or 32 specifies how many bits per
|
|
field there are in the property. Zero is a special case meaning use the
|
|
field size information associated with the property itself. (This is only
|
|
needed for special cases like type INTEGER which is actually three different
|
|
types depending on the size of the fields of the property.)
|
|
<P>
|
|
|
|
A value of 8 means
|
|
that the property is a sequence of bytes while a value of 16 would mean that
|
|
the property is a sequence of words. The difference between these two lies in
|
|
the fact that the sequence of words will be byte swapped while the sequence of
|
|
bytes will not be when read by a machine of the opposite byte order of the
|
|
machine that originally wrote the property. For more information on how
|
|
properties are formatted and stored, consult the Xlib manual.
|
|
<P>
|
|
|
|
Once the size of the fields has been specified, it is necessary to specify
|
|
the type of each field (i.e., is it an integer, a string, an atom, or what?)
|
|
This is done using one format character per field. If there are more fields
|
|
in the property than format characters supplied, the last character will be
|
|
repeated as many times as necessary for the extra fields. The format
|
|
characters and their meaning are as follows:
|
|
<DL COMPACT>
|
|
<DT id="17">a<DD>
|
|
The field holds an atom number. A field of this type should be of size 32.
|
|
<DT id="18">b<DD>
|
|
The field is an boolean. A 0 means false while anything else means true.
|
|
<DT id="19">c<DD>
|
|
The field is an unsigned number, a cardinal.
|
|
<DT id="20">i<DD>
|
|
The field is a signed integer.
|
|
<DT id="21">m<DD>
|
|
The field is a set of bit flags, 1 meaning on.
|
|
<DT id="22">o<DD>
|
|
The field is an array of icons, packed as a sequence of 32 bit numbers
|
|
consisting of the width, height and ARGB pixel values, as defined for
|
|
the _NET_WM_ICON property in the <I>Extended Window Manager Hints</I>
|
|
specification. A field of this type must be of size 32.
|
|
<DT id="23">s<DD>
|
|
This field and the next ones until either a 0 or the end of the property
|
|
represent a sequence of bytes. This format character is only usable with
|
|
a field size of 8 and is most often used to represent a string.
|
|
<DT id="24">t<DD>
|
|
This field and the next ones until either a 0 or the end of the property
|
|
represent an internationalized text string. This format character is only
|
|
usable with a field size of 8. The string is assumed to be in an ICCCM
|
|
compliant encoding and is converted to the current locale encoding before
|
|
being output.
|
|
<DT id="25">u<DD>
|
|
This field and the next ones until either a 0 or the end of the property
|
|
represent an UTF-8 encoded unicode string. This format character is only
|
|
usable with a field size of 8. If the string is found to be an invalid
|
|
character, the type of encoding violation is printed instead, followed by
|
|
the string formatted using 's'. When in an environment not capable of
|
|
displaying UTF-8 encoded string, behaviour is identical to 's'.
|
|
<DT id="26">x<DD>
|
|
The field is a hex number (like 'c' but displayed in hex - most useful
|
|
for displaying window ids and the like)
|
|
</DL>
|
|
<P>
|
|
|
|
An example <I>format</I> is 32ica which is the format for a property of three
|
|
fields of 32 bits each, the first holding a signed integer, the second an
|
|
unsigned integer, and the third an atom.
|
|
<P>
|
|
|
|
The format of a <I>dformat</I> unlike that of a <I>format</I> is not so rigid.
|
|
The only limitations on a <I>dformat</I> is that one may not start with a letter
|
|
or a dash. This is so that it can be distinguished from a property name or
|
|
an argument. A <I>dformat</I> is a text string containing special characters
|
|
instructing that various fields be printed at various points in a manner similar
|
|
to the formatting string used by printf. For example, the <I>dformat</I>
|
|
" is ( $0, $1 \)\n" would render the POINT 3, -4 which has a <I>format</I> of
|
|
32ii as " is ( 3, -4 )\n".
|
|
<P>
|
|
|
|
Any character other than a $, ?, \, or a ( in a <I>dformat</I> prints as
|
|
itself. To print out one of $, ?, \, or ( precede it by a \. For example,
|
|
to print out a $, use \$. Several special backslash sequences are provided
|
|
as shortcuts. \n will cause a newline to be displayed while \t will
|
|
cause a tab to be displayed. \<I>o</I> where <I>o</I> is an octal number
|
|
will display character number <I>o</I>.
|
|
<P>
|
|
|
|
A $ followed by a number <I>n</I> causes field number <I>n</I> to be
|
|
displayed. The format of the displayed field depends on the formatting
|
|
character used to describe it in the corresponding <I>format</I>. I.e., if
|
|
a cardinal is described by 'c' it will print in decimal while if it is
|
|
described by a 'x' it is displayed in hex.
|
|
<P>
|
|
|
|
If the field is not present in
|
|
the property (this is possible with some properties), <field not available>
|
|
is displayed instead. $<I>n</I>+ will display field number <I>n</I> then a
|
|
comma then field number <I>n</I>+1 then another comma then ... until the last
|
|
field defined. If field <I>n</I> is not defined, nothing is displayed.
|
|
This is useful for a property that is a list of values.
|
|
<P>
|
|
|
|
A ? is used to start a conditional expression, a kind of if-then statement.
|
|
?<I>exp</I>(<I>text</I>) will display <I>text</I> if and only if <I>exp</I> evaluates to
|
|
non-zero. This is useful for two things. First, it allows fields to be
|
|
displayed if and only if a flag is set.
|
|
And second, it allows a value such as a state
|
|
number to be displayed as a name rather than as just a number. The syntax of
|
|
<I>exp</I> is as follows:
|
|
<DL COMPACT>
|
|
<DT id="27"><I>exp</I><DD>
|
|
::= <I>term</I> | <I>term</I>=<I>exp</I> | !<I>exp</I>
|
|
<DT id="28"><I>term</I><DD>
|
|
::= <I>n</I> | $<I>n</I> | m<I>n</I>
|
|
</DL>
|
|
<P>
|
|
|
|
The ! operator is a logical ``not'', changing 0 to 1 and any non-zero value to 0.
|
|
= is an equality operator. Note that internally all expressions are evaluated
|
|
as 32 bit numbers so -1 is not equal to 65535. = returns 1 if the two values
|
|
are equal and 0 if not.
|
|
<I>n</I> represents the constant value <I>n</I> while $<I>n</I> represents the
|
|
value of field number <I>n</I>.
|
|
m<I>n</I> is 1 if flag number <I>n</I> in the first field having format
|
|
character 'm' in the corresponding <I>format</I> is 1, 0 otherwise.
|
|
<P>
|
|
|
|
Examples: ?m3(count: $3\n) displays field 3 with a label of count if and only if flag
|
|
number 3 (count starts at 0!) is on. ?$2=0(True)?!$2=0(False) displays the
|
|
inverted value of field 2 as a boolean.
|
|
<P>
|
|
|
|
In order to display a property, <I>xprop</I> needs both a <I>format</I> and a
|
|
<I>dformat</I>. Before <I>xprop</I> uses its default values of a <I>format</I>
|
|
of 32x and a <I>dformat</I> of " = { $0+ }\n", it searches several places
|
|
in an attempt to find more specific formats.
|
|
First, a search is made using the name of the property. If this
|
|
fails, a search is made using the type of the property. This allows type
|
|
STRING to be defined with one set of formats while allowing property WM_NAME
|
|
which is of type STRING to be defined with a different format. In this way,
|
|
the display formats for a given type can be overridden for specific properties.
|
|
<P>
|
|
|
|
The locations searched are in order: the format if any specified with the
|
|
property name (as in 8x WM_NAME), the formats defined by -f options in last to
|
|
first order, the contents of the file specified by the -fs option if any,
|
|
the contents of the file specified by the environmental variable XPROPFORMATS
|
|
if any, and finally <I>xprop</I>'s built in file of formats.
|
|
<P>
|
|
|
|
The format of the files referred to by the -fs argument and the XPROPFORMATS
|
|
variable is one or more lines of the following form:
|
|
<P>
|
|
|
|
<I>name</I> <I>format</I> [<I>dformat</I>]
|
|
<P>
|
|
|
|
Where <I>name</I> is either the name of a property or the name of a type,
|
|
<I>format</I> is the <I>format</I> to be used with <I>name</I> and <I>dformat</I>
|
|
is the <I>dformat</I> to be used with <I>name</I>. If <I>dformat</I> is not
|
|
present, " = $0+\n" is assumed.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
<P>
|
|
|
|
To display the name of the root window: <I>xprop</I> -root WM_NAME
|
|
<P>
|
|
|
|
To display the window manager hints for the clock: <I>xprop</I> -name xclock
|
|
WM_HINTS
|
|
<P>
|
|
|
|
To display the start of the cut buffer: <I>xprop</I> -root -len 100 CUT_BUFFER0
|
|
<P>
|
|
|
|
To display the point size of the fixed font: <I>xprop</I> -font fixed POINT_SIZE
|
|
<P>
|
|
|
|
To display all the properties of window # 0x200007: <I>xprop</I> -id 0x200007
|
|
<P>
|
|
|
|
To set a simple string property: <I>xprop</I> -root -format MY_ATOM_NAME 8s -set MY_ATOM_NAME "my_value"
|
|
<A NAME="lbAH"> </A>
|
|
<H2>ENVIRONMENT</H2>
|
|
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="29"><B>DISPLAY</B>
|
|
|
|
<DD>
|
|
To get default display.
|
|
<DT id="30"><B>XPROPFORMATS</B>
|
|
|
|
<DD>
|
|
Specifies the name of a file from which additional formats are to be obtained.
|
|
</DL>
|
|
<P>
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<A HREF="/cgi-bin/man/man2html?7+X">X</A>(7), <A HREF="/cgi-bin/man/man2html?1+xdpyinfo">xdpyinfo</A>(1), <A HREF="/cgi-bin/man/man2html?1+xwininfo">xwininfo</A>(1),
|
|
<A HREF="/cgi-bin/man/man2html?1+xdriinfo">xdriinfo</A>(1), <A HREF="/cgi-bin/man/man2html?1+glxinfo">glxinfo</A>(1), <A HREF="/cgi-bin/man/man2html?1+xvinfo">xvinfo</A>(1)
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
Mark Lillibridge, MIT Project Athena
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="31"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="32"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="33"><A HREF="#lbAD">SUMMARY</A><DD>
|
|
<DT id="34"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="35"><A HREF="#lbAF">DESCRIPTION</A><DD>
|
|
<DT id="36"><A HREF="#lbAG">EXAMPLES</A><DD>
|
|
<DT id="37"><A HREF="#lbAH">ENVIRONMENT</A><DD>
|
|
<DT id="38"><A HREF="#lbAI">SEE ALSO</A><DD>
|
|
<DT id="39"><A HREF="#lbAJ">AUTHOR</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:31 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|