x.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Wed, 25 Apr 2012 16:57:51 +0300
changeset 1256 7ce42ae5477d
parent 1255 7cad4e6d59cd
child 1257 a0939a5f4042
permissions -rw-r--r--
Keyboard's keys under X window.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1032
4decc3e00bb6 Fix coding and contents.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1002
diff changeset
     1
.. -*- coding: utf-8 -*-
978
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     2
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     3
====
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     4
 X.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     5
====
1032
4decc3e00bb6 Fix coding and contents.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1002
diff changeset
     6
.. contents::
978
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     7
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     8
Standard.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     9
=========
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    10
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    11
See
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    12
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    13
  http://www.tronche.com/gui/x/icccm/
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    14
1141
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    15
Widget toolkit.
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    16
===============
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    17
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    18
  http://en.wikipedia.org/wiki/Widget_toolkit
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    19
                Widget toolkit
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    20
  http://en.wikipedia.org/wiki/List_of_widget_toolkits
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    21
                List of widget toolkits
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    22
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    23
GTK+.
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    24
-----
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    25
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    26
  http://en.wikipedia.org/wiki/GTK%2B
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    27
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    28
QT.
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    29
---
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    30
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    31
  http://en.wikipedia.org/wiki/Qt_%28toolkit%29
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    32
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    33
WxWidgets.
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    34
----------
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    35
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    36
  http://en.wikipedia.org/wiki/WxWidgets
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    37
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    38
Tk.
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    39
---
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    40
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    41
  http://en.wikipedia.org/wiki/Tk_%28computing%29
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    42
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    43
FLTK.
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    44
-----
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    45
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    46
  http://en.wikipedia.org/wiki/FLTK
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    47
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    48
Xaw.
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    49
----
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    50
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    51
  http://en.wikipedia.org/wiki/Xaw
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    52
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    53
GNUstep.
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    54
--------
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    55
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    56
  http://en.wikipedia.org/wiki/GNUstep
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    57
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    58
XView.
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    59
------
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    60
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    61
  http://en.wikipedia.org/wiki/XView
7c5ca700ff02 Widget toolkit.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1052
diff changeset
    62
978
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    63
Getting info about X window and X-related applications data.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    64
============================================================
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    65
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    66
Look for system registered resources::
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    67
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    68
  $ listres
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    69
  $ listres -all
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    70
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    71
  $ appres XTerm
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    72
  $ appres -name htop   # for xterm with running bash inside
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    73
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    74
Look for X resources of running applications::
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    75
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    76
  $ xprop -root
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    77
  $ xprop -name bash    # for xterm with running bash inside
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    78
1256
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    79
Keyboard's keys under X window.
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    80
===============================
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    81
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    82
  scancodes
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    83
                hardware-dependent codes generated by keystrokes and received by
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    84
                the X server.
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    85
  keycodes
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    86
                Codes sent by the X server to the client indicating which key
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    87
                was pressed. Keycodes by themselves do not indicate what the
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    88
                keystroke means; the client must request that information from
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    89
                the X server.
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    90
  modifiers
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    91
                Flags, such as ``shift'' and ``control,'' that the server sends
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    92
                with each keycode to the client. The client's interpretation of
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    93
                the keycode may depend on the state of the modifiers. For
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    94
                example, the state of the shift modifier determines whether an
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    95
                alphabetic character should be lowercase or uppercase. Because
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    96
                the X server encodes the states of the eight modifiers (shift,
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    97
                lock, control, mod1, mod2, mod3, mod4, and mod5) in a single
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    98
                byte of data, modifiers are often referred to as ``modifier
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
    99
                bits.''
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   100
  keysyms
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   101
                codes that specify the glyphs appearing on the keys. The X
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   102
                server also maintains a list of strings that describe the
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   103
                keysyms, such as ``a'', ``B'', and ``Control.''
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   104
1255
7cad4e6d59cd Find the keycode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1141
diff changeset
   105
Find the keycode.
7cad4e6d59cd Find the keycode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1141
diff changeset
   106
=================
1256
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   107
1255
7cad4e6d59cd Find the keycode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1141
diff changeset
   108
::
7cad4e6d59cd Find the keycode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1141
diff changeset
   109
7cad4e6d59cd Find the keycode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1141
diff changeset
   110
  $ xev
7cad4e6d59cd Find the keycode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1141
diff changeset
   111
  $ cat /usr/include/X11/keysymdef.h
7cad4e6d59cd Find the keycode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1141
diff changeset
   112
1256
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   113
Don't run under X::
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   114
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   115
  $ showkey
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   116
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   117
To do same under X::
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   118
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   119
  $ xev | sed -n 's=.*keycode \([0-9]*\).*=\1=p'
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   120
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   121
List key modifier::
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   122
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   123
  $ xmodmap -pm
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   124
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   125
Add keycode to modifier::
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   126
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   127
  $ xmodmap -e "add shift = Shift_R
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   128
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   129
Remove keycode from modifier::
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   130
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   131
  $ xmodmap -e "remove shift = Shift_L"
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   132
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   133
Examining the current keymap table::
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   134
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   135
  $ xmodmap -pk
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   136
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   137
  https://wiki.ubuntu.com/LaptopTesting/Keycodes
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   138
                Ubuntu Keycodes howto.
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   139
  http://en.gentoo-wiki.com/wiki/Multimedia_Keys
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   140
                Gentoo Multimedia Keys howto.
