This is the mail archive of the cygwin-xfree mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: STARTXWIN.BAT Hanging Under Win2KPro


So next time, the xterm should pop up.

Look at the screenshot attached for evidence.  Also, when I run my startup
script, the window reads:

------------------------------------------------
|C:\WINNT\system32\cmd.exe                     |
------------------------------------------------
|The system cannot find the path specified.    |
|Startxwin.bat - Starting on Windows NT/2000/XP|
|                                              |
|                                              |
|                                              |
------------------------------------------------

(closes after this brief moment)

Then XWin.exe starts, does all the things specifed in startxwin.bat, and
will popup an xterm, like I have in the screenshot attached.

> -----Original Message-----
> From: cygwin-xfree-owner@cygwin.com
> [mailto:cygwin-xfree-owner@cygwin.com]On Behalf Of Charli Li
> Sent: Saturday, June 10, 2006 10:07 AM
> To: cygwin-xfree@cygwin.com
> Subject: RE: STARTXWIN.BAT Hanging Under Win2KPro
>
>
> In my case, the startxwin.bat file doesn't set the paths correctly.  I had
> to modify it to suit my needs, like this (to follow a batch
> script I wrote):
>
> startxwin.bat:
>
> @echo off
> SET DISPLAY=127.0.0.1:0.0
>
>
> REM
> REM The path in the CYGWIN_ROOT environment variable assignment assume
> REM that Cygwin is installed in a directory called 'cygwin' in the root
> REM directory of the current drive.  You will only need to modify
> REM CYGWIN_ROOT if you have installed Cygwin in another directory.  For
> REM example, if you installed Cygwin in \foo\bar\baz\cygwin, you will need
> REM to change \cygwin to \foo\bar\baz\cygwin.
> REM
> REM This batch file will almost always be run from the same drive (and
> REM directory) as the drive that contains Cygwin/X, therefore you will
> REM not need to add a drive letter to CYGWIN_ROOT.  For example, you do
> REM not need to change \cygwin to c:\cygwin if you are running this
> REM batch file from the C drive.
> REM
>
> SET RUN=%CYGWINBASE%\bin\run -p /usr/X11R6/bin
>
> SET PATH=.;%CYGWINBASE%\bin;%CYGWINBASE%\usr\X11R6\bin;%PATH%
>
> SET XAPPLRESDIR=/usr/X11R6/lib/X11/app-defaults
> SET XCMSDB=/usr/X11R6/lib/X11/Xcms.txt
> SET XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
> SET XNLSPATH=/usr/X11R6/lib/X11/locale
>
>
> REM
> REM Cleanup after last run.
> REM
>
> if not exist %CYGWIN_ROOT%\tmp\.X11-unix\X0 goto CLEANUP-FINISH
> attrib -s %CYGWIN_ROOT%\tmp\.X11-unix\X0
> del %CYGWIN_ROOT%\tmp\.X11-unix\X0
>
> :CLEANUP-FINISH
> if exist %CYGWIN_ROOT%\tmp\.X11-unix rmdir %CYGWIN_ROOT%\tmp\.X11-unix
>
>
> REM
> REM The error "Fatal server error: could not open default font 'fixed'" is
> REM caused by using a DOS mode mount for the mount that the Cygwin/X
> REM fonts are accessed through.  See the Cygwin/X FAQ for more
> REM information:
> REM http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-error-font-eof
> REM
>
> if "%OS%" == "Windows_NT" goto OS_NT
>
> REM Windows 95/98/Me
> echo startxwin.bat - Starting on Windows 95/98/Me
>
> goto STARTUP
>
> :OS_NT
>
> REM Windows NT/2000/XP/2003
> echo startxwin.bat - Starting on Windows NT/2000/XP/2003
>
> :STARTUP
>
> REM Brief descriptions of XWin-specific options:
> REM
> REM -screen scr_num [width height]
> REM      Enable screen scr_num and optionally specify a width and
> REM      height for that screen.
> REM      Most importantly, any parameters specified before the
> first -screen
> REM      parameter apply to all screens.  Any options after the
> first -screen
> REM      parameter apply only to the screen that precedes the parameter.
> REM      Example:
> REM          XWin -fullscreen -screen 0 -screen 1 -depth 8 -screen 2
> REM      All screens will be fullscreen, but screen 2 will be
> depth 8, while
> REM      screens 0 and 1 will be the default depth (whatever depth Windows
> REM      is currently running at).
> REM -multiwindow
> REM      Start an integrated Windows-based window manager.  Not to be used

