From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15172 invoked by alias); 16 Dec 2014 16:00:06 -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 15140 invoked by uid 89); 16 Dec 2014 16:00:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yh0-f49.google.com Received: from mail-yh0-f49.google.com (HELO mail-yh0-f49.google.com) (209.85.213.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 16 Dec 2014 16:00:03 +0000 Received: by mail-yh0-f49.google.com with SMTP id f10so6233592yha.22 for ; Tue, 16 Dec 2014 08:00:01 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.236.14.102 with SMTP id c66mr26539103yhc.6.1418745601086; Tue, 16 Dec 2014 08:00:01 -0800 (PST) Received: by 10.170.233.6 with HTTP; Tue, 16 Dec 2014 08:00:01 -0800 (PST) In-Reply-To: References: <548C82A3.9080604@gmail.com> Date: Tue, 16 Dec 2014 16:00:00 -0000 Message-ID: Subject: Re: startxwin.exe no longer exists? From: Erik Soderquist To: cygwin-xfree@cygwin.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-12/txt/msg00037.txt.bz2 > > Sure, display :0 is unavailable; checking DISPLAY in the (unwanted) > xterm shows DISPLAY is set to :5. Why's that I wonder? > > Further investigation shows ls -ltr /tmp: > > -r--r--r-- 1 william None 11 Nov 28 17:43 /tmp/.X0-lock > -r--r--r-- 1 william None 11 Dec 13 17:43 /tmp/.X1-lock > -r--r--r-- 1 william None 11 Dec 13 17:55 /tmp/.X2-lock > -r--r--r-- 1 william None 11 Dec 13 19:22 /tmp/.X3-lock > -r--r--r-- 1 william None 11 Dec 15 16:53 /tmp/.X4-lock > -r--r--r-- 1 william None 11 Dec 15 17:00 /tmp/.X5-lock > > Interesting. It looks like every time I start an X session a lock > file is created and doesn't get deleted, so the display number keeps > changing. This doesn't look right, so how do I avoid it? > > -- > Will What I do is specify the display on the command line. If it fails, I check for an existing operational session with the same display. If it exists, I simply exit the script. If not, I free the lock file and retry the X server start on the chosen display. -- Erik -- 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/