public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* Changing interactive shell from Bash to Zsh
@ 2010-02-09 14:13 Anonymous bin ich
  2010-02-09 14:24 ` Wood.Chris
  2010-02-09 15:35 ` Phil Betts
  0 siblings, 2 replies; 5+ messages in thread
From: Anonymous bin ich @ 2010-02-09 14:13 UTC (permalink / raw)
  To: cygwin-xfree

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?

-- 
Regards,

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Changing interactive shell from Bash to Zsh
  2010-02-09 14:13 Changing interactive shell from Bash to Zsh Anonymous bin ich
@ 2010-02-09 14:24 ` Wood.Chris
  2010-02-09 14:41   ` Anonymous bin ich
  2010-02-09 15:35 ` Phil Betts
  1 sibling, 1 reply; 5+ messages in thread
From: Wood.Chris @ 2010-02-09 14:24 UTC (permalink / raw)
  To: ichbinanon; +Cc: cygwin-xfree

Add 

exec zsh -l 

at the end of your .bash_profile 


Chris 



From:   Anonymous bin ich <ichbinanon@gmail.com>
To:     cygwin-xfree@cygwin.com
Date:   02/09/2010 09:13 AM
Subject:        Changing interactive shell from Bash to Zsh
Sent by:        cygwin-xfree-owner@cygwin.com



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?

-- 
Regards,





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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Changing interactive shell from Bash to Zsh
  2010-02-09 14:24 ` Wood.Chris
@ 2010-02-09 14:41   ` Anonymous bin ich
  2010-02-09 14:58     ` Wood.Chris
  0 siblings, 1 reply; 5+ messages in thread
From: Anonymous bin ich @ 2010-02-09 14:41 UTC (permalink / raw)
  To: Wood.Chris; +Cc: cygwin-xfree

On Tue, Feb 9, 2010 at 3:20 PM,  <Wood.Chris@tatravelcenters.com>  wrote:
> Add
>
> exec zsh -l
>
> at the end of your .bash_profile
>
Then I cannot start X server from start menu icons. All I see in
taskmanager is 1 process of bash and 1 subprocess of zsh.
>
>
> Chris
>
>
>
> From:   Anonymous bin ich <ichbinanon@gmail.com>
> To:     cygwin-xfree@cygwin.com
> Date:   02/09/2010 09:13 AM
> Subject:        Changing interactive shell from Bash to Zsh
> Sent by:        cygwin-xfree-owner@cygwin.com
>
>
>
> 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?
>
> --
> Regards,
>
>
>
>
>



-- 
Regards,

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Changing interactive shell from Bash to Zsh
  2010-02-09 14:41   ` Anonymous bin ich
@ 2010-02-09 14:58     ` Wood.Chris
  0 siblings, 0 replies; 5+ messages in thread
From: Wood.Chris @ 2010-02-09 14:58 UTC (permalink / raw)
  To: Anonymous bin ich; +Cc: cygwin-xfree

When I tried it on my system, it worked. Of course, it is not really using 
zsh as your login shell, since it is running inside bash, but when you 
exit zsh, it logs you off, which is the expected behavior.

What shortcut are you using? An example of mine is

C:\cygwin\bin\run.exe -p /usr/X11R6/bin xterm -display 127.0.0.1:0.0 -ls 
-sb 1000 -fg green -bg black


Chris



From:   Anonymous bin ich <ichbinanon@gmail.com>
To:     Wood.Chris@tatravelcenters.com
Cc:     cygwin-xfree@cygwin.com
Date:   02/09/2010 09:41 AM
Subject:        Re: Changing interactive shell from Bash to Zsh



On Tue, Feb 9, 2010 at 3:20 PM,  <Wood.Chris@tatravelcenters.com>  wrote:
> Add
>
> exec zsh -l
>
> at the end of your .bash_profile
>
Then I cannot start X server from start menu icons. All I see in
taskmanager is 1 process of bash and 1 subprocess of zsh.
>
>
> Chris
>
>
>
> From:   Anonymous bin ich <ichbinanon@gmail.com>
> To:     cygwin-xfree@cygwin.com
> Date:   02/09/2010 09:13 AM
> Subject:        Changing interactive shell from Bash to Zsh
> Sent by:        cygwin-xfree-owner@cygwin.com
>
>
>
> 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?
>
> --
> Regards,
>
>
>
>
>



-- 
Regards,



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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Changing interactive shell from Bash to Zsh
  2010-02-09 14:13 Changing interactive shell from Bash to Zsh Anonymous bin ich
  2010-02-09 14:24 ` Wood.Chris
@ 2010-02-09 15:35 ` Phil Betts
  1 sibling, 0 replies; 5+ messages in thread
From: Phil Betts @ 2010-02-09 15:35 UTC (permalink / raw)
  To: cygwin-xfree

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/


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-02-09 15:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-09 14:13 Changing interactive shell from Bash to Zsh 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 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).