AIX for PS/2 X Windows User's Guide

                                                         AIX Operating System
                                                            IBM AIX X-Windows
                                                                 User's Guide
                   Chapter 2.  AIX X-Windows Commands

   2.0 Chapter 2.  AIX X-Windows Commands, Chapter 2, sections 7-12

2.7 keycomp
   2.7.1 Keycomp Source File
   2.7.2 Keycomp Source File Items
   2.7.3 Keycomp Source File Control Statements
2.8 X
2.9 xclock
   2.9.1 .Xdefaults Keywords
2.10 xhost
2.11 xinit
2.12 xopen
   2.12.1 .Xdefaults Keywords
 

2.7 keycomp

   Purpose   Reads a textual description of the keyboard and produces a binary keymap file.

   Syntax

   PICTURE 13

   Description
   The keycomp command reads a textual description of the keyboard and produces a binary keymap file.  The keymap file is used to translate keystrokes into character strings.  For more information on the keymap file, see "Keyboard Specification" in topic 2.3.3.

   The keycomp command supports the full range of HFT keyboard mapping, including the Alt Graphic shift state, on non-U.S. keyboards only.

   You can use keycomp to define diacritical keys (dead keys).  The code-point combinations that produce the actual diacritical characters are predefined and cannot be changed using keycomp.  The pre-defined combinations are listed in the data stream section of the AIX Operating System Technical Reference.

   Seven different states are supported in the base keymap files.  Additional states are either mapped to single states or defined as UNBOUND (return nothing) for the keymap files.

2.7.1 Keycomp Source File

   The input file to keycomp consists of one or more lines, each beginning with an octal, decimal, or hexadecimal number designating an X-Windows keysym value.  (A keysym is a symbol that has been engraved on a keyboard key.)  Items follow the keysym, each representing the binding for a particular combination of the Ctrl, Alt, Shift, Lock, and Alt Graphic keys.  Items on the line are separated by a space.

   If only one item is present on a line, it represents the binding for this keysym regardless of the position of the shift keys.  The first 16 states are required in the source file.  If more than 16, but fewer than 32 states are provided, the last state is extended to all the missing states up to state 32.

   The bindings of items are made in the order defined below:

   +------------------------------------------------------------------+
   ¦ Table  2-1. Keycomp                                              ¦
   +------------------------------------------------------------------¦
   ¦ #1   ¦ Base state; no Ctrl, Alt, Shift, Lock, or Alt Graphic     ¦
   ¦      ¦ down                                                      ¦
   +------+-----------------------------------------------------------¦
   ¦ #2   ¦ Shift down                                                ¦
   +------+-----------------------------------------------------------¦
   ¦ #3   ¦ Lock down                                                 ¦
   +------+-----------------------------------------------------------¦
   ¦ #4   ¦ Lock and Shift down                                       ¦
   +------+-----------------------------------------------------------¦
   ¦ #5   ¦ Ctrl down                                                 ¦
   +------+-----------------------------------------------------------¦
   ¦ #6   ¦ Ctrl and Shift down                                       ¦
   +------+-----------------------------------------------------------¦
   ¦ #7   ¦ Ctrl and Lock down                                        ¦
   +------+-----------------------------------------------------------¦
   ¦ #8   ¦ Ctrl, Lock, and Shift down                                ¦
   +------+-----------------------------------------------------------¦
   ¦ #9   ¦ Alt down                                                  ¦
   +------+-----------------------------------------------------------¦
   ¦ #10  ¦ Alt and Shift down                                        ¦
   +------+-----------------------------------------------------------¦
   ¦ #11  ¦ Alt and Lock down                                         ¦
   +------+-----------------------------------------------------------¦
   ¦ #12  ¦ Alt, Lock, and Shift down                                 ¦
   +------+-----------------------------------------------------------¦
   ¦ #13  ¦ Alt and Ctrl down                                         ¦
   +------+-----------------------------------------------------------¦
   ¦ #14  ¦ Alt, Ctrl, and Shift down                                 ¦
   +------+-----------------------------------------------------------¦
   ¦ #15  ¦ Alt, Ctrl, and Lock down                                  ¦
   +------+-----------------------------------------------------------¦
   ¦ #16  ¦ Alt, Ctrl, Lock, and Shift down                           ¦
   +------+-----------------------------------------------------------¦
   ¦ #17  ¦ Alt Graphic down                                          ¦
   +------+-----------------------------------------------------------¦
   ¦ #18  ¦ Alt Graphic and Shift down                                ¦
   +------+-----------------------------------------------------------¦
   ¦ #19  ¦ Alt Graphic and Lock down                                 ¦
   +------+-----------------------------------------------------------¦
   ¦ #20  ¦ Alt Graphic, Lock, and Shift down                         ¦
   +------+-----------------------------------------------------------¦
   ¦ #21  ¦ Alt Graphic and Ctrl down                                 ¦
   +------+-----------------------------------------------------------¦
   ¦ #22  ¦ Alt Graphic, Ctrl, and Shift down                         ¦
   +------+-----------------------------------------------------------¦
   ¦ #23  ¦ Alt Graphic, Ctrl, and Lock down                          ¦
   +------+-----------------------------------------------------------¦
   ¦ #24  ¦ Alt Graphic, Ctrl, Lock, and Shift down                   ¦
   +------+-----------------------------------------------------------¦
   ¦ #25  ¦ Alt Graphic and Alt down                                  ¦
   +------+-----------------------------------------------------------¦
   ¦ #26  ¦ Alt Graphic, Alt, and Shift down                          ¦
   +------+-----------------------------------------------------------¦
   ¦ #27  ¦ Alt Graphic, Alt, and Lock down                           ¦
   +------+-----------------------------------------------------------¦
   ¦ #28  ¦ Alt Graphic, Alt, Lock, and Shift down                    ¦
   +------+-----------------------------------------------------------¦
   ¦ #29  ¦ Alt Graphic, Alt, and Ctrl down                           ¦
   +------+-----------------------------------------------------------¦
   ¦ #30  ¦ Alt Graphic, Alt, Ctrl, and Shift down                    ¦
   +------+-----------------------------------------------------------¦
   ¦ #31  ¦ Alt Graphic, Alt, Ctrl, and Lock down                     ¦
   +------+-----------------------------------------------------------¦
   ¦ #32  ¦ Alt Graphic, Alt, Ctrl, Lock, and Shift down              ¦
   +------------------------------------------------------------------+

