zsh-users
 help / color / mirror / code / Atom feed
* I get tcsh at login; want zsh
@ 2006-07-16 23:28 Russell Hoover
  2006-07-17  0:09 ` Mikael Magnusson
  2006-07-17  7:08 ` Thorsten Kampe
  0 siblings, 2 replies; 5+ messages in thread
From: Russell Hoover @ 2006-07-16 23:28 UTC (permalink / raw)
  To: zsh-users



Admins recently made a change to a shell account of mine, after which
I now no longer get my zsh prompt at login, I get a generic tcsh prompt.

I then have to type 'zsh' to get my zsh environment as I have it set up.
Also when I log out of zsh with 'bye', I get put back into the generic
tcsh prompt and then have to type 'exit' to log off:

nautilus%
nautilus%
nautilus% zsh
[nautilus:~]+                                pts/1  Sunday  2006/07/16  19:09:38
[nautilus:~]+ uname -a                       pts/1  Sunday  2006/07/16  19:09:41
SunOS nautilus 5.7 Generic_106541-12 sun4u sparc SUNW,Ultra-Enterprise
[nautilus:~]+                                pts/1  Sunday  2006/07/16  19:09:47
[nautilus:~]+                                pts/1  Sunday  2006/07/16  19:09:51
[nautilus:~]+                                pts/1  Sunday  2006/07/16  19:09:52
[nautilus:~]+ bye                            pts/1  Sunday  2006/07/16  19:09:52
nautilus% exit
logout
Connection to shell.shore.net closed.


(No changes were made to my own .zprofile, .zshenv or .zshrc.)

I mentioned this to the admins but they're clueless and, though a few
shell-account users remain on this ISP (Primushost, formerly shore.net),
shell accounts are no longer supported.  Zsh is version 3.1.6.  I need
this account for now and can't close it for awhile.

What do I need to do to be able to log directly into and directly out
of zsh?

-- 
                         // rj@panix.com //


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

* Re: I get tcsh at login; want zsh
  2006-07-16 23:28 I get tcsh at login; want zsh Russell Hoover
@ 2006-07-17  0:09 ` Mikael Magnusson
  2006-07-17  1:58   ` Vincent Lefevre
  2006-07-17  3:13   ` Christopher Browne
  2006-07-17  7:08 ` Thorsten Kampe
  1 sibling, 2 replies; 5+ messages in thread
From: Mikael Magnusson @ 2006-07-17  0:09 UTC (permalink / raw)
  To: zsh-users

On 7/17/06, Russell Hoover <rj@panix.com> wrote:
>
>
> Admins recently made a change to a shell account of mine, after which
> I now no longer get my zsh prompt at login, I get a generic tcsh prompt.
>
> I then have to type 'zsh' to get my zsh environment as I have it set up.
> Also when I log out of zsh with 'bye', I get put back into the generic
> tcsh prompt and then have to type 'exit' to log off:
>
> nautilus%
> nautilus%
> nautilus% zsh
> [nautilus:~]+                                pts/1  Sunday  2006/07/16  19:09:38
> [nautilus:~]+ uname -a                       pts/1  Sunday  2006/07/16  19:09:41
> SunOS nautilus 5.7 Generic_106541-12 sun4u sparc SUNW,Ultra-Enterprise
> [nautilus:~]+                                pts/1  Sunday  2006/07/16  19:09:47
> [nautilus:~]+                                pts/1  Sunday  2006/07/16  19:09:51
> [nautilus:~]+                                pts/1  Sunday  2006/07/16  19:09:52
> [nautilus:~]+ bye                            pts/1  Sunday  2006/07/16  19:09:52
> nautilus% exit
> logout
> Connection to shell.shore.net closed.
>
>
> (No changes were made to my own .zprofile, .zshenv or .zshrc.)
>
> I mentioned this to the admins but they're clueless and, though a few
> shell-account users remain on this ISP (Primushost, formerly shore.net),
> shell accounts are no longer supported.  Zsh is version 3.1.6.  I need
> this account for now and can't close it for awhile.
>
> What do I need to do to be able to log directly into and directly out
> of zsh?

Check what startup files are used by tcsh and put 'exec zsh' in it.

-- 
Mikael Magnusson


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

