Getting info about X window and X-related applications data.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 04 Sep 2011 12:38:06 +0300
changeset 978 76aa572406cd
parent 977 8af50fca6c56
child 979 52590c29451f
Getting info about X window and X-related applications data.
x.rst
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/x.rst	Sun Sep 04 12:38:06 2011 +0300
@@ -0,0 +1,169 @@
+-*- coding: utf-8 -*-
+
+====
+ X.
+====
+
+Standard.
+=========
+
+See
+
+  http://www.tronche.com/gui/x/icccm/
+
+Getting info about X window and X-related applications data.
+============================================================
+
+Look for system registered resources::
+
+  $ listres
+  $ listres -all
+
+  $ appres XTerm
+  $ appres -name htop   # for xterm with running bash inside
+
+Look for X resources of running applications::
+
+  $ xprop -root
+  $ xprop -name bash    # for xterm with running bash inside
+
+Making screenshort.
+===================
+::
+
+  $ sudo apt-get install scrot
+  $ scrot -d <sec> <file>
+
+or::
+
+  $ sudo apt-get install imagemagic
+  $ import -quality 100 -pause <sec> -silent <file>
+
+Input method.
+=============
+
+Input method by setxkbmap.
+--------------------------
+::
+
+  $ setxkbmap ru
+
+  $ setxkbmap -rules xorg -model pc104 -layout "us,ru" -option "grp:rwin_toggle,grp_led:scroll" -variant ",winkeys"
+
+Input method from xorg.conf.
+----------------------------
+::
+
+  Section "InputDevice"
+      Identifier     "Keyboard0"
+      Driver         "kbd"
+      Option         "XkbModel" "pc105"
+      Option         "XkbLayout" "us,ru"
+      Option         "XkbVariant" ",winkeys"
+      Option         "XkbOptions" "grp:rwin_switch,grp_led:scroll"
+  EndSection
+
+.Xdefaults
+==========
+
+The syntax of an Xdefaults file is as follows::
+
+  [client. | *][{restriction.} | *]resource: value
+
+where:
+
+  client
+                The name of the application, some program allow change it by
+                '-name' option. This element is optional (can be substituated
+                with wildcard).
+  restriction
+
+                Class names or name of specific class instance. The classes
+                names conventionally start with an upper-case letter.
+
+  resource
+                The name of the resource whose value is to be changed.
+                Resources are typically lowercase with uppercase
+                concatenation.
+  value
+                The actual value of the resource.
+  delimiters
+                A period (.) is used to signify each step down into the
+                hierarchy. A colon (:) is used to separate the resource
+                declaration from the actual value.
+
+Comment start with '!' char and goes up to end of line or C-like /* */.
+
+Use xprop utility to find classes and resources used by application.
+
+To reread your .Xresources file, and throw away your old resources::
+
+  $ xrdb ~/.Xdefaults
+
+To reread your .Xresources file, and keep your old resources::
+
+ $ xrdb -merge ~/.Xdefaults
+
+Example::
+
+  *foreground: yellow
+  XClock*foreground: pink
+  Xman*topBox*foreground: blue
+
+String value type.
+------------------
+
+This can be path specification like '/usr/bin/firefox'.
+
+Colors value type.
+------------------
+
+For color names see '/usr/lib/X11/rgb.txt'. Also you can use hex
+representation #ffffff.
+
+Font value type.
+----------------
+
+You can use either a full name, a wildcarded specification, or a font alias::
+
+  XTerm*Font: -adobe-courier-bold-r-normal--14-140-75-75-m-90-iso8859-1
+  XTerm*Font: *courier-bold-r*140*
+  XTerm*Font: 7x14
+
+Geometry value type.
+--------------------
+
+  XCalc*geometry: 120x120-0-0
+  XClock*geometry: -50+100
+
+Cursor names value type.
+------------------------
+
+Cursor resources require the name of the file in /usr/include/X11/bitmaps that
+contains the cursor you want to use.
+
+  ScoTerm*pointerShape: gumby
+
+Pixmaps value type.
+-------------------
+
+Pixmaps are patterns, like bitmaps, that are used to texture or color an area
+on your display. Pixmap resources are specified like cursors or bitmaps.
+
+Numebers value type.
+--------------------
+
+  XLogo*borderWidth: 10
+
+Boolean value type.
+-------------------
+
+Some resources require a boolean value, such as 'true' or 'false', 'yes' or
+'no', or 'on' or 'off'.
+
+Wildcard matching.
+------------------
+
+The asterisk can be used as a wildcard, making it easy to write a single rule
+that can be applied to many different applications or elements.
+