2.7.2 Keycomp Source File Items

   Each item should be one of the following:

   An octal, decimal or hexadecimal number, indicating a keysym.
   A C character literal surrounded by single quotes.  Escape sequences
     (such as \252) are allowed.
   A C string literal surrounded by double quotes.  Standard C escape
     sequences are allowed within the string.
   The letter U, indicating no binding.  If there is no binding,
       XLookupMapping returns an empty string for this key combination.
   The string format "Dnn." to define a key position as a diacritical
      key.  There are 15 pre-defined diacritical keys.  XLookupMapping
      combines a specified diacritical key with the following key pressed 
      to determine the actual code point to be returned.  The code point
      returned is based on the pre-defined diacritical lookup table.
      Strings "D01" through "D15" are not allowed for keycomp.

   A comma can, but does not need to, follow each item.  A space or tab must separate the items, regardless of whether a comma follows each item.  A \ (backslash) after an item indicates that the item list is continued on the next line.  The \ should not be enclosed in single or double quotes.

   Blank lines are ignored, as are lines beginning with a # character (except control statements).  All text between # and the following line, including \, is ignored unless # is part of a string enclosed in single or double quotes.  This allows you to place comments at the end of a line that contains only a single item.

   The keycomp command can identify function key strings and compress these within the keymap file.  The set of function key strings is defined in the keyboard section of AIX Operating System Technical Reference.

   The source must specify the exact string to be returned.

   See the files /usr/include/X11/AIXkeymap.h and /usr/include/X11/keysymdef.h for a list of keysyms and key names of function keys.

2.7.3 Keycomp Source File Control Statements

   Control statements recognized by keycomp:

1.  #S Control Statement
       Lines starting with #S in the first column define which states are defined within the keycomp table.  This statement allows the states not being used to be compressed out of the keymap file.  If this line is not specified, it is assumed that all states are built into the table.  All states must be coded in the source file.

       The states not included in #S are UNBOUND and return nothing unless remapped to another state (see the #M control statement).

       The keycomp object file provides a state_mapping_table to map keyboard-state flags to indexes in the table.  The state_mapping_table maps the state detail of a KeyPressed event from an X Server to an index within the keymap table.

       Following #S is a series of numbers representing the states defined in Table 2-1 in topic 2.7.1.  The states provided are built into the table in the order in which they are defined.

       For example, the Alt key is normally mapped to index 9 in the keymap file.  With the following definition:

         #S 1 2 3 5 9 17

       the Alt key is mapped to index 5 because state #9 is the fifth state in the #S statement.

