X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.5 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,HDRS_LCASE,KHOP_RCVD_UNTRUST,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO,SPF_NEUTRAL X-Spam-Check-By: sourceware.org Message-ID: <20130311081754.2260@binki> Date: Mon, 11 Mar 2013 08:17:54 +1000 From: wynfield AT gmail DOT com To: cc: Subject: X11 capturing DISPLAY value X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com I wanted to capture the X11 DISPLAY value that shows on the console when 'startx &' in invoked and successful. I've tried: startx 2>&1 | grep DISPLAY\= >/tmp/xwin.txt & startx 2>&1 | grep DISPLAY >/tmp/xwin.txt & but neither worked. I could check files in /tmp/.X11-unix/* for date, owner, etc, and hope that the newest one is the right one and extract the number from the name, however if another user started an X window in the meantime I'd get the wrong DISPLAY v alue. Is there a preferred standard way to get this value? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple