delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/18/17:26:10

X-Spam-Check-By: sourceware.org
Date: Fri, 19 Jan 2007 09:25:46 +1100 (EST)
From: Luke Kendall <luke DOT kendall AT cisra DOT canon DOT com DOT au>
Subject: Re: Login shell?
To: cygwin <cygwin AT cygwin DOT com>
In-Reply-To: <eonbvh$6gg$1@sea.gmane.org>
MIME-Version: 1.0
Message-Id: <20070118222547.654E9842A9@pessard.research.canon.com.au>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 18 Jan, Thorsten Kampe wrote:
>  * Luke Kendall (Thu, 18 Jan 2007 18:03:33 +1100 (EST))
> > On 17 Jan, Thorsten Kampe wrote:
> > >  * Luke Kendall (Wed, 17 Jan 2007 13:29:31 +1100 (EST))
> > > > I just want to confirm, that the traditional Cygwin way of achieving
> > > > this same result is still to modify cygwin.bat on a PC-by-PC basis
> > > > (assuming one user per PC), rather than to take the traditional Unix
> > > > way and change the shell field in /etc/passwd?
> > >  
> > >  If you want to change your login shell you modify the passwd file.
> > 
> > That's what we do, yes, because our modified cygwin.bat runs shell.exe,
> > not bash.
>  
>  Well, that's not what you do. If you login (via ssh for instance) 
>  cygwin.bat doesn't get executed.

Good, so it's just the desktop startup for the shells that might have a
neater solution.
 
> > >  cygwin.bat is just a target for the shortcut.
> > 
> > But doesn't cygwin.bat run bash (not the shell specified in
> > /etc/passwd)?
>  
>  That correct.
>   
> > > I think the zsh 
> > >  maintainer has a batch file that creates links to start zsh instead of 
> > >  bash.
> > 
> > That sounds like it doesn't use /etc/passwd.
>  
>  mkzsh just creates a zsh.bat
>  
> > Perhaps Michael should have called shell.exe login.exe :-)
> > shell.c is only 60-odd lines long.
> > 
> > Just to be quite explicit, here is our modified cygwin.bat:
> > 
> >     @echo off
> >     C:
> >     chdir C:\cygwin\bin
> > 
> >     shell
> > 
> > It seems neater to me than the current approach.
>  
>  The neat approach is to check if your problem still exists and trying 
>  to solve it.

I think the current approach would be fine if the desktop shortcuts
were named "bash" (or "zsh" for zsh.bat), rather than Cygwin.  But for
commands like rxvt, xterm, Cygwin, it seems neater not to hard-code the
choice of shell when the choice of shell has been defined in
/etc/passwd.

Sorry, I don't think I can explain the appeal any better than that.

luke


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019