<qandadiv id="installation">
<title>&title-installation;</title>

<qandaentry>
<question id="q-windows-versions-supported">
<para>What versions of Windows does &project; run on?</para>
</question>

<answer>
<para>&project; aims to support all versions of Windows supported by
Cygwin.</para>

<para>However, &project; is not tested on older versions of Windows
(i.e. Windows NT4, Windows 2000) and may be broken. Problem reports are welcomed.
</para>

<para>&project; requires &cygwin; to compile and run.  &cygwin; is
not, as of writing, available on Microsoft Windows CE, therefore
&project; is not currently available on Microsoft Windows CE.</para>
</answer>
</qandaentry>


<qandaentry>
<question id="q-how-to-install">
<para>How is &project; installed?</para>
</question>
<answer>

<para>The <ulink url="&project-url-ug;">&project; User's Guide</ulink>
thoroughly documents the installation process.  Installation is
performed through &cygwin;'s setup
program.</para>
</answer>
</qandaentry>

<qandaentry>
<question id="q-cant-read-lock-file">
<para>Fatal server error: Can't read lock file /tmp/.X0-lock</para>
</question>

<answer>
<para>This question should be obsolete.</para>
</answer>

<answer>
<label>
A1: /tmp resides on a FAT filesystem
</label>

<para>Start the server with the <parameter>-nolock</parameter> option.  See <xref linkend="q-command-line-args"/></para>

<para>
You should really consider updating the filesystem to NTFS using Microsoft's <command>convert.exe</command> tool.
</para>

</answer>

<answer>
<label>
A2: /tmp resides on a NTFS filesystem.
</label>

<para>
This can be caused by a stale lock file being left behind after the X server is run by a user with
Adminstrator rights, which cannot be overwritten when the X server is next run by a user without
Adminstrator rights.
</para>

<para>
Failure to clean up the lock file properly is a bug in the X server, but until that is fixed the
following workarounds may be neccessary.
</para>

<orderedlist spacing="compact">

<listitem>
<para>Try removing the stale lock file using
<command>rm -f /tmp/.X<replaceable>n</replaceable>-lock</command>
where <replaceable>n</replaceable> is the display number.
If this fails due to insufficent permissions, you must either get the owner or a user with Adminstrator rights to
remove the stale lock file.
</para>
</listitem>

<listitem>
<para>Try starting the server with the <parameter>-nolock</parameter> option. (See <xref linkend="q-command-line-args"/>)</para>
</listitem>

</orderedlist>

<para>Technical details:
The X server attempts to create a lock file in
<filename class="directory">/tmp</filename> by creating the file under a temporary name,
then renaming it to the proper name (by hard linking it under the correct name, then unlinking
it from the temporary name). If this rename fails it attempts to read the existing
lock file to determine the pid of an already running server.

The FAT filesystem does not support hardlinks so this operation cannot succeed.

On NFTS filesystems, the failure case appears to be that lock file was created successfully, but
the rename failed due to a stale lock file created by a user with Adminstrator rights.
</para>
</answer>
</qandaentry>

<qandaentry>
<question id="q-startxwin-no-windows">
<para>
Nothing appears to happen when I try to start the X server using the "XWin Server" start menu shortcut.
</para>
</question>

<answer>
<label>
A1:
</label>
<para>This answer should be obsolete.</para>
<para>
Task manager shows the <command>startxwin.exe</command> process starting, spawning <command>XWin.exe</command>
and <command>xterm.exe</command>, but no windows are shown.  Running <command>startxwin.exe</command> from
a bash shell works correctly.
This is caused by having <parameter>tty</parameter> in the <parameter>CYGWIN</parameter> environment variable
set through the Windows control panel.  Removing <parameter>tty</parameter> resolves this issue.
</para>
<para>
If you really need <parameter>CYGWIN=tty</parameter> for working with <command>cmd.exe</command> windows,
you'll have to arrange to set that by some other means before invoking <command>cygwin.bat</command>.
</para>
</answer>

<answer>
<label>
A2:
</label>
<para>
Try running <command>startxwin</command> from a <command>bash</command> shell
in the <command>mintty</command> terminal emulator,
it should output some error message which should indicate why it's not able to start.
</para>
<note>
<para>
For technical reasons, the output of XWin doesn't appear in <command>cmd.exe</command> windows unless
the <parameter>CYGWIN</parameter> environment variable set through the Windows control panel contains
<parameter>tty</parameter>, so to ensure the output can be seen, use <command>mintty</command>.
</para>
</note>
</answer>

</qandaentry>

</qandadiv>
