Cygwin/X User's Guide

Harold L Hunt, II

Jon Turney

     Copyright (c) 2000 Harold L Hunt II. Copyright © 2009-2015 Jon
     Turney. Permission is granted to copy, distribute and/or modify this
     document under the terms of the GNU Free Documentation License,
     Version 1.3 or any later version published by the Free Software
     Foundation; with no Invariant Sections, with no Front-Cover Texts,
     and with no Back-Cover Texts. A copy of the license is included in
     the section entitled "GNU Free Documentation License".
     __________________________________________________________________

   Table of Contents
   1. Cygwin/X Overview

        Summary
        Windowing mode

   2. Setting Up Cygwin/X

        Installing Cygwin/X

   3. Using Cygwin/X

        Starting Cygwin/X

              Starting in multiwindow mode (startxwin)
              Starting an X desktop environment session or X window
                      manager in windowed mode

              Starting an X session with XLaunch
              Starting in windowed mode (startx)
              Notes for advanced users
              Obsolete startup methods

        Displaying local clients
        Switching out of Cygwin/X
        Stopping Cygwin/X
        Window managers
        Windows Clipboard integration
        Shared memory support
        Displaying remote clients

              Secure ssh
              Insecure telnet or rsh (Not recommended)

        Remote sessions via XDMCP
        OpenGL (GLX)
        Input internationalization

              Compose key ('Multi_key')
              Input Method Editors (IMEs)

        Terminal Server or Fast User Switching
        Customizing the notification area icon menu

   4. Configuring Cygwin/X

        Configuration overview
        Command line parameters
        XWinrc configuration file

   A. GNU Free Documentation License
   Colophon

   List of Tables
   3-1. Summary of OpenGL rendering options
     __________________________________________________________________

Chapter 1. Cygwin/X Overview

   Cygwin/X is a port of the X Window System to Cygwin. The Cygwin library
   provides a UNIX-like API on the Win32 platform.
     __________________________________________________________________

Summary

    1. Use Cygwin's setup program to install the xinit package. (See the
       instructions in the Section called Installing Cygwin/X in Chapter 2
       for more details).
    2. Start the X server using the "XWin Server" shortcut under
       "Cygwin-X" on the Start Menu. (See the Section called Starting in
       multiwindow mode (startxwin) in Chapter 3 for more details).
    3. Start X clients using the "X applications menu" icon in the
       notification area, or from the command line. (See the Section
       called Displaying local clients in Chapter 3 for more details).

   See the rest of this User's Guide for other topics such as desktop
   environments, remote clients, XDMCP, etc.
     __________________________________________________________________

Windowing mode

   Cygwin/X can be configured to present X windows for an X screen in
   three different ways:
     * Multiwindow mode. (-multiwindow option)
       Each top-level X window appears in its own Windows window.

     Note: This is typically used to work with local or remote X
     applications, integrated into your native Windows desktop, e.g.:
     [cyw03multiwindow.png]
     X applications (emacs, gitk and xterm) and Windows applications
     (explorer and firefox) in multiwindow mode
     * Windowed or rooted mode. (default)
       Each X screen appears as a single Windows window and all X windows
       are contained within those windows. (the Windows window contains
       the X root window for the screen)

     Note: This is typically used to present a virtual full-screen X
     session using the X desktop environment or window manager of your
     choice, or for remote XDMCP sessions, e.g.:
     [cyw01xdmcp.png]
     An XDMCP session to a remote Fedora host
     [cyw02wm.png]
     xfce4-terminal and emacs under the Openbox window manager in
     windowed mode
       The -nodecoration option can be used to remove the Windows window
       decorations from the X screen window. Alternatively, the
       -fullscreen option can be used to show the X screen in exclusive
       fullscreen mode.
     * Rootless mode. (-rootless option)
       The X root window is hidden from view, but top-level X windows are
       drawn.

     Note: This is typically used to work with local or remote X
     applications, integrated into your native Windows desktop, but
     controlled using the X window manager of your choice.
     Because the X root window is hidden in this mode, this is not
     particulaly useful with X window managers with which you need to
     interact with the root window (for example, clicking on the root
     window to get a menu listing programs you can launch) [1] , but is
     more useful with X window managers which work with a dock or panel
     window for selecting applications from.
     Also note that the X window manager has no knowledge of the stacking
     of Windows windows, and vice versa, so raising one X window above a
     Windows window raises all of the X windows, and raising one Windows
     window above an X window raises it above all of the X windows.
     Exactly as if all X windows were being drawn into a hidden Windows
     window :-)
     __________________________________________________________________

Chapter 2. Setting Up Cygwin/X

Installing Cygwin/X

   Cygwin has a nice setup program that downloads and installs the
   necessary Cygwin packages for you.
    1. Open the Cygwin, http://cygwin.com/ page in your web browser
    2. Click on the "setup-x86.exe" (32-bit installation) or
       "setup-x86_64.exe" (64-bit installation) link to download the
       appropriate setup program from the primary Cygwin server. Save it
       to the directory that you would like to store the downloaded
       packages in (e.g. c:\download). Do not save to c:\cygwin, as that
       is the default directory for the extraction and installation of the
       downloaded packages.
    3. Run the Cygwin setup program and you will see the welcome screen:
       [cyi01welcome.png]
    4. Click Next to proceed to the next screen.
    5. Choose, Install from Internet, this will still save the package
       files to your download directory so that you can install Cygwin on
       any number of machines:
       [cyi02installoption.png]
    6. Click Next to proceed to the next screen.
    7. The default Install Root is c:\cygwin which should be fine for most
       installations. Leave Default Text File Type as UNIX. Leave Install
       For set to All unless you lack local administrative privileges.
       [cyi03installto.png]
    8. Click Next to proceed to the next screen.
    9. Local Package Directory should default to the directory that you
       ran the setup program from:
       [cyi04directory.png]
   10. Click Next to proceed to the next screen.
   11. Choose your proxy setup, or, just choose Direct Connection if no
       proxy is needed:
       [cyi05proxy.png]
   12. Click Next to proceed to the next screen.
   13. Select your nearest mirror for downloading:
       [cyi06mirror.png]
   14. Click Next to proceed to the next screen; setup will download a
       list of available packages as it moves to the next screen.
   15. On the next screen you will select the packages that will be
       downloaded and installed. A listing of the Cygwin/X packages is
       given below; a listing of the general Cygwin packages would be
       beyond the scope of this document.
       Cygwin/X packages are located in the X11 category.
          + xorg-server (required, the Cygwin/X X Server)
          + xinit (required, scripts for starting the X server: xinit,
            startx, startwin (and a shortcut on the Start Menu to run it),
            startxdmcp.bat )
          + xorg-docs (optional, man pages)
          + xlaunch (optional, a wizard for starting X sessions)
          + You may also select any X client programs you want to use, and
            any fonts you would like to have available.
          + You may also want to ensure that the openssh package is
            selected if you wish to use ssh connections to run remote X
            clients.
          + You may also want to ensure that the inetutils or rsh packages
            are selected if you wish to use telnet or rsh connections to
            run remote X clients. (not recommended)
       You can run setup again in the future to add more packages.
       [cyi07packages.png]
   16. Click Next to begin the download process, you may want to try
       another mirror if you see a "Connecting" message on this screen for
       a long period of time:
       [cyi08downloading.png]
   17. After the packages are downloaded, setup will automatically begin
       to install them:
       [cyi09installing.png]
   18. I highly recommend allowing Cygwin Setup to create Desktop and
       Start Menu icons for you; these icons simply launch a bash shell:
       [cyi10createicons.png]
   19. Click Finish to close the setup program.

   You have now successfully installed Cygwin/X.
     __________________________________________________________________

