public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
From: Phil Betts <Phil.Betts@ascribe.com>
To: cygwin-xfree@cygwin.com
Subject: Re: Changing interactive shell from Bash to Zsh
Date: Tue, 09 Feb 2010 15:35:00 -0000	[thread overview]
Message-ID: <loom.20100209T161221-578@post.gmane.org> (raw)
In-Reply-To: <82839db61002090613q71ad993i3441ea83b7b65573@mail.gmail.com>

Anonymous bin ich writes:

> 
> Hi!
> 
> I am having trouble changing my shell from Bash to Zsh.
> 
> Since there is no chsh, I have tried adding "exec zsh -l" to .bashrc
> 
> Unfortunately, since cygwin is started as "interactive login shell",
> it doesn't read .bashrc and so it starts as bash
> 
> If I source .bashrc from .bash_profile (which I don't like), then it works.
> 
> But then I cannot start X server from the start menu shortcut because
> bash reads .bashrc, executes zsh and exits; even though startxwin.exe
> is called by "bash -l".
> 
> So, is there a way to change shell?
> 

All chsh does is edit the last field in /etc/passwd.  You can do this
yourself in any text editor (assuming you've got write access).  Just change
/bin/bash to /bin/zsh and you should be OK.

Don't even think about hacking .bashrc, .bash_profile or .profile.  If you
do, then anything that tries to run bash will end up running zsh, and will
probably fail. (This would include all post-install scripts run by setup.exe,
so you'd probably end up with a hosed system)

BTW, this is the wrong list for this topic; it has nothing to do with X.

Phil



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


      parent reply	other threads:[~2010-02-09 15:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-09 14:13 Anonymous bin ich
2010-02-09 14:24 ` Wood.Chris
2010-02-09 14:41   ` Anonymous bin ich
2010-02-09 14:58     ` Wood.Chris
2010-02-09 15:35 ` Phil Betts [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20100209T161221-578@post.gmane.org \
    --to=phil.betts@ascribe.com \
    --cc=cygwin-xfree@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).