2.  #M Control Statement
       Lines starting with #M in the first column define mapping of states to an index within the keymap table.  This statement allows specification of a state hierarchy as defined for the RT and allows mapping of multiple states to a single state.  For example, the #M statement enables Ctrl-Shift keys to be mapped to Ctrl keys.

       The format of a #M line is:
        #M STATE s1 s2 ... sn

       where states s1, s2, ... sn are mapped to state STATE.  STATE is a base state depending on the #S specifications.

       The #M line must follow all #S lines.  Multiple #M lines can be specified but must be specified after the #S statement.

       For example, the following line:
         #M 9 10 12

       maps the Alt-Shift and Alt-Lock-Shift states to Alt.

   To be compatible with Keyboard Description and Character Reference, keyboard files supplied with X-Windows contain the following control statements:
     #S 1 2 3 4 5 9 17
     #M 5 6 7 8 13 14 15 16 21 22 23 24 29 30 31 32
     #M 9 10 11 12 25 26 27 28
     #M 17 18 19 20

Flags

<infile                 Specifies a source file to be compiled by keycomp.

>outfile                Specifies the name of the keymap file to be created.

Files
       /usr/include/X11/AIXkeymap.h
       /usr/include/X11/keysymdef.h

2.8 X

   Purpose Starts the X Server.

   Syntax

   PICTURE 14

   Description
   The X Server is a display server that runs on computers with bitmapped terminals.  (The X Server command does not run on the S/370 system.)  The X Server distributes user input to and accepts output requests from programs located either on the host system or on systems connected to it through a network.

   Unless you specify otherwise, only programs running on the host system can interact with the display.  To allow another system to use your display, you must define that system to a specific X Server with the xhost command. For more information on the xhost command, see "xhost" in topic 2.10.

   After the X Server is initialized, it sends unix:? AIX X-Windows to standard output, where ? is the display number.  This string is used by the xinit command to set the default DISPLAY environment variable.

   The X Server and all windows opened from it can be terminated with Ctrl-Alt-Backspace.  Remote windows usually display an error message concerning a broken connection before they terminate.

   The X Server logs messages in the file /tmp/.X11-unix/X?, where ? is the display number.

X Flags
   The following flags have default values supplied with the program:

-a num 
     Specifies the acceleration.  The default is 4.  The  acceleration is a multiplier for mouse movement.  For  example, specifying 4 causes the cursor to move four times as  fast as the mouse.  The specified value must be a positive value greater than zero.

-bp color 
    Specifies a Blackpixel color for the display.  Generally, the Blackpixel value corresponds to the background color.  The  default depends on the display.

-c num
      Specifies key click volume (RT Only!).  The default is -1 or medium. Values supported are:
                0              off
                1 - 33         low
                -1 or 34 - 66  medium
                67 - 100       high

-D file
     Full path name of the color definition database file The default is /usr/lpp/X11/rgb/rgb. Refer to "dbm" in the IBM RT AIX Operating System Technical Reference.

-f num
      Specifies the beep volume (RT Only!).  The default is -1 or medium.  The supported values are the same as those supported for the -c num flag.

-fc font
    Specifies the cursor font for cursor glyphs and cursor masks.  The default depends on the operating system and the display.

-fn font
    Specifies text font used as default text font.  Default depends on operating system and  display.

-fp font
    Specifies the path for fonts.  The default depends on the operating system and the display.

-m
          Specifies the use of monochrome display characteristics. (RT only)

-n :num
     Specifies the connection number.  Valid values for num are 0 to 255.  The default is the next available number. num is used by programs to communicate with a specific X Server.
                For example, the command:   X -n :18 specifies that communication to the activated X Server takes place by unix:18 or by hostname:18.

-p num
      Specifies the screen saver interval.  This flag is used with the -s (screen saver timeout) flag to control the blanking of the screen.

-r
         Disables auto repeat.  The default is auto repeat enabled.

-s num
      Specifies the number of minutes to wait until making the display blank.  The default is 10 minutes.  A specified value must be a number greater than zero.

-t num
      Specifies the mouse threshold.  The default is 2 pixels. Acceleration takes effect only if the mouse is moved more than the mouse threshold in one time interval and only applies to the amount beyond the threshold.

-to num
     Specifies the number of minutes to elapse between connection checks.  The default is 60 minutes.  A specified value must be a positive number greater than zero.

