delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/09/02/18:57:46

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,TW_PD,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
Cc: Eric Blake <eblake AT redhat DOT com>
MIME-Version: 1.0
Subject: Re: How does one change the default shell?
X-KeepSent: 206AEE4F:EB1E7D82-85257792:007DD44E; type=4; name=$KeepSent
Message-ID: <OF206AEE4F.EB1E7D82-ON85257792.007DD44E-85257792.007E1D33@lnotes-gw.ent.nwie.net>
From: RISINGP1 AT nationwide DOT com
Date: Thu, 2 Sep 2010 18:57:29 -0400
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

[ACK!  I just realized I was continuing my usurping of the thread. Sorry.]

>On 09/02/2010 04:29 PM, RISINGP1 AT nationwide DOT com wrote:
>> I use pdksh as my login shell - I have been using the Korn shell 
(thanks
>> Dave!) since 1984 or so, so it is what I am used to and has features I
>> haven't been able to find in bash - at least not yet.  So to expedite
>> script writing, I use the ksh language and features  Every time that I
>> write a script, I have to remember to put in the shebang line
>> (#!/bin/pdksh) or half the time my scripts won't work.
>>
>> Is there a way to change the default shell for cygwin?  I checked the 
user
>> guide and the FAQ, but no joy there.  I tried setting and exporting the
>> SHELL variable, but that did not work.
>
>Assuming you meant the default shell for your particular user id, it is 
>just a matter of changing cygwin.bat or whatever shortcut you are using 
>to start cygwin to call pdksh instead of bash.  You can also edit 
>/etc/passwd to set your preferred shell (some tools, like mintty, honor 
>that setting).

My /etc/passwd entry:

RISINGP1:unused_by_nt/2000/xp:287838:10545:RISINGP1,U-NWIE\RISINGP1,S-1-5-21-725345543-616249376-1177238915-277838:/cygdrive/c/cygwin/home/risingp1:/bin/pdksh

My cygwin.bat:

@echo off

C:
chdir C:\cygwin\bin

REM bash --login -i
REM pdksh -l -i
start mintty -p 70,0 -t Console -e -

This starts me off in pdksh, but when I execute a shell script, it runs 
under bash.

Any other ideas?

Thanks,

- Phil

P.S.
I did not realize I was commandeering the thread.  My apologies - it won't 
happen again.


--
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

- Raw text -


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