Chapter 3. Using Cygwin/X

Starting Cygwin/X

   Described below are several methods of starting up the Cygwin/X X
   Server with a startup utility that optionally starts initial clients
   (for example, a terminal, a window manager, or a desktop environment)
   and performs X server configuration (for example, loading a keyboard
   map).
     __________________________________________________________________

Starting in multiwindow mode (startxwin)

   The custom XWin startup utility startxwin [2] starts the X server in
   multiwindow mode.

   startxwin is included in the xinit package (installed by following the
   instructions in the Section called Installing Cygwin/X in Chapter 2).

   Run startxwin by: [3]
     * using the "XWin Server" shortcut under "Cygwin-X" on the Start Menu
     * Starting /usr/bin/startxwin in a Cygwin shell:

$ startxwin

   You may create a ~/.startxwinrc script to customize the client programs
   started, rather than using the default /etc/X11/xinit/startxwinrc
   script.

   Full documentation for startxwin can be read with man startxwin .
     __________________________________________________________________

Starting an X desktop environment session or X window manager in windowed
mode

   Several X desktop environments are packaged for Cygwin.
     * GNOME Flashback Desktop Environment: install the gnome-flashback
       package
     * KDE Plasma Desktop Environment: install the kde-workspace package
     * LXDE Desktop Environment: install the lxde-common package
     * MATE Desktop Environment: install the mate-session-manager package
     * Xfce Desktop Environment: install the xfce4-session package

   and use the provided Start Menu shortcut. [4]

   Several X window managers are packaged for Cygwin.
     * aewm++ window manager: install the aewm++ package
     * dwm window manager: install the dwm package
     * FVWM window manager: install the fvwm package
     * Openbox window manager: install the openbox package
     * twm window manager: install the twm package
     * WindowMaker window manager: install the WindowMaker package
     __________________________________________________________________

Starting an X session with XLaunch

   XLaunch is a GUI wizard for starting the Cygwin/X X server and a local
   or remote X client. These sessions can be saved and shared as .xlaunch
   files.

   XLaunch is included in the xlaunch package (installed by following the
   instructions in the Section called Installing Cygwin/X in Chapter 2).

   Run xlaunch using the "XLaunch" shortcut under "Cygwin-X" on the Start
   Menu.

   Documentation for xlaunch is available at
   http://x.cygwin.com/docs/xlaunch/ and as online help within the
   program.
     __________________________________________________________________

Starting in windowed mode (startx)

   Use the standard X Window System startx command and its associated
   ~/.xinitrc configuration file.

   Run startx in a Cygwin shell:
$ startx

   Full documentation for startx can be read with man startx .

   You may create a ~/.xinitrc from the template in /etc/X11/xinit/xinitrc
   and then customize ~/.xinitrc to start client programs and configure
   your X server.
$ cp /etc/X11/xinit/xinitrc ~/.xinitrc
[edit ~/.xinitrc as desired]

     Note: startx waits until ~/.xinitrc exits (which is often waiting
     for a window manager started by it to exit) and then kills X, so the
     last client started by should be started with exec and without &.

   Alternatively, if you just want to start a single client program
   (perhaps a window manager), you don't need to use a ~/.xinitrc, and can
   start the client directly from startx, e.g. [5]
$ startx /usr/bin/fvwm2

     Note: The client name supplied to startx must begin with / or .,
     otherwise it is treated as an option to the default xterm client.
     __________________________________________________________________

Notes for advanced users

   Advanced users may wish to start the X server by invoking XWin
   directly, for example, to start XDMCP sessions (See the Section called
   Remote sessions via XDMCP).

   If you want to have a Start Menu shortcut which runs startxwin with
   custom options, you should use a copy of the Start Menu shortcut
   installed by xinit, so that your changes are not overwritten when the
   xinit package is updated.
     __________________________________________________________________

Obsolete startup methods

   The MS-DOS batch file startxwin.bat and bash shell script startxwin.sh
   previously used to start the X server are no longer provided. This
   implementation made it difficult to reliably wait until the the X
   server had started before starting any clients. Use startxwin instead.

   The executable startxwin.exe previously used to start the X server has
   been retired and replaced with a shell script startxwin.
     __________________________________________________________________

Displaying local clients

   You can start X clients for display on your X server by:
     * Right-clicking on the "X applications menu" icon in the
       notification area, and choosing from the menu.
       [cyu01appsmenu.png]

     Note: The alacarte package may be installed to edit the menu via
     Preferences->Main Menu.
     * Running the client from a Cygwin shell, e.g.

$ xterm &

     Note: When starting from X clients from a shell, it may be necessary
     to ensure the DISPLAY environment variable is set correctly. This
     step is not necessary if you are entering your commands into an X
     terminal, as DISPLAY must already be set in that case. e.g. in a
     bash shell:

          $ export DISPLAY=:0.0
     __________________________________________________________________

