Chapter 4. Using Cygwin/X

Table of Contents
Starting Cygwin/X
Switching Out of Cygwin/X
Stopping Cygwin/X
Window Managers
Windows Clipboard Integration
Shared Memory Support
Remote Sessions via XDMCP
Displaying Remote Clients

Starting Cygwin/X

There are several methods of starting the Cygwin/X X Server with a startup script that optionally starts initial clients and performs X server configuration (for example, loading a keyboard modifier map). Several startup methods are described below.

startxwin.bat

Use a MS-DOS batch file as the startup script.

An example startxwin.bat is included in the xinit package (installed by following the instructions in the Section called Installing Cygwin/X in Chapter 2), which starts the X server in multiwindow mode along with a single X terminal. Run /usr/bin/startxwin.bat by using the "XWin Server" shortcut under "Cygwin-X" on the Start Menu, or starting it from a MS-DOS shell, or double-clicking it in Windows Explorer.

startxwin.sh

Use a sh shell script as the startup script.

An example startxwin.sh is included in the xinit package, which starts the X server in multiwindow mode along with a single X terminal. Run /usr/bin/startxwin.sh in a Cygwin shell:


Username@CygwinHost ~
$ sh /usr/bin/startxwin.sh

startx

Use the standard X Window System startx script with its attendant ~/.xinitrc configuration file. Run startx in a Cygwin shell:


Username@CygwinHost ~
$ startx

You may create a ~/.xinitrc from the template in /etc/X11/xinit/xinitrc and then customize ~/.xinitrc as required


Username@CygwinHost ~
$ cp /etc/X11/xinit/xinitrc ~/.xinitrc
[edit ~/.xinitrc as desired]