* Re: I get tcsh at login; want zsh
  2006-07-17  0:09 ` Mikael Magnusson
@ 2006-07-17  1:58   ` Vincent Lefevre
  2006-07-17  3:13   ` Christopher Browne
  1 sibling, 0 replies; 5+ messages in thread
From: Vincent Lefevre @ 2006-07-17  1:58 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]

On 2006-07-17 02:09:51 +0200, Mikael Magnusson wrote:
> On 7/17/06, Russell Hoover <rj@panix.com> wrote:
[...]
> >What do I need to do to be able to log directly into and directly out
> >of zsh?
> 
> Check what startup files are used by tcsh and put 'exec zsh' in it.

Some care must be taken. At the end of your .cshrc:

if ($?prompt && ! $?TCSH) then
  if ("$prompt" != "" && -X zsh) then
    setenv SHELL `which \zsh`
    if ($?loginsh) set SHELL = "$SHELL -l"
    exec shexec $SHELL
  endif
endif

where shexec is the attached Perl script. The tcsh exec bug has been
fixed in recent versions of tcsh; so, you may not necessarily need
shexec.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA

[-- Attachment #2: shexec --]
[-- Type: text/plain, Size: 415 bytes --]

#!/usr/bin/env perl

# Workaround for the tcsh exec bug. Example:
#   tcsh> exec shexec zsh

use strict;

eval {
  require POSIX;
  foreach (3..63)
    { POSIX::close $_ if -t $_ }
  1;
} or warn <<"EOF";
Perl POSIX module not found! The non-standard file descriptors attached
to a tty (as those let open by this buggy tcsh) could not be closed.
EOF

exec @ARGV;

# $Id: shexec 11281 2006-02-27 13:24:27Z lefevre $

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

* Re: I get tcsh at login; want zsh
  2006-07-17  0:09 ` Mikael Magnusson
  2006-07-17  1:58   ` Vincent Lefevre
@ 2006-07-17  3:13   ` Christopher Browne
  1 sibling, 0 replies; 5+ messages in thread
From: Christopher Browne @ 2006-07-17  3:13 UTC (permalink / raw)
  To: Mikael Magnusson; +Cc: zsh-users

On 7/16/06, Mikael Magnusson <mikachu@gmail.com> wrote:
> > What do I need to do to be able to log directly into and directly out
> > of zsh?
>
> Check what startup files are used by tcsh and put 'exec zsh' in it.

While easy to invoke, that mayn't be the wisest approach.

Should there not be a path to zsh, for some reason, you might discover
yourself unable to login anymore.

I'd be *much* more inclined to run some test for existence first, and,
better still, to test that zsh actually works before committing to
"exec zsh"

Thus, a logic like...

if -e /usr/bin/zsh; then
   if /usr/bin/zsh "invoke something that should return true"; then
      exec /usr/bin/zsh
   fi
fi

Perhaps that should involve a search for where zsh is...
-- 
http://www3.sympatico.ca/cbbrowne/linux.html
Oddly enough, this is completely standard behaviour for shells. This
is a roundabout way of saying `don't use combined chains of `&&'s and
`||'s unless you think Gödel's theorem is for sissies'.


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

* Re: I get tcsh at login; want zsh
  2006-07-16 23:28 I get tcsh at login; want zsh Russell Hoover
  2006-07-17  0:09 ` Mikael Magnusson
@ 2006-07-17  7:08 ` Thorsten Kampe
  1 sibling, 0 replies; 5+ messages in thread
From: Thorsten Kampe @ 2006-07-17  7:08 UTC (permalink / raw)
  To: zsh-users

* Russell Hoover (2006-07-17 00:28 +0100)
> Admins recently made a change to a shell account of mine, after which
> I now no longer get my zsh prompt at login, I get a generic tcsh prompt.
> [...]
> I mentioned this to the admins but they're clueless and, though a few
> shell-account users remain on this ISP (Primushost, formerly shore.net),
> shell accounts are no longer supported.  Zsh is version 3.1.6.  I need
> this account for now and can't close it for awhile.
> 
> What do I need to do to be able to log directly into and directly out
> of zsh?

That's a trick question, right?! To be able to log diectly into a
shell you have to make that shell your, your, your /login shell/,
right.

What do you have to do to make a shell your login shell? That's Uniz
101 so I won't tell you that but just try 'apropos "login shell"' and
the command should be the first returned.

By the way: zsh 3.1.6 is ridiciously outdated...


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

end of thread, other threads:[~2006-07-17  7:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-16 23:28 I get tcsh at login; want zsh Russell Hoover
2006-07-17  0:09 ` Mikael Magnusson
2006-07-17  1:58   ` Vincent Lefevre
2006-07-17  3:13   ` Christopher Browne
2006-07-17  7:08 ` Thorsten Kampe

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).