Switching out of Cygwin/X

   When running in windowed mode, press Alt-Tab to switch from Cygwin/X to
   your Windows desktop or other running Windows applications.
     __________________________________________________________________

Stopping Cygwin/X

   When you are done using Cygwin/X, you can shutdown the X server by:
     * Selecting the "Exit..." option from the notification area icon menu
     * In Windowed mode: Press Alt-F4 to shutdown the X Server. This can
       be disabled using the -nowinkill option.
     * In Windowed mode: Close the X server window in the conventional
       ways, e.g. by clicking on the "X" button at the upper-right corner
       of the X screen window frame, or choosing "Close" from the control
       menu opened by left-clicking on the X logo icon at the upper-left
       corner of the X screen window frame.
     * Using the -unixkill option allows the Ctrl-Alt-Backspace key
       combination to shutdown the X Server.

   If clients are still connected to the X server, you will be prompted to
   confirm you wish to shutdown the X server.
     __________________________________________________________________

Window managers

   A window manager is required in order to decorate, move, resize, and
   perform other operations on individual X windows.

   Cygwin/X can work with window managers in several different ways:
     * Internal window manager for multiwindow mode. The internal window
       manager that creates a Windows window for each top-level X window
       is automatically started when using the -multiwindow command-line
       parameter to X. See the Section called Command line parameters in
       Chapter 4 for more information on the -multiwindow command-line
       parameter.
     * External local window managers (e.g. twm, mwm (part of the motif
       package), fvwm2, openbox, aewm++, WindowMaker). These local window
       managers must be installed on Cygwin and run locally.
     * Remote window managers started by logging into an XDMCP session.
       You can read more about XDMCP in the Section called Remote sessions
       via XDMCP.
     * Remote window manager launched through an ssh tunnel. This is not
       Cygwin/X-specific, so you should be able to find information about
       launching remote window managers from other sources. See the
       Section called Secure ssh for more information on using ssh.
     __________________________________________________________________

Windows Clipboard integration

   The X Window System uses its own clipboard system that is distinct from
   the clipboard system used by Windows. Copying and pasting text between
   these two clipboard systems requires a clipboard integration program
   that watches for updates to either clipboard and copies data between
   them when either one is updated. Cygwin/X has an internal clipboard
   integration program that is enabled by default.

   The clipboard integration monitors the X PRIMARY (selected/highlighted
   text) and CLIBPOARD (cut/copied text) selections for changes in
   ownership, and makes the contents of the most recent one to change
   available to paste from the Windows clipboard. It also monitors the
   contents of the Windows clipboard for changes, taking ownership of the
   PRIMARY and CLIPBOARD selections, and making the contents of the
   Windows clipboard available in them.

     Note: Some X clients, notably ones written in Tcl/Tk, do not
     re-assert ownership of the PRIMARY selection or update it's
     timestamp when it's contents change, which currently prevents the
     clipboard integration program from correctly noticing that the
     PRIMARY selection's contents have changed.

     Note: With some X clients, it may be inconvenient that updating the
     PRIMARY selection causes that to overwrite the Windows clipboard
     contents you were just about to paste, so monitoring of the X
     PRIMARY selection can be disabled using the -noprimary option, or
     temporarily using the "Clipboard may use PRIMARY selection" toggle
     on the notification area icon menu.

   See the Section called Command line parameters in Chapter 4 for more
   information on the -[no]clipboard and -[no]primary command-line
   options.
     __________________________________________________________________

Shared memory support

   Shared memory is needed by the MIT-SHM and XFree86-BigFont extensions,
   which may provide better performance for local applications which use
   large images or fonts and are written to use those extensions.

   In Cygwin, XSI shared memory is provided by the cygserver Windows
   service. To install cygserver, install it using the setup program, run
   the cygserver-config script to install the service, and then reboot or
   use cygrunsrv -S cygserver to start the service.

     Note: This note is applicable to Cygwin 1.5 only. Cygwin 1.7
     automatically enables shared memory if the cygserver Windows service
     is running.

     Shared memory will only be used if the CYGWIN environment variable
     contains the server keyword.

     For example, starting X with

CYGWIN=server X

     or setting the CYGWIN environment variable in the Windows control
     panel to contain server will enable shared memory support if the
     cygserver service is running.
     __________________________________________________________________

Displaying remote clients

   Displaying remote X clients with Cygwin/X is identical to displaying
   remote X clients with any other X Server.

   It is recommended that you use the secure method of tunnelling the X
   connection over ssh.

   Alternatively, you can use the host-based access control provided by
   the X server, connecting to the remote machine using telnet or rsh and
   directing clients to connect to the server by setting the DISPLAY
   environment variable. This method is insecure and not recommended.
     __________________________________________________________________

Secure ssh

   On your Windows machine:
    1. Make sure you have the openssh package installed.
    2. Launch Cygwin/X
    3. Ensure the DISPLAY environment variable is set correctly. (This
       step is not neccessary if you are entering your commands into an X
       terminal, as DISPLAY must already be set in that case)

$ export DISPLAY=:0.0

    4. Run the ssh command to connect to the remote host:

$ ssh -Y username@remote_hostname_or_ip_address

    5. Enter your password when prompted by ssh.
    6. Your ssh session should now show you a shell prompt for your remote
       machine.

     Note: The ssh server will automatically set the DISPLAY environment
     variable appropriately, typically to something like localhost:10.0,
     so clients will connect to a proxy X11 display on the remote host
     from which the X11 protocol will be forwarded over ssh to your X
     server.
     If your login scripts unconditionally set DISPLAY to something else,
     this will break X11 forwarding.
    7. You can now launch remote X clients in your ssh session, for
       example:

$ xterm &

       will launch an xterm running on your remote host that will display
       on your Cygwin/X screen.
    8. Launch other remote clients in the same manner. I recommend
       starting the remote clients in the background, by appending & to
       the command name, so that you don't have to open several ssh
       sessions.

     Note: By default, the OpenSSH server does not allow forwarded X
     connections. This must be configured on the remote host by adding
     X11Forwarding yes to the sshd_config configuration file. The OpenSSH
     server must be restarted or SIGHUP'ed to re-read the configuration
     file after it is changed.

     Note: The OpenSSH server requires the xauth command to be available
     to forward X connections. Consequently, it must be installed on the
     remote host.
     __________________________________________________________________

