From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4875 invoked by alias); 23 Dec 2014 18:24:42 -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 4862 invoked by uid 89); 23 Dec 2014 18:24:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KAM_TIME,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-wg0-f53.google.com Received: from mail-wg0-f53.google.com (HELO mail-wg0-f53.google.com) (74.125.82.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 23 Dec 2014 18:24:33 +0000 Received: by mail-wg0-f53.google.com with SMTP id l18so9639094wgh.40 for ; Tue, 23 Dec 2014 10:24:30 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.195.11.74 with SMTP id eg10mr55302940wjd.107.1419359070145; Tue, 23 Dec 2014 10:24:30 -0800 (PST) Received: by 10.194.62.144 with HTTP; Tue, 23 Dec 2014 10:24:30 -0800 (PST) Date: Tue, 23 Dec 2014 18:24:00 -0000 Message-ID: Subject: Need help to replicate old behavior of my X setup scripts with latest Xfree86 update From: Ben Richards To: "cygwin-xfree@cygwin.com" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2014-12/txt/msg00057.txt.bz2 Up until the recent update to xinit-1.3.4-1 which overhauled X session handling, I had my session set up nicely for my purposes. With the following code in my .zshrc and an empty .startxwinrc, when I launched Cygwin, Xwin.exe would start on display :0.0, it would set the $DISPLAY variable, and automatically kill the X server when I exited that terminal. I like mintty so this let me use that as my shell. .zshrc contents: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D startxwin &> xserver.log x_start_success=3D$? if [[ $x_start_success =3D=3D 0 ]]; then export DISPLAY=3D:0.0 pid=3D`ps | grep '/usr/bin/XWin' | awk '{print $1;}'` alias kill_xwin=3D"kill $pid" if [[ $TMUX =3D=3D "" ]] && [[ $x_start_success =3D=3D 0 ]]; then alias exit=3D"kill $pid ; \exit" fi fi The aforementioned update disrupted this flow so I=E2=80=99m wondering if anyone has any suggestions on how I can regain a similar sort of functionality. I don=E2=80=99t like using xterm in Cygwin and would like to keep using mintty as my main terminal interface. Before, when I ran startxwin it would launch the server and quit with an error status as to whether it was successful or not, leaving Xwin.exe running in the background. Now it stays in the foreground unless I specify otherwise. However, my startup script relied on the assumption that Xwin.exe was running by the time startxwinrc finished, which I cannot guarantee if I run it as a background task. It also used the exit status where if it was nonzero, I could assume that I already had X running and it wouldn=E2=80=99t kill the server if I typed =E2=80=98exit=E2=80=99 to exit = any subsequent mintty windows I launched with Alt+F2. I've tried various configurations and read through the man pages but haven=E2=80=99t come up with an elegant solution other than the idea of looping on the =E2=80=98ps=E2=80=99 until I see Xwin.exe in the list. Is th= ere a better way? Sincerely, Benjamin Richards -- 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/