-T
          Disables the Ctrl-Alt-Backspace key sequence that, by default, terminates the X Server and all windows opened from it.

-v
          Replaces the display with the current background color, after the amount of time specified by the -s flag.  By default, if the -v flag is not specified, the entire display is painted with the background tile after the amount of time specified by -s.  On color displays, random foreground and background colors are also used.

-wp color
   Specifies a Whitepixel color for the display.  Generally, the Whitepixel color corresponds to the foreground color.  The default depends on the display.

2.9 xclock

   Purpose Continuously displays the current time of day.

   Syntax

   PICTURE 15
 

   Description
   The xclock command gets the time from the system clock.  This time is displayed and updated by X-Windows in the form of either a digital or an analog clock.

xclock Flags

-analog
         Sets analog display mode.  Draws a conventional 12-hour clock face with ticks for each minute and stroke marks on each hour.  The default is digital mode.

-b num
         Specifies the width in pixels of padding white space between the window border and anything xclock displays.  The default is 10 in digital mode and 2 in analog mode.

-bd color
         Specifies the border color on color displays.  The default is black.

-bg color
         Specifies the color of the background on color displays.  The default is white.

-bw num
         Specifies the width in pixels of the border.  The default is 1.

-chime
         Specifies the sounding of a chime every 60 minutes on the hour.  The default is off or zero.

-digital
         Sets digital display mode.  Displays date and time in digital form.

-display name:number
         Identifies the host name and display number where the clock is to run.  Normally the host name and display number are found in the environment variable DISPLAY.  Refer to "Display Specification" in topic 2.3.5.

-fg color
         Determines the color of the text and tick marks on color displays.  The default is black.

-fn font
         Specifies a font for use instead of the default font.  Any fixed-width font can be used.  The default is Rom14.500.

-geometry geometry
         Specifies the location and dimensions of the window.  The default setting is -0-0.  For more information, refer to "Geometry Specification" in topic 2.3.2.

-hd color
         Specifies the color of the hands in analog mode on color displays.  The default is black.

-hl color
         Specifies the highlight color.  For example, the outline of the hands of the analog clock can be highlighted with this color.  The default is black.

-rv
         Reverses foreground and background colors.

-update sec
         Specifies the frequency in seconds with which xclock updates its display.  If the xclock window is obscured and then exposed, xclock overrides this and redisplays immediately.  The default update frequency is 60 seconds.  The specification of an update frequency greater than 30 seconds disables the display of the second hand in analog mode.

2.9.1 .Xdefaults Keywords

   Keywords used with the xclock command.  (Example default file /usr/lpp/X11/defaults)

background
     Specifies the color of the background on color displays.

bodyFont
     Specifies a font to use instead of default font.

border
     Determines the color of the highlighted border on color displays.

borderWidth
     Specifies the width of the window border in pixels.

foreground
    Determines the color of the text and tick marks on color displays.

geometry
    Specifies the location or dimensions of the window.  For more information about geometry, see
    "Geometry Specification" in topic 2.3.2.

hands
    Determines the color of the hands in the analog clock on color displays.

highlight
    Determines the color of the outline of the hands in the analog  clock on color displays.

