This is the mail archive of the
cygwin-xfree
mailing list for the Cygwin XFree86 project.
RE: Starting Xwin - Shell Window Remains
- From: "Baksik, Frederick (NM75)" <frederick dot baksik at honeywell dot com>
- To: cygwin-xfree at cygwin dot com
- Date: Tue, 16 Aug 2005 13:07:25 -0700
- Subject: RE: Starting Xwin - Shell Window Remains
- Reply-to: cygwin-xfree at cygwin dot com
> Hi,
>
> I'm able to start and use Xwin. However, after the X server
> is up, I need to manually close the cygwin bash window (the
> one that started the X server). I've checked the usual
> places, but have not come up with a solution.
>
> This is probably more of a shell "scripting" question, but
> since the solution I'm looking for is a "windows executable
> (C:\cygwin\startxwin.bat) that I can drop into my StartUp
> folder to automatically start Xwin" when I log in, here I am.
>
> Here's where I'm at thus far:
>
> 1. C:\cygwin\startxwin.bat exists, and has the following contents:
>
> @echo off
>
> c:
> chdir c:\cygwin\bin
>
> bash --login -i /usr/local/bin/myxwin
>
> 2. /usr/local/bin/myxwin exists, and has the following contents:
>
> #!/usr/bin/bash
> #
> # Start the Cygwin X server, xwin
>
> echo Starting X server...
>
> # Succeeds, but must kill cygwin bash window manually nohup
> xwin -multiwindow -clipboard -emulate3buttons >/dev/null 2>&1 &
>
> # Same as previous
> #(nohup xwin -multiwindow -clipboard -emulate3buttons
> >/dev/null 2>&1 &) && exit
>
> # Same as previous
> #exec $(nohup xwin -multiwindow -clipboard -emulate3buttons
> >/dev/null 2>&1 &)
>
> # have tried permutations of the above commands, without success.
> # odd, can't seem to find "fork" in cygwin. errors occur, so
> it's not a shell builtin.
>
> echo You can safely close this window
>
> # Also doesn't work - the PID no longer exists #kill -9 $$
>
> ----------
> Thanks in advance,
> -Brett
With the Cygwin/X X-startup-scripts-1.0.10-4 package the following batch
files were included:
C:\cygwin\usr\X11R6\bin\startxwin.bat
C:\cygwin\usr\X11R6\bin\startxdmcp.bat -- for XDMCP with another host
Both of these start Xwin and there is no cygwin bash window to close.
Note that the xstartxwin.bat file after starting Xwin also starts an Xterm.
The batch could be modified to not start the Xterm.
Apparently it has something to do with C:\cygwin\usr\X11R6\bin\run.exe, but
I couldn't find much on this executable.
--
Frodak
--
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/