Insecure telnet or rsh (Not recommended)

   An example of connecting remote clients using host-based authorization.

   On your Windows machine:
    1. Make sure you have the inetutils package installed (for telnet) or
       rsh package (for rsh).
    2. Launch Cygwin/X

     Note: You must provide the -listen tcp option to startx or startxwin
     so that the X server will listen for TCP/IP connections. (See this
     FAQ for more details).
    3. In an X terminal, use the xhost command to allow the remote host
       access to make connections to your X server:

$ xhost remote_hostname_or_ip_address

    4. Run the telnet or rsh command to connect to the remote host:

$ /usr/bin/telnet remote_hostname_or_ip_address

       or

$ rsh remote_hostname_or_ip_address

     Note: Use the explicit path to ensure that Cygwin's telnet is run
     instead of Microsoft's telnet. Microsoft's telnet cannot read input
     or display output correctly when run from a Cygwin shell.
    5. Login to your remote machine
    6. Ensure the DISPLAY environment variable is set correctly in your
       remote session.

$ export DISPLAY=windows_hostname_or_ip_address:0.0

    7. You can now launch remote X clients in your ssh session, for
       example:

$ xterm &

       will launch an xterm running on your remote host that will display
       on your Cygwin/X screen.
    8. Launch other remote clients in the same manner. I recommend
       starting the remote clients in the background, by appending & to
       the command name, so that you don't have to open several telnet or
       rsh sessions.

     Note: This is insecure because (1) when you log in, your username
     and password may be transmitted in clear across the network between
     you and the remote host (2) the X protocol is transmitted in clear
     across the network between you and the remote host, and (3) you have
     allowed any user on the remote host to connect to your X server and
     monitor your X session. For these reasons, use ssh forwarding, if at
     all possible.
     __________________________________________________________________

Remote sessions via XDMCP

   Cygwin/X can be used login to one or several remote sessions using
   XDMCP (X Display Manager Control Protocol).

   Start Cygwin/X with a command similar to the following to login to a
   single remote session using XDMCP:

   X -query remote_hostname_or_ip_address

   You may login to several remote sessions with a single or multiple
   hosts using XDMCP. Each session will need a separate display number,
   specified by the :display_number parameter, such as :0. A display
   number is not the same as a screen number, as a single display can have
   multiple screens associated with it. Each display listens on a
   different network port number, so each display can connect to multiple
   machines. Start Cygwin/X with command lines similar to the following to
   login to several remote sessions using XDMCP:

   X :0 -query remote_hostname_or_ip_address_0

   X :1 -query remote_hostname_or_ip_address_1

   Note that the :display_number parameter is a general X Server
   parameter, not specific to Cygwin/X. Further documentation of the
   :display_number parameter can be found in the X Server manual page.
   XDMCP is a complex system that is not specific to Cygwin/X; further
   discussion of XDMCP is beyond the scope of this document. You may wish
   to read the Linux XDMCP HOWTO or the X Server XDMCP Options for more
   information.

     Note: For security reasons, XDMCP is not enabled by default on most
     modern UNIX distributions. You will have to enable remote logins to
     your X Display Manager (xdm, kdm, gdm, etc.). See the configuration
     documentation for your X Display Manager and/or UNIX distribution.
     The Cygwin/X FAQ section on XDMCP may also be helpful.

     Note: XDMCP suffers from some of the same security problems noted in
     the previous section, but unfortunately cannot be tunnelled over ssh
     due to it's use of UDP. A similar effect can be achieved with a
     command like ssh -Y remote_hostname_or_ip_address Xnest :1 -query
     localhost

     Note: In some cases, e.g. if you have multiple network interfaces,
     it may be necessary to use the -from local_ip parameter to specify
     the local IP address to be used.
     __________________________________________________________________

OpenGL (GLX)

     Note: Hardware-accelerated OpenGL is still under active development
     and should be considered beta quality, but should be working well
     enough to be useful. Please report problems with specific OpenGL
     applications to the cygwin mailing list.

   The Cygwin/X X Server supports both software OpenGL rendering (using
   the mesa software renderer), and hardware accelerated OpenGL rendering
   (using the native Windows OpenGL (WGL) interface).

   The X server command line options -wgl and -nowgl turn on and off the
   use of the native Windows OpenGL implementation. Currently -wgl is only
   supported in multiwindow mode, and is on by default in that mode. -wgl
   has no effect if your display driver does not support
   hardware-accelerated OpenGL.

   The creation of indirect GLX contexts is disabled by default. The +iglx
   option is required to allow them.

   Table 3-1. Summary of OpenGL rendering options

   software rendering ^a

   hardware-accelerated rendering

   indirect

   (Uses GLX protocol, limited to OpenGL 1.4)

   start server with +iglx -nowgl options

   export LIBGL_ALWAYS_INDIRECT=1

   start server with +iglx -wgl options

   export LIBGL_ALWAYS_INDIRECT=1

   direct


   start server with -wgl option

   export LIBGL_USE_WGL=1 ^b

   (local clients only)
   Notes:
   a. The software renderer used (e.g. llvmpipe, softpipe) can be selected
   using the GALLIUM_DRIVER environment variable.
   b. Since direct accelerated rendering is currently experimental, the
   LIBGL_USE_WGL environment variable is required to enable it, but that
   will be removed when the feature is mature, at which point it will be
   the default and export LIBGL_ALWAYS_SOFTWARE=1 will be required to
   force software rendering.

   Currently the default configurations are:
     * For local clients the default is direct, software rendering.
       To use the experimental direct, hardware-accelerated rendering, you
       must do export LIBGL_USE_WGL=1 before starting the client
       application.
     * For remote clients, Mesa's libGL prefers to use client-side
       software rendering and then transfer the rendered image to the
       server.
       To force indirect rendering (which takes place on the server), you
       must start the server with the +iglx option and do export
       LIBGL_ALWAYS_INDIRECT=1 before starting the client application.
       There is a performance trade-off between rendering performance and
       network latency, so you might wish to try both direct and indirect
       rendering and see which performs best in your specific
       circumstances.

   If glxinfo | grep OpenGL outputs something mentioning your graphics
   card vendor, you have hardware-accelerated rendering. If it mentions
   Mesa, you have software rendering.

   Please ensure you are using the latest display drivers for your
   graphics hardware before reporting any visual issues with WGL.

   Known issues:
     * OpenGL drawing is just drawn on top of the X window. This works
       well enough when the OpenGL window is a top-level window, or is
       non-top-level and has no occluding relatives and is drawn after
       anything it occludes, but can mis-render in more complex scenarios.
     * OpenGL windows with static contents aren't re-drawn when occluded
       by a native Window and then exposed. Workaround: force the window
       to redraw, e.g. by resizing it.
     * When an OpenGL window is behind a native application window which
       uses layered windows for translucency, the OpenGL rendering is
       drawn over the top, flickering.
     * Rendering to GLX pixmaps is only partially implemented due to WGL
       limitations.
     __________________________________________________________________