internalBorder
   For the xclock command in analog mode, specifies an inner border (the distance between
   characters and the window's border) in pixels.

mode
   Specifies whether the xclock command starts a digital or analog clock by default.

reverseVideo
   Reverses the foreground and background color.

update
   Specifies the frequency in seconds with which xclock updates its display.

   For more information on these keywords, see "Changing X-Windows Defaults" in topic 3.3.

2.10 xhost

   Purpose  Controls who can have access to X-Windows on the current host machine.

   Syntax

   PICTURE 16

   Description
   The xhost command adds and deletes hosts on the list of machines from which the X Server accepts connections.  Note that you must switch to the X Server window and then back to the original window if running X Server and xhost on the same terminal.  The xhost command will not work unless a client is using the server (examples of clients are aixterm, xclock, and aixwm).

   This command must be executed on the machine to which the display is connected.  You can remove a host from the access list by using the -host option.  Do not remove the current host from the access list. If you do, you must log off the system before making any corrections.

   Entering xhost with no arguments shows the names of the hosts allowed to access your X Server.

   To enable a remote host by default, the host can be defined in the file /etc/X?.hosts (? is the display number to which you enable access).

   For example, the display norma:0 can be accessed by systems defined in the file /etc/X0.hosts on a system that uses the default host name of norma. In both the display name and the file name, 0 indicates the number of the display that the defined remote systems are allowed to access through X-Windows.

xhost Flags

+host
   Specifies a host node ID number and adds the host to the X-Windows access list.  (Same as the host option; the + is optional.)

-host 
   Specifies a host node ID number and deletes a host from the X-Windows access list.

2.11 xinit

   Purpose  Starts an X Server with a single command.

   Syntax

   PICTURE 17

   Description

   The xinit command is a shell script that can be customized to include any commands you need and to open as many windows as you need.  The xinit command starts the X Server, an aixterm window, and an aixwm window manager.  This command can be entered from the AIX command line or as a user's login command specified in the /etc/passwd file.  If xinit is used as a login command in /etc/passwd, the user is automatically logged into X-Windows.

   xinit performs the following operations:

   Executes the user's profile, depending on the -L option
   Starts an X Server, except on the S/370 system, on the default display
   Sets up the DISPLAY environment variable
   Sets up the XPROTO environment variable to be X11
   Starts the aixwm command
   Starts the aixterm command.

   xinit uses the SHELL environment variable to start the command within aixterm.

   If xinit is the login program invoked or if xinit is invoked from /dev/console, a new virtual terminal is opened and an X Server is started on the new virtual terminal.  Terminating the initial terminal window automatically terminates the X Server.

xinit Flags

-L
   Specifies that xinit be used as the login program and that the user profile in ($HOME/.profile) be read and executed.  Otherwise the profile is assumed to be set up.

-X_options
   Specifies any valid X options that do not conflict with aixterm_options.

   aixterm_options Specifies any one of the three valid aixterm options:
                       -geometry
                       -e
                       -n

                   These options are passed to the aixterm command, which opens the initial window.  These options allow the customization of the location, size, and contents of the initial window.

                   The default for -geometry is 80x12+0-0.  You use the -e option to execute an initial command within the login window.  For example, the following line in /etc/passwd starts X-Windows with &dosnames. as the login shell:
                 /usr/bin/xinit -L -e /bin/dos

-X10
   Specifies that the IBM RT X-Windows Version 1.1 X Server should be invoked.  This must be the first option passed to xinit. (IBM RT X-Windows Version 1.1 must be installed for this option to work. RT only)

2.12 xopen
   Purpose  Opens a full-screen window (virtual terminal) and monitors it.

   Syntax

   PICTURE 18

      The xopen command monitors the full-screen window as follows:

   A virtual terminal is opened for the full-screen application.
   An icon window is created in the X-Windows display for the full-screen
       application.
   Moving the cursor to the icon window and clicking any button on the
       mouse activates the full-screen application's virtual terminal.
   When the full-screen application ends, the icon window is removed from
       the X-Windows display.

   Note:  xopen does not work on a remote system.

xopen Flags

-cmd
   Specifies a command to be executed within the full screen window.  Any number of valid command arguments can also be entered.

-display name:number
   Identifies the host name and display number where xopen is to run.

-geometry geometry
   Specifies the location of the icon window.  The default location is that of the locator cursor. Values for width and height are not used if they are not specified.

-ib file
   Specifies the name of an icon bitmap file to be used instead of the default icon bitmap file. This file, assumed to be in bitmap format, is read and the resulting bitmap file is used as the icon bitmap file.  See /usr/include/X11/bitmaps for a sample bitmap file.

-m
   Turns off monitoring of the virtual terminal.  The icon is not displayed in the window and no monitor process is created.  (RT only)

-n name
   Provides a window name.  If no name is provided, the command name is the window name.

2.12.1 .Xdefaults Keywords

   Default keywords used with the xopen command  (Example file is /usr/lpp/X11/defaults.)

geometry
   Specifies the placement of the icon window.

iconBitmap
   Specifies the icon bitmap file to use instead of the default icon bitmap file.

monitor
   If false, turns off the monitoring of the virtual terminal.

   For more information about these keywords, see "Changing X-Windows Defaults" in topic 3.3.

Content created and/or collected by:
Louis F. Ohland, Peter H. Wendt, David L. Beem, William R. Walsh, Tatsuo Sunagawa, Tomáš Slavotínek, Jim Shorney, Tim N. Clarke, Kevin Bowling, and many others.

Ardent Tool of Capitalism is maintained by Tomáš Slavotínek.
Last update: 14 Apr 2024 - Changelog | About | Legal & Contact