Described below are some methods for starting a Cygwin / XX Server with a startup utility that optionally starts an initial client (e.g., terminal, window manager, or desktop environment) and performs X server configuration (e.g., loading a map keyboard).
cygWinux does not require any configuration
Starts in multiwindow mode (startxwin)
Custom XWin startup utility startxwin 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 ).
Run startxwin with:
use the "XWin Server" shortcut under "Cygwin-X" on Menu \ App \ startxwin
Starting / usr / bin / startxwin in the Cygwin shell:
$ startxwin
You can create the ~ / .startxwinrc script to customize the started client program, instead of using the default script / etc / X11 / xinit / startxwinrc .
The complete documentation for startxwin can be read with the startxwin man .
Starts 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: pasang pakej lxde-common
MATE Desktop Environment: install the mate-session-manager package
Xfce Desktop Environment: install the xfce4 session package
and use the Start Menu shortcut provided in the \ Apps \ folder
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 fvwm package
Open box window manager: install open box packages
twm window manager: install twm package
WindowMaker window manager: install the WindowMaker package
Starting an X session with XLaunch
XLaunch is a GUI wizard for starting Cygwin / XX servers and X clients locally or remotely. This session can be saved and shared as an .xlaunch file .
XLaunch is included in the xlaunch package (installed by following the instructions in the Section called Installing Cygwin / X ).
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 an online help in the program.
Starts in windowed mode (startx)
Use the command startx X Window System standard and the configuration file ~ / .xinitrc related .
Run startx in a Cygwin shell:
$ permulaanx
The complete documentation for startx can be read with startx man .
You can create ~ / .xinitrc from a template in / etc / X11 / xinit / xinitrc and then customize ~ / .xinitrc to start the client program and configure your X server.
$ cp / etc / X11 / xinit / xinitrc ~ / .xinitrc
[edit ~ / .xinitrc as desired]
Note: startx waits until ~ / .xinitrc exits (which often waits for the window manager started by it to exit) and then kills X, so the last client started should be started with exec and without & .
Alternatively, if you only want to start a single client program (perhaps a window manager), you don't need to use ~ / .xinitrc , and can start the client directly from startx , for example
$ startx / usr / bin / fvwm2
Note: The client name assigned to startx must begin with / or., Otherwise it is considered an option to the default xterm client .
Note for advanced users
Advanced users may want to start an X server by asking XWin directly, for example, to start an XDMCP session (See the Section called Remote sessions via XDMCP ).
If you want to have a Start Menu shortcut that 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 start method
The MS-DOS batch script startxwin.bat and the bash shell script startxwin.sh previously used to start the X server are no longer available. This implementation makes it difficult to wait for sure until server X starts before starting the client. As a substitute, use startxwin .
Startxwin.exe that can be executed before being used to start the X server has been terminated and replaced by a shell script startxwin .
Note
[1]
startxwin is a special version of startx with some differences that is suitable to run in multiwindow mode, rather than windowed mode.
startxwin supplies the -multiwindow option to X
It uses a different script to start the client ( ~ / .startxwinrc rather than ~ / .xinitrc ), because ~ / .xinitrc will usually end up starting the window manager, which is not correct for ~ / .startxwinrc (because it will find the internal window manager already) walk in and out immediately).
Note that startxwin no longer exits after ~ / .startxwinrc finishes, letting X run, but, similar to startx , waits until ~ / .startxwinrc exits and then kills X.
If you don't want server X to exit until explicitly told to do so, end your ~ / .startxwinrc with something like exec sleep infinity .
[2]
It is not recommended to start startxwin from the MS-DOS shell or by double-clicking on Windows Explorer. To do so means the X server is not started from the login shell, and programs started from the notification area icon menu will not inherit the login shell environment. This can lead to unexpected behavior, for example, if you have customizations on your incoming shell startup script that set environment variables.
[3]
Alternatively, this session can be started from the command line, for example
startx / etc / X11 / xinit / Xsession mate
or
echo "/ etc / X11 / xinit / Xsession xfce"> ~ / .xinitrc
and then run startx .
[4]
Note that startxwin and startx use a special option - to mark the start of the final selection of the client and server options, So, for example, if you want to also start the X server with the option -mulate3button and -noclipboard , as described in Part called command line parameters , use the following command:
$ startx / usr / bin / fvwm2 - -emulate3buttons -noclipboard