> REM      with -rootless nor -fullscreen.
> REM -rootless
> REM      Use a transparent root window with an external window manager
> REM      (such as twm).  Not to be used with -multiwindow nor
> REM      with -fullscreen.
> REM -fullscreen
> REM      Use a window as large as possible on the primary monitor.
> REM -multiplemonitors
> REM      Create a root window that covers all monitors on a
> REM      system with multiple monitors.
> REM -clipboard
> REM      Enable the integrated version of xwinclip.  Do not use in
> REM      conjunction with the xwinclip program.
> REM -depth bits_per_pixel
> REM      Specify the screen depth to run at (in bits per pixel) using a
> REM      DirectDraw-based engine in conjunction with the -fullscreen
> REM      option, ignored if the -fullscreen option is not specified.
> REM      By default, you will be using a DirectDraw based engine on any
> REM      system that supports it.
> REM -unixkill
> REM      Trap Ctrl+Alt+Backspace as a server shutdown key combination.
> REM -nounixkill
> REM      Disable Ctrl+Alt+Backspace as a server shutdown key combination
> (default).
> REM      Example:
> REM          XWin -unixkill -screen 0 -screen 1 -screen 2 -nounixkill
> REM      Screens 0 and 1 will allow Ctrl+Alt+Backspace, but screen 2 will
> not.
> REM -winkill
> REM      Trap Alt+F4 as a server shutdown key combination (default).
> REM -nowinkill
> REM      Disable Alt+F4 as a server shutdown key combination.
> REM -scrollbars
> REM      Enable resizing of the server display window.  Do not use in
> conjunction
> REM      with -multiwindow nor with -rootless.
> REM -nodecoration
> REM      Draw the server root window without a title bar or border.
> REM      Do not use with -mutliwindow nor with -rootless.
> REM -lesspointer
> REM      Hide the Windows mouse cursor anytime it is over any part of the
> REM      window, even if Cygwin/X is not the window with the focus.
> REM -refresh rate_in_Hz
> REM      Specify a refresh rate to use when used with the -fullscreen
> option.
> REM -trayicon
> REM      Enable the tray icon (default).
> REM -notrayicon
> REM      Disable the tray icon.
> REM      Example:
> REM          XWin -notrayicon -screen 0 -screen 1 -screen 2 -trayicon
> REM      Screens 0 and 1 will not have tray icons, but screen 2 will.
> REM -emulate3buttons [timeout]
> REM      Emulate 3 button mouse with an optional timeout in milliseconds.
> REM -xf86config
> REM      Specify an XF86Config-style configuration file.
> REM -keyboard
> REM      Specify a keyboard device from the configuration file.
>
>
> REM
> REM Startup the programs
> REM
>
>
> REM Startup the X Server with the integrated Windows-based window manager.
> REM WARNING: Do not use 'xwinclip' in conjunction with the ``-clipboard''
> REM command-line parameter for XWin.  Doing so would start two clipboard
> REM managers, which is never supposed to happen.
>
> %RUN% XWin -multiwindow -clipboard -silent-dup-error
>
>
> REM Startup an xterm, using bash as the shell.
>
> %RUN% xterm -e /usr/bin/bash -l
>
>
> REM
> REM Startup the twm window manager.
> REM WARNING: Do not use an external window manager in conjunction with
> REM the ``-multiwindow'' command-line parameter for XWin.  Doing so
> REM would start two window managers, which is never supposed to happen.
> REM
>
> REM %RUN% twm
>
>
> REM Set a background color.  Only needed when not using -multwindow for
> XWin.
>
> REM %RUN% xsetroot -solid aquamarine4
>
> My startup script (Start Menu\Programs\Startup\Cygwin-X.bat):
>
> @echo off
> color 0f
>
> D:
> set CYGWINBASE=D:\LH34IG2HGB\cygwin
> set HOME=D:\LH34IG2HGB\HOME
> set VC="D:\LH34IG2HGB\Microsoft Visual Studio\VC"
> set VCVARS=%VC%\vcvarsall.bat
> set PSDK="D:\LH34IG2HGB\PFILES\Microsoft Platform SDK"
> call %VCVARS%
> set PATH=%PATH%;%CYGWINBASE%\bin
> chdir=%CYGWINBASE%\bin
>
> cd ..
> cd usr\X11R6\bin
> startxwin.bat
>
> Basically meaning that the batch file in the startup folder implies
> startxwin.bat so you can remove some set PATH stanzas.
>
> Charli
>
> > -----Original Message-----
> > From: cygwin-xfree-owner@cygwin.com
> > [mailto:cygwin-xfree-owner@cygwin.com]On Behalf Of Brett Serkez
> > Sent: Saturday, June 10, 2006 8:59 AM
> > To: cygwin-xfree@cygwin.com
> > Subject: Re: STARTXWIN.BAT Hanging Under Win2KPro
> >
> >
> > <snip>
> > > This is EXACTLY the behavior I'm getting & am describing as a
> > "hang", except
> > > that I don't get a xterm.  The reason I'm trying to track it
> > down is that I
> > > would *really* like to drop a link to startxwin.bat into my
> > startup folder and
> > > have it run at startup so I don't have to think about it.
> >
> > This is exactly what I do and startup is normally successful, but not
> > always successful.  In those cases I have a short-cut on the desktop
> > and I just double click it.
> >
> > I see this more if I shutdown and restart the X server.  I have found
> > that if I put my laptop into standby, X doesn't survive the restart
> > well, so I normally shutdown X before setting it into standby and then
> > manually restart X afterwards, which is more often when I see the
> > failure.
> >
> > I suspect that the issue is in the section of the bat file that
> > attempts to cleanup after the last run, were it removes the named pipe
> > and temporary directory heirachy.   Since the operating system caches,
> > I suspect that the remove commands may still be running from this
> > cleanup when the X server starts running or there is some other
> > latency.
> >
> > I've not be able to reproduce reliably enough to test a potential fix,
> > but if you can, try adding a sleep after:
> >
> > :CLEANUP-FINISH
> > if exist %CYGWIN_ROOT%\tmp\.X11-unix rmdir %CYGWIN_ROOT%\tmp\.X11-unix
> >
> > # Allow time to be sure the cleanup has finished
> > sleep 10
> >
> > Brett
> >
> > --
> > Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> > Problem reports:       http://cygwin.com/problems.html
> > Documentation:         http://x.cygwin.com/docs/
> > FAQ:                   http://x.cygwin.com/docs/faq/
> >
> >
>
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://x.cygwin.com/docs/
> FAQ:                   http://x.cygwin.com/docs/faq/
>
>

Attachment: scrnshot04.jpg
Description: JPEG image

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]