From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17415 invoked by alias); 3 Feb 2015 05:12:22 -0000 Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Reply-To: cygwin-xfree@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com Received: (qmail 16234 invoked by uid 89); 3 Feb 2015 05:12:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtp.jhmg.net Received: from smtp.jhmg.net (HELO smtp.jhmg.net) (207.198.124.133) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Feb 2015 05:12:19 +0000 Received: from [192.168.10.236] (c-50-137-136-169.hsd1.or.comcast.net [50.137.136.169]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by helios.jhmg.net (Postfix) with ESMTPSA id B2DAE3384F1 for ; Tue, 3 Feb 2015 05:12:17 +0000 (UTC) Message-ID: <54D058B1.90507@jhmg.net> Date: Tue, 03 Feb 2015 05:12:00 -0000 From: Jim Garrison Reply-To: jhg@acm.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: cygwin-xfree@cygwin.com Subject: Launching Cygwin/X in background with no clients References: <54D01BEB.5060901@jhmg.net> <1422926502.6516.11.camel@cygwin.com> In-Reply-To: <1422926502.6516.11.camel@cygwin.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2015-02/txt/msg00006.txt.bz2 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/