Input internationalization

Compose key ('Multi_key')

   The compose key is a dead key which introduces a multi-key sequence to
   generate a character.

   You can configure the compose key by using setxkbmap e.g. setxkbmap
   -option compose:rctrl or starting the X server with the -xkboptions
   option, e.g. X -xkboptions compose:ralt. The possibilities for the
   compose key, e.g. ralt, lwin, rwin, menu, lctrl, rctrl, caps, etc. are
   listed in the xkeyboard-config(7) man page.

   Alternatively, the option lv3:ralt_switch_multikey configures Right Alt
   as 3rd-level shift, Shift + Right Alt [6] as Compose. Note that this
   option is on by default in the gb layout.

   The standard compose key sequences available are determined by the
   locale. Refer to the compose key sequence charts for the available
   compose key sequences for each locale. Note that most locales using a
   Microsoft codepage character set (e.g. with a LANG environment variable
   of the form LL_CC.CPnnn) are not currently recognized by Xlib.

   See the Compose(5) man page for more details on how the locale is
   mapped to a compose key sequence file and how to configure custom
   compose key sequences.
     __________________________________________________________________

Input Method Editors (IMEs)

   If an IME is configured, it should be started as part of a remote
   session (See the Section called Remote sessions via XDMCP).

   To use an IME with remote clients started from a command line (See the
   Section called Displaying remote clients), the IME must be started
   explicitly, e.g.
     __________________________________________________________________

Starting the ibus IME

   After configuring ibus with ibus-setup, start the ibus daemon
    $ ibus-daemon -drx

   and set XMODIFIERS so XIM clients will use ibus
    $ export XMODIFIERS="@im=ibus"
     __________________________________________________________________

Starting other IMEs

   Similarly for fcitx, gcim, iiimf, scim, uim, etc.
     __________________________________________________________________

Terminal Server or Fast User Switching

   When multiple users may start X servers on same computer, each X server
   must have a unique display number.

   Instead of specifying a display number using the :display_number
   option, such as :0, starting the X server with the -displayfd option,
   locates an unused display number and writes it to the specified file
   descriptor.

   startx, xinit and startxwin notice this option, and transparently use
   it to determine the display number for any clients they start, and then
   pass on the display number to the specified file descriptor.

     Note: It may be necessary to also use the -engine 1 option (GDI
     drawing) for the X server windows to draw correctly when connecting
     to a Terminal Server using RDP, depending on the Windows version
     and/or graphics driver in use.

     Note: Automatically communicating the allocated display number to
     all future X clients started by the user who started the X server is
     left as an exercise for the reader.
     __________________________________________________________________

Customizing the notification area icon menu

   You can customize the right-click menu for the XWin icon in the Windows
   notification area (system tray) using the XWinrc file. e.g.
$ cp /etc/X11/system.XWinrc./etc/X11/xinit/xinitrc ~/.XWinrc
[edit ~/.Xwinrc as desired]

   See the Section called XWinrc configuration file in Chapter 4 for more
   details.
     __________________________________________________________________

Chapter 4. Configuring Cygwin/X

Configuration overview

   Cygwin/X settings are configured primarily through command-line
   parameters passed to X.

   A XWinrc file is used to configure the notification area icon menu, and
   customize window appearance in multiwindow mode.
     __________________________________________________________________

Command line parameters

   Cygwin/X, by default, runs in windowed mode with the largest window
   that will fit on your Windows desktop, using the best performing engine
   that is installed on your system, with clipboard integration enabled.
   You do not need to pass any parameters to X to use the default
   behavior.

   Up to date documentation of X options can be read with man XWin .
     __________________________________________________________________

XWinrc configuration file

   With the .XWinrc configuration file it is possible to:
     * Add items and submenus into the menu opened by right-clicking on
       the notification area icon.
     * In multiwindow mode: add items and submenus into the Windows window
       system menu (opened by clicking on the icon in the top-left of the
       Windows window frame) and override the window icon and window
       styles for Windows windows, by window name or window class name.

   Full documentation of the XWinrc file format and command can be read
   with man XWinrc .
     __________________________________________________________________

Appendix A. GNU Free Documentation License

   Version 1.3, 3 November 2008

   Copyright 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.

   Everyone is permitted to copy and distribute verbatim copies of this
   license document, but changing it is not allowed.

0. PREAMBLE

   The purpose of this License is to make a manual, textbook, or other
   functional and useful document “free” in the sense of freedom: to
   assure everyone the effective freedom to copy and redistribute it, with
   or without modifying it, either commercially or noncommercially.
   Secondarily, this License preserves for the author and publisher a way
   to get credit for their work, while not being considered responsible
   for modifications made by others.

   This License is a kind of “copyleft”, which means that derivative works
   of the document must themselves be free in the same sense. It
   complements the GNU General Public License, which is a copyleft license
   designed for free software.

   We have designed this License in order to use it for manuals for free
   software, because free software needs free documentation: a free
   program should come with manuals providing the same freedoms that the
   software does. But this License is not limited to software manuals; it
   can be used for any textual work, regardless of subject matter or
   whether it is published as a printed book. We recommend this License
   principally for works whose purpose is instruction or reference.