7ce42ae5477d Keyboard's keys under X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1255
diff changeset
   141
978
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   142
Making screenshort.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   143
===================
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   144
::
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   145
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   146
  $ sudo apt-get install scrot
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   147
  $ scrot -d <sec> <file>
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   148
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   149
or::
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   150
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   151
  $ sudo apt-get install imagemagic
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   152
  $ import -quality 100 -pause <sec> -silent <file>
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   153
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   154
Input method.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   155
=============
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   156
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   157
Input method by setxkbmap.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   158
--------------------------
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   159
::
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   160
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   161
  $ setxkbmap ru
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   162
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   163
  $ setxkbmap -rules xorg -model pc104 -layout "us,ru" -option "grp:rwin_toggle,grp_led:scroll" -variant ",winkeys"
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   164
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   165
Input method from xorg.conf.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   166
----------------------------
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   167
::
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   168
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   169
  Section "InputDevice"
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   170
      Identifier     "Keyboard0"
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   171
      Driver         "kbd"
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   172
      Option         "XkbModel" "pc105"
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   173
      Option         "XkbLayout" "us,ru"
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   174
      Option         "XkbVariant" ",winkeys"
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   175
      Option         "XkbOptions" "grp:rwin_switch,grp_led:scroll"
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   176
  EndSection
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   177
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   178
.Xdefaults
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   179
==========
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   180
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   181
The syntax of an Xdefaults file is as follows::
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   182
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   183
  [client. | *][{restriction.} | *]resource: value
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   184
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   185
where:
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   186
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   187
  client
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   188
                The name of the application, some program allow change it by
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   189
                '-name' option. This element is optional (can be substituated
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   190
                with wildcard).
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   191
  restriction
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   192
                Class names or name of specific class instance. The classes
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   193
                names conventionally start with an upper-case letter.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   194
  resource
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   195
                The name of the resource whose value is to be changed.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   196
                Resources are typically lowercase with uppercase
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   197
                concatenation.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   198
  value
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   199
                The actual value of the resource.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   200
  delimiters
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   201
                A period (.) is used to signify each step down into the
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   202
                hierarchy. A colon (:) is used to separate the resource
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   203
                declaration from the actual value.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   204
1052
fbbc2fb0a2ac Fix: (WARNING/2) Inline emphasis start-string without end-string.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1032
diff changeset
   205
Comment start with '!' char and goes up to end of line or C-like ``/* */``.
978
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   206
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   207
Use xprop utility to find classes and resources used by application.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   208
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   209
To reread your .Xresources file, and throw away your old resources::
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   210
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   211
  $ xrdb ~/.Xdefaults
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   212
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   213
To reread your .Xresources file, and keep your old resources::
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   214
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   215
 $ xrdb -merge ~/.Xdefaults
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   216
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   217
Example::
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   218
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   219
  *foreground: yellow
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   220
  XClock*foreground: pink
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   221
  Xman*topBox*foreground: blue
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   222
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   223
String value type.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   224
------------------
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   225
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   226
This can be path specification like '/usr/bin/firefox'.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   227
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   228
Colors value type.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   229
------------------
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   230
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   231
For color names see '/usr/lib/X11/rgb.txt'. Also you can use hex
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   232
representation #ffffff.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   233
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   234
Font value type.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   235
----------------
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   236
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   237
You can use either a full name, a wildcarded specification, or a font alias::
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   238
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   239
  XTerm*Font: -adobe-courier-bold-r-normal--14-140-75-75-m-90-iso8859-1
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   240
  XTerm*Font: *courier-bold-r*140*
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   241
  XTerm*Font: 7x14
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   242
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   243
Geometry value type.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   244
--------------------
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   245
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   246
  XCalc*geometry: 120x120-0-0
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   247
  XClock*geometry: -50+100
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   248
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   249
Cursor names value type.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   250
------------------------
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   251
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   252
Cursor resources require the name of the file in /usr/include/X11/bitmaps that
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   253
contains the cursor you want to use.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   254
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   255
  ScoTerm*pointerShape: gumby
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   256
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   257
Pixmaps value type.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   258
-------------------
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   259
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   260
Pixmaps are patterns, like bitmaps, that are used to texture or color an area
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   261
on your display. Pixmap resources are specified like cursors or bitmaps.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   262
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   263
Numebers value type.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   264
--------------------
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   265
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   266
  XLogo*borderWidth: 10
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   267
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   268
Boolean value type.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   269
-------------------
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   270
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   271
Some resources require a boolean value, such as 'true' or 'false', 'yes' or
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   272
'no', or 'on' or 'off'.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   273
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   274
Wildcard matching.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   275
------------------
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   276
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   277
The asterisk can be used as a wildcard, making it easy to write a single rule
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   278
that can be applied to many different applications or elements.
76aa572406cd Getting info about X window and X-related applications data.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
   279