This is the mail archive of the
cygwin-xfree
mailing list for the Cygwin XFree86 project.
Launching Cygwin/X in background with no clients
- From: Jim Garrison <jhg at jhmg dot net>
- To: cygwin-xfree at cygwin dot com
- Date: Mon, 02 Feb 2015 21:12:17 -0800
- Subject: Launching Cygwin/X in background with no clients
- Authentication-results: sourceware.org; auth=none
- References: <54D01BEB dot 5060901 at jhmg dot net> <1422926502 dot 6516 dot 11 dot camel at cygwin dot com>
- Reply-to: cygwin-xfree at cygwin dot com
- Reply-to: jhg at acm dot org
On 2/2/2015 5:21 PM, Yaakov Selkowitz wrote:
> On Mon, 2015-02-02 at 16:52 -0800, Jim Garrison wrote:
>> I updated Cygwin (which pulled in a bunch of Cygwin-X updates) and
>> now startxwin no longer works. According to the log (below) it starts
>> the XServer successfully but then shuts down.
>>
>> My .startxwinrc is an empty (zero-length) file to prevent automatic
>> launching of the default clients, which I don't need.
>
> http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-startxwinrc-exit
Thanks.
I want to start an X server in the background, with no visible
clients, if it's not already running, whenever I launch a mintty
session. X should continue to run even if the mintty session that
started it is closed.
Currently I have the following in my .bash_profile
ps -ef|grep -q XWin || nohup setsid startxwin 2>startxwin.log&
This now works again after adding "exec sleep infinity" in
.startxwinrc, but I can't help feel my whole approach is a bad hack.
Both nohup and setsid seem to be required. Without setsid the mintty
will hang if I attempt to close it with exit or ^D, and without nohup
the X server terminates whenever the first mintty session is closed.
Is there a cleaner way to accomplish this objective?
--
Jim Garrison
--
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/