From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30753 invoked by alias); 3 Feb 2015 14:13:23 -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 30737 invoked by uid 89); 3 Feb 2015 14:13:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: stargate.mehconsulting.com Received: from stargate.mehconsulting.com (HELO stargate.mehconsulting.com) (65.78.188.61) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 03 Feb 2015 14:13:21 +0000 Received: from [192.168.140.48] (vpn.fdielt.com [64.170.21.194]) (authenticated bits=0) by stargate.mehconsulting.com (8.14.7/8.14.7) with ESMTP id t13EDJ2D020867 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Tue, 3 Feb 2015 06:13:19 -0800 Message-ID: <54D0D77E.3080303@winfirst.com> Date: Tue, 03 Feb 2015 14:13:00 -0000 From: Mark Hansen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: cygwin-xfree@cygwin.com Subject: Re: Launching Cygwin/X in background with no clients References: <54D01BEB.5060901@jhmg.net> <1422926502.6516.11.camel@cygwin.com> <54D058B1.90507@jhmg.net> In-Reply-To: <54D058B1.90507@jhmg.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-02/txt/msg00007.txt.bz2 On 2/2/2015 9:12 PM, Jim Garrison wrote: > 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? > Are you willing to have the X Server launch when you log into windows and just keep it running? This is what I do and I find it very useful. I launch the X server when I log in using a shortcut with the following target: C:\Apps\cygwin\bin\run.exe /usr/bin/bash.exe -l -c "/usr/bin/startxwin.exe -- -emulate3buttons 100 -multiwindow -clipboard -swcursor" I then place this shortcut into the Startup folder of my Start menu. I hope this helps. -- 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/