From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115954 invoked by alias); 9 Jun 2016 23:32:41 -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 115942 invoked by uid 89); 9 Jun 2016 23:32:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=DISPLAY, culprit, Manager, H*r:apache X-HELO: newsaf.bio.caltech.edu Received: from newsaf.bio.caltech.edu (HELO newsaf.bio.caltech.edu) (131.215.12.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 09 Jun 2016 23:32:30 +0000 Received: from apache by newsaf.bio.caltech.edu ([local]:local) with local id 1bB9R7-0002Y1-0u - Using Exim-4.72 (MandrivaLinux) MTA (return-path ); Thu, 09 Jun 2016 16:32:29 -0700 To: cygwin-xfree@cygwin.com Subject: new start method questions HTTP-Posting-Client: 131.215.12.212 HTTP-Posting-URI: saf.bio.caltech.edu:443/roundcubemail/index.php HTTP-Posting-User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:46.0) Gecko/20100101 Firefox/46.0 X-PHP-Originating-Script: 0:rcmail.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 09 Jun 2016 23:32:00 -0000 From: mathog Reply-To: mathog@caltech.edu Mail-Reply-To: mathog@caltech.edu Message-ID: <07401d01668c0c31f54ded0a299814a8@saf.bio.caltech.edu> X-Sender: mathog@caltech.edu User-Agent: Roundcube Webmail/0.9.5 X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: apache@saf.bio.caltech.edu X-SA-Exim-Scanned: No (on newsaf.bio.caltech.edu); SAEximRunCond expanded to false X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00001.txt.bz2 Hi, With an older version of Cygwin I had constructed a cut down distribution which included only the minimum pieces needed to run X11. It was about 40Mb, installed. Since the X11 server update the start method changed. The .bat file which starts things now has this as its active line: C:\cygwinX\bin\run.exe --quote /usr/bin/bash.exe -l -c "cd; exec /usr/bin/startxwin" Unfortunately this method creates a "/home/username" directory. The startxwin part isn't the culprit, just starting bash does it. This is sufficient: C:\cygwinX\bin\run.exe --quote /usr/bin/bash.exe -l -c "cd; ls" Is there a way to run startxwin without allowing bash to make a new home directory? Leaving off the "-l" does not create the home directory - it also does not start the X11 server. This distribution is intended to work with putty's ssh, not the ssh in cygwin. To get putty to work these changes were made to startxwin: defaultserverargs="" to defaultserverargs=" -listen tcp" and eval xinit \"$client\" $clientargs -- \"$server\" $display $serverargs to #rotate the log files, keep 2 older ones cp -f /var/log/xwin/XWin.0.log.1 /var/log/xwin/XWin.0.log.2 cp -f /var/log/xwin/XWin.0.log /var/log/xwin/XWin.0.log.1 (sleep 5; export DISPLAY=$defaultdisplay; xhost +localhost)& eval xinit \"$client\" $clientargs -- \"$server\" $display $serverargs I really don't like the cludgy way xhost is started. However, it does work, or at least it works the "most of the time" when the X11 server starts within 5 seconds. Ideally it would be more like this: (xinit \"$client\" $clientargs -- \"$server\" $display $serverargs)& export DISPLAY=$defaultdisplay; xhost +localhost wait This doesn't work though. The first line throws an error with that syntax, the part within the parens doesn't just use eval, it apparently requires it. Anybody know the correct syntax for this variant? xhost might fail because it starts before the X11 server is working, but I can deal with that once the background start is going. Thanks, David Mathog mathog@caltech.edu Manager, Sequence Analysis Facility, Biology Division, Caltech -- 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/