From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 385 invoked by alias); 27 Mar 2013 17:36:10 -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 363 invoked by uid 89); 27 Mar 2013 17:36:01 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_TX autolearn=ham version=3.3.1 Received: from mail-la0-f44.google.com (HELO mail-la0-f44.google.com) (209.85.215.44) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 27 Mar 2013 17:35:49 +0000 Received: by mail-la0-f44.google.com with SMTP id eb20so16197804lab.31 for ; Wed, 27 Mar 2013 10:35:47 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.112.68.34 with SMTP id s2mr10433128lbt.111.1364405746838; Wed, 27 Mar 2013 10:35:46 -0700 (PDT) Received: by 10.114.18.48 with HTTP; Wed, 27 Mar 2013 10:35:46 -0700 (PDT) In-Reply-To: <51532129.6070603@dronecode.org.uk> References: <51532129.6070603@dronecode.org.uk> Date: Wed, 27 Mar 2013 19:37:00 -0000 Message-ID: Subject: Re: Is there a way to spawn processes from the XWin login shell? From: Thiago Padilha To: cygwin-xfree Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2013-03/txt/msg00027.txt.bz2 As you have shown me, I probably overcomplicated my question. It would have been simpler if I asked: 'can I make XWin start child processes without using the tray icon?' :) The reason I was trying to do that is because my zsh login scripts set things that only make sense once in a traditional XServer lifetime(setxkbmap,xmodmap,ssh-agent), not to mention xmodmap complains the second time it is ran. I managed to refactor the scripts so they can be run many times in the same x-server so everything is fine now. In any case, you should consider implementing a flag to XWin.exe so it can spawn processes in an already running instance of XWin.exe, as this would bring XWin more close to the spirit of traditional X window managers where a login environment is only created once per session. Anyway, thanks for your help Jon On Wed, Mar 27, 2013 at 1:41 PM, Jon TURNEY wrote: > On 23/03/2013 00:02, Thiago Padilha wrote: >> XWin uses a login shell to configure its environment when it starts >> up, and processes spawned from the tray icon inherit XWin environment >> so they don't have to be spawned from login shells. Is there a way to >> achieve the same effect without using a tray icon? > > Yes. > >> For example, can I have a desktop shortcut that launches a terminal >> emulator with a simple interactive(non-login) shell and still have it >> inherit the currently running XWin environment like it was started >> from the tray icon? > > To inherit implies that it is a child of XWin, so no. > > However, you can create a process with an identical login environment by > requesting the shell to create a login environment. > > On 27/03/2013 15:52, Thiago Padilha wrote: >> Actually, I use windows shortcut with the following command line: >> C:\cygwin\bin\run.exe /usr/bin/zsh -l -c 'exec startxwin' >> >> I'm guessing the startxwin is responsible for setting up the login >> environment. Still, the only way to start processes inheriting from >> the login shell seems to be by using the tray icon. > > Reading 'man zsh' would save you having to guess. > > The login environment is nothing to do with startxwin. You are requesting zsh > to create the login environment with the '-l' flag. > > -- > Jon TURNEY > Volunteer Cygwin/X X Server maintainer -- 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/