1. APPLICABILITY AND DEFINITIONS

   This License applies to any manual or other work, in any medium, that
   contains a notice placed by the copyright holder saying it can be
   distributed under the terms of this License. Such a notice grants a
   world-wide, royalty-free license, unlimited in duration, to use that
   work under the conditions stated herein. The “Document”, below, refers
   to any such manual or work. Any member of the public is a licensee, and
   is addressed as “you”. You accept the license if you copy, modify or
   distribute the work in a way requiring permission under copyright law.

   A “Modified Version” of the Document means any work containing the
   Document or a portion of it, either copied verbatim, or with
   modifications and/or translated into another language.

   A “Secondary Section” is a named appendix or a front-matter section of
   the Document that deals exclusively with the relationship of the
   publishers or authors of the Document to the Document’s overall subject
   (or to related matters) and contains nothing that could fall directly
   within that overall subject. (Thus, if the Document is in part a
   textbook of mathematics, a Secondary Section may not explain any
   mathematics.) The relationship could be a matter of historical
   connection with the subject or with related matters, or of legal,
   commercial, philosophical, ethical or political position regarding
   them.

   The “Invariant Sections” are certain Secondary Sections whose titles
   are designated, as being those of Invariant Sections, in the notice
   that says that the Document is released under this License. If a
   section does not fit the above definition of Secondary then it is not
   allowed to be designated as Invariant. The Document may contain zero
   Invariant Sections. If the Document does not identify any Invariant
   Sections then there are none.

   The “Cover Texts” are certain short passages of text that are listed,
   as Front-Cover Texts or Back-Cover Texts, in the notice that says that
   the Document is released under this License. A Front-Cover Text may be
   at most 5 words, and a Back-Cover Text may be at most 25 words.

   A “Transparent” copy of the Document means a machine-readable copy,
   represented in a format whose specification is available to the general
   public, that is suitable for revising the document straightforwardly
   with generic text editors or (for images composed of pixels) generic
   paint programs or (for drawings) some widely available drawing editor,
   and that is suitable for input to text formatters or for automatic
   translation to a variety of formats suitable for input to text
   formatters. A copy made in an otherwise Transparent file format whose
   markup, or absence of markup, has been arranged to thwart or discourage
   subsequent modification by readers is not Transparent. An image format
   is not Transparent if used for any substantial amount of text. A copy
   that is not “Transparent” is called “Opaque”.

   Examples of suitable formats for Transparent copies include plain ASCII
   without markup, Texinfo input format, LaTeX input format, SGML or XML
   using a publicly available DTD, and standard-conforming simple HTML,
   PostScript or PDF designed for human modification. Examples of
   transparent image formats include PNG, XCF and JPG. Opaque formats
   include proprietary formats that can be read and edited only by
   proprietary word processors, SGML or XML for which the DTD and/or
   processing tools are not generally available, and the machine-generated
   HTML, PostScript or PDF produced by some word processors for output
   purposes only.

   The “Title Page” means, for a printed book, the title page itself, plus
   such following pages as are needed to hold, legibly, the material this
   License requires to appear in the title page. For works in formats
   which do not have any title page as such, “Title Page” means the text
   near the most prominent appearance of the work’s title, preceding the
   beginning of the body of the text.

   The “publisher” means any person or entity that distributes copies of
   the Document to the public.

   A section “Entitled XYZ” means a named subunit of the Document whose
   title either is precisely XYZ or contains XYZ in parentheses following
   text that translates XYZ in another language. (Here XYZ stands for a
   specific section name mentioned below, such as “Acknowledgements”,
   “Dedications”, “Endorsements”, or “History”.) To “Preserve the Title”
   of such a section when you modify the Document means that it remains a
   section “Entitled XYZ” according to this definition.

   The Document may include Warranty Disclaimers next to the notice which
   states that this License applies to the Document. These Warranty
   Disclaimers are considered to be included by reference in this License,
   but only as regards disclaiming warranties: any other implication that
   these Warranty Disclaimers may have is void and has no effect on the
   meaning of this License.

2. VERBATIM COPYING

   You may copy and distribute the Document in any medium, either
   commercially or noncommercially, provided that this License, the
   copyright notices, and the license notice saying this License applies
   to the Document are reproduced in all copies, and that you add no other
   conditions whatsoever to those of this License. You may not use
   technical measures to obstruct or control the reading or further
   copying of the copies you make or distribute. However, you may accept
   compensation in exchange for copies. If you distribute a large enough
   number of copies you must also follow the conditions in section 3.

   You may also lend copies, under the same conditions stated above, and
   you may publicly display copies.

3. COPYING IN QUANTITY

   If you publish printed copies (or copies in media that commonly have
   printed covers) of the Document, numbering more than 100, and the
   Document’s license notice requires Cover Texts, you must enclose the
   copies in covers that carry, clearly and legibly, all these Cover
   Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
   the back cover. Both covers must also clearly and legibly identify you
   as the publisher of these copies. The front cover must present the full
   title with all words of the title equally prominent and visible. You
   may add other material on the covers in addition. Copying with changes
   limited to the covers, as long as they preserve the title of the
   Document and satisfy these conditions, can be treated as verbatim
   copying in other respects.

   If the required texts for either cover are too voluminous to fit
   legibly, you should put the first ones listed (as many as fit
   reasonably) on the actual cover, and continue the rest onto adjacent
   pages.

   If you publish or distribute Opaque copies of the Document numbering
   more than 100, you must either include a machine-readable Transparent
   copy along with each Opaque copy, or state in or with each Opaque copy
   a computer-network location from which the general network-using public
   has access to download using public-standard network protocols a
   complete Transparent copy of the Document, free of added material. If
   you use the latter option, you must take reasonably prudent steps, when
   you begin distribution of Opaque copies in quantity, to ensure that
   this Transparent copy will remain thus accessible at the stated
   location until at least one year after the last time you distribute an
   Opaque copy (directly or through your agents or retailers) of that
   edition to the public.

   It is requested, but not required, that you contact the authors of the
   Document well before redistributing any large number of copies, to give
   them a chance to provide you with an updated version of the Document.

4. MODIFICATIONS

   You may copy and distribute a Modified Version of the Document under
   the conditions of sections 2 and 3 above, provided that you release the
   Modified Version under precisely this License, with the Modified
   Version filling the role of the Document, thus licensing distribution
   and modification of the Modified Version to whoever possesses a copy of
   it. In addition, you must do these things in the Modified Version:
    A. Use in the Title Page (and on the covers, if any) a title distinct
       from that of the Document, and from those of previous versions
       (which should, if there were any, be listed in the History section
       of the Document). You may use the same title as a previous version
       if the original publisher of that version gives permission.
    B. List on the Title Page, as authors, one or more persons or entities
       responsible for authorship of the modifications in the Modified
       Version, together with at least five of the principal authors of
       the Document (all of its principal authors, if it has fewer than
       five), unless they release you from this requirement.
    C. State on the Title page the name of the publisher of the Modified
       Version, as the publisher.
    D. Preserve all the copyright notices of the Document.
    E. Add an appropriate copyright notice for your modifications adjacent
       to the other copyright notices.
    F. Include, immediately after the copyright notices, a license notice
       giving the public permission to use the Modified Version under the
       terms of this License, in the form shown in the Addendum below.
    G. Preserve in that license notice the full lists of Invariant
       Sections and required Cover Texts given in the Document’s license
       notice.
    H. Include an unaltered copy of this License.
    I. Preserve the section Entitled “History”, Preserve its Title, and
       add to it an item stating at least the title, year, new authors,
       and publisher of the Modified Version as given on the Title Page.
       If there is no section Entitled “History” in the Document, create
       one stating the title, year, authors, and publisher of the Document
       as given on its Title Page, then add an item describing the
       Modified Version as stated in the previous sentence.
    J. Preserve the network location, if any, given in the Document for
       public access to a Transparent copy of the Document, and likewise
       the network locations given in the Document for previous versions
       it was based on. These may be placed in the “History” section. You
       may omit a network location for a work that was published at least
       four years before the Document itself, or if the original publisher
       of the version it refers to gives permission.
    K. For any section Entitled “Acknowledgements” or “Dedications”,
       Preserve the Title of the section, and preserve in the section all
       the substance and tone of each of the contributor acknowledgements
       and/or dedications given therein.
    L. Preserve all the Invariant Sections of the Document, unaltered in
       their text and in their titles. Section numbers or the equivalent
       are not considered part of the section titles.
    M. Delete any section Entitled “Endorsements”. Such a section may not
       be included in the Modified Version.
    N. Do not retitle any existing section to be Entitled “Endorsements”
       or to conflict in title with any Invariant Section.
    O. Preserve any Warranty Disclaimers.

   If the Modified Version includes new front-matter sections or
   appendices that qualify as Secondary Sections and contain no material
   copied from the Document, you may at your option designate some or all
   of these sections as invariant. To do this, add their titles to the
   list of Invariant Sections in the Modified Version’s license notice.
   These titles must be distinct from any other section titles.

   You may add a section Entitled “Endorsements”, provided it contains
   nothing but endorsements of your Modified Version by various parties —
   for example, statements of peer review or that the text has been
   approved by an organization as the authoritative definition of a
   standard.

   You may add a passage of up to five words as a Front-Cover Text, and a
   passage of up to 25 words as a Back-Cover Text, to the end of the list
   of Cover Texts in the Modified Version. Only one passage of Front-Cover
   Text and one of Back-Cover Text may be added by (or through
   arrangements made by) any one entity. If the Document already includes
   a cover text for the same cover, previously added by you or by
   arrangement made by the same entity you are acting on behalf of, you
   may not add another; but you may replace the old one, on explicit
   permission from the previous publisher that added the old one.

   The author(s) and publisher(s) of the Document do not by this License
   give permission to use their names for publicity for or to assert or
   imply endorsement of any Modified Version.

5. COMBINING DOCUMENTS

   You may combine the Document with other documents released under this
   License, under the terms defined in section 4 above for modified
   versions, provided that you include in the combination all of the
   Invariant Sections of all of the original documents, unmodified, and
   list them all as Invariant Sections of your combined work in its
   license notice, and that you preserve all their Warranty Disclaimers.

   The combined work need only contain one copy of this License, and
   multiple identical Invariant Sections may be replaced with a single
   copy. If there are multiple Invariant Sections with the same name but
   different contents, make the title of each such section unique by
   adding at the end of it, in parentheses, the name of the original
   author or publisher of that section if known, or else a unique number.
   Make the same adjustment to the section titles in the list of Invariant
   Sections in the license notice of the combined work.

   In the combination, you must combine any sections Entitled “History” in
   the various original documents, forming one section Entitled “History”;
   likewise combine any sections Entitled “Acknowledgements”, and any
   sections Entitled “Dedications”. You must delete all sections Entitled
   “Endorsements”.

6. COLLECTIONS OF DOCUMENTS

   You may make a collection consisting of the Document and other
   documents released under this License, and replace the individual
   copies of this License in the various documents with a single copy that
   is included in the collection, provided that you follow the rules of
   this License for verbatim copying of each of the documents in all other
   respects.

   You may extract a single document from such a collection, and
   distribute it individually under this License, provided you insert a
   copy of this License into the extracted document, and follow this
   License in all other respects regarding verbatim copying of that
   document.

7. AGGREGATION WITH INDEPENDENT WORKS

   A compilation of the Document or its derivatives with other separate
   and independent documents or works, in or on a volume of a storage or
   distribution medium, is called an “aggregate” if the copyright
   resulting from the compilation is not used to limit the legal rights of
   the compilation’s users beyond what the individual works permit. When
   the Document is included in an aggregate, this License does not apply
   to the other works in the aggregate which are not themselves derivative
   works of the Document.

   If the Cover Text requirement of section 3 is applicable to these
   copies of the Document, then if the Document is less than one half of
   the entire aggregate, the Document’s Cover Texts may be placed on
   covers that bracket the Document within the aggregate, or the
   electronic equivalent of covers if the Document is in electronic form.
   Otherwise they must appear on printed covers that bracket the whole
   aggregate.

8. TRANSLATION

   Translation is considered a kind of modification, so you may distribute
   translations of the Document under the terms of section 4. Replacing
   Invariant Sections with translations requires special permission from
   their copyright holders, but you may include translations of some or
   all Invariant Sections in addition to the original versions of these
   Invariant Sections. You may include a translation of this License, and
   all the license notices in the Document, and any Warranty Disclaimers,
   provided that you also include the original English version of this
   License and the original versions of those notices and disclaimers. In
   case of a disagreement between the translation and the original version
   of this License or a notice or disclaimer, the original version will
   prevail.

   If a section in the Document is Entitled “Acknowledgements”,
   “Dedications”, or “History”, the requirement (section 4) to Preserve
   its Title (section 1) will typically require changing the actual title.

9. TERMINATION

   You may not copy, modify, sublicense, or distribute the Document except
   as expressly provided under this License. Any attempt otherwise to
   copy, modify, sublicense, or distribute it is void, and will
   automatically terminate your rights under this License.

   However, if you cease all violation of this License, then your license
   from a particular copyright holder is reinstated (a) provisionally,
   unless and until the copyright holder explicitly and finally terminates
   your license, and (b) permanently, if the copyright holder fails to
   notify you of the violation by some reasonable means prior to 60 days
   after the cessation.

   Moreover, your license from a particular copyright holder is reinstated
   permanently if the copyright holder notifies you of the violation by
   some reasonable means, this is the first time you have received notice
   of violation of this License (for any work) from that copyright holder,
   and you cure the violation prior to 30 days after your receipt of the
   notice.

   Termination of your rights under this section does not terminate the
   licenses of parties who have received copies or rights from you under
   this License. If your rights have been terminated and not permanently
   reinstated, receipt of a copy of some or all of the same material does
   not give you any rights to use it.

10. FUTURE REVISIONS OF THIS LICENSE

   The Free Software Foundation may publish new, revised versions of the
   GNU Free Documentation License from time to time. Such new versions
   will be similar in spirit to the present version, but may differ in
   detail to address new problems or concerns. See Copyleft.

   Each version of the License is given a distinguishing version number.
   If the Document specifies that a particular numbered version of this
   License “or any later version” applies to it, you have the option of
   following the terms and conditions either of that specified version or
   of any later version that has been published (not as a draft) by the
   Free Software Foundation. If the Document does not specify a version
   number of this License, you may choose any version ever published (not
   as a draft) by the Free Software Foundation. If the Document specifies
   that a proxy can decide which future versions of this License can be
   used, that proxy’s public statement of acceptance of a version
   permanently authorizes you to choose that version for the Document.

11. RELICENSING

   “Massive Multiauthor Collaboration Site” (or “MMC Site”) means any
   World Wide Web server that publishes copyrightable works and also
   provides prominent facilities for anybody to edit those works. A public
   wiki that anybody can edit is an example of such a server. A “Massive
   Multiauthor Collaboration” (or “MMC”) contained in the site means any
   set of copyrightable works thus published on the MMC site.

   “CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0
   license published by Creative Commons Corporation, a not-for-profit
   corporation with a principal place of business in San Francisco,
   California, as well as future copyleft versions of that license
   published by that same organization.

   “Incorporate” means to publish or republish a Document, in whole or in
   part, as part of another Document.

   An MMC is “eligible for relicensing” if it is licensed under this
   License, and if all works that were first published under this License
   somewhere other than this MMC, and subsequently incorporated in whole
   or in part into the MMC, (1) had no cover texts or invariant sections,
   and (2) were thus incorporated prior to November 1, 2008.

   The operator of an MMC Site may republish an MMC contained in the site
   under CC-BY-SA on the same site at any time before August 1, 2009,
   provided the MMC is eligible for relicensing.

ADDENDUM: How to use this License for your documents

   To use this License in a document you have written, include a copy of
   the License in the document and put the following copyright and license
   notices just after the title page:
Copyright  YEAR YOUR NAME

Permission is granted to copy, distribute and/or modify this document under the
terms of the GNU Free Documentation License, Version 1.3 or any later version
published by the Free Software Foundation; with no Invariant Sections, no
Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in
the section entitled “GNU Free Documentation License”.

   If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
   replace the “with… Texts.” line with this:
with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts
being LIST, and with the Back-Cover Texts being LIST.

   If you have Invariant Sections without Cover Texts, or some other
   combination of the three, merge those two alternatives to suit the
   situation.

   If your document contains nontrivial examples of program code, we
   recommend releasing these examples in parallel under your choice of
   free software license, such as the GNU General Public License, to
   permit their use in free software.
     __________________________________________________________________

Colophon

   This document was produced from DocBook source XML using OpenJade and
   the DocBook DSSSL Stylesheets.

   The production process for this instance of this document was started
   at 2016-08-30 17:09 .

  Notes

   [1]

   Although this can be worked around, to some extent, by using a utility
   like xroot , which provides a clickable area of root window.
   [2]

   startxwin is a specialized version of startx with a few differences
   appropriate to running in multiwindow mode, rather than windowed mode.
     * startxwin supplies the -multiwindow option to X
     * It uses a different script to start clients (~/.startxwinrc rather
       than ~/.xinitrc), because ~/.xinitrc will normally end by starting
       a window manager, which would be incorrect for ~/.startxwinrc (as
       it would discover the internal window manager is already running
       and exit immediately).
     * Note that startxwin no longer exits after ~/.startxwinrc has
       completed, leaving X running, but, similar to startx, waits until
       ~/.startxwinrc exits and then kills X.
       If you don't want the X server to exit until explicitly told to do
       so, end your ~/.startxwinrc with something like exec sleep
       infinity.

   [3]

   It's not recommended to start startxwin from a MS-DOS shell or by
   double-clicking it in Windows Explorer. To do so means that the X
   server is not started from a login shell, and programs started from the
   notification area icon menu will not inherit the environment of a login
   shell. This may lead to unexpected behaviour, for example, if you have
   customizations to your login shell start-up scripts which set
   environment variables.
   [4]

   Alternatively, these sessions can be started from the command line,
   e.g.
startx /usr/bin/dbus-launch mate-session

   or
echo "/usr/bin/dbus-launch startxfce4" > ~/.xinitrc

   and then running startx.
   [5]

   Note that startxwin and startx use the special option -- to mark the
   end of client options and the beginning of server options, So, for
   example, if you wish to also start the X server with the options
   -emulate3buttons and -noclipboard, as described in the Section called
   Command line parameters in Chapter 4, use the following command:
$ startx /usr/bin/fvwm2 -- -emulate3buttons -noclipboard

   [6]

   pressing the keys in that order. Right Alt + Shift is 4th-level shift.
