zsh-users
 help / color / mirror / code / Atom feed
* disable zsh/newuser
@ 2007-05-17 22:59 Matthew Rench
  2007-05-17 23:23 ` William Scott
  2007-05-18  9:20 ` Peter Stephenson
  0 siblings, 2 replies; 6+ messages in thread
From: Matthew Rench @ 2007-05-17 22:59 UTC (permalink / raw)
  To: zsh-users

I am trying to find a way to disable the automatic execution of the
zsh/newuser module at startup for users without .z files. So far, the
only solution I have been able to find is to add this line to my
global zshenv file:

  zsh-newuser-install () {}

This seems like a kludge, though, and I was wondering if there was a
"right" way to do this?

mdr


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

* Re: disable zsh/newuser
  2007-05-17 22:59 disable zsh/newuser Matthew Rench
@ 2007-05-17 23:23 ` William Scott
  2007-05-18  9:20 ` Peter Stephenson
  1 sibling, 0 replies; 6+ messages in thread
From: William Scott @ 2007-05-17 23:23 UTC (permalink / raw)
  To: Matthew Rench; +Cc: zsh-users

If it is any consolation, your empty function is exactly the solution I
want (i.e., to only disable this in a startup script, so my users don't
mess with what I have)!

Matthew Rench wrote:
> I am trying to find a way to disable the automatic execution of the
> zsh/newuser module at startup for users without .z files. So far, the
> only solution I have been able to find is to add this line to my
> global zshenv file:
>
>   zsh-newuser-install () {}
>
> This seems like a kludge, though, and I was wondering if there was a
> "right" way to do this?
>
> mdr
>


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

* Re: disable zsh/newuser
  2007-05-17 22:59 disable zsh/newuser Matthew Rench
  2007-05-17 23:23 ` William Scott
@ 2007-05-18  9:20 ` Peter Stephenson
  2007-05-18 15:03   ` Matthew Rench
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Stephenson @ 2007-05-18  9:20 UTC (permalink / raw)
  To: zsh-users

Matthew Rench wrote:
> I am trying to find a way to disable the automatic execution of the
> zsh/newuser module at startup for users without .z files.

It's described in the INSTALL file.

... The shell then executes code in the file
scripts/newuser in the shared library area (by default
/usr/local/share/zsh/<VERSION>/scripts/newuser).  This feature can be
turned off simply by removing this script.  The module can be removed
entirely from the configured shell by editing the line starting
"name=zsh/newuser" in the config.modules file, which is generated in the
top level distribution directory during configuration: change the line to
include "link=no auto=no".

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview


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

* Re: disable zsh/newuser
  2007-05-18  9:20 ` Peter Stephenson
@ 2007-05-18 15:03   ` Matthew Rench
  2007-05-18 15:24     ` Peter Stephenson
  0 siblings, 1 reply; 6+ messages in thread
From: Matthew Rench @ 2007-05-18 15:03 UTC (permalink / raw)
  To: zsh-users

On Fri, May 18, 2007 at 10:20:32AM +0100, Peter Stephenson wrote:
> Matthew Rench wrote:
> > I am trying to find a way to disable the automatic execution of the
> > zsh/newuser module at startup for users without .z files.
> 
> It's described in the INSTALL file.
> 
> This feature can be turned off simply by removing this script.

I guess I had assumed that there would be some way to disable from
executing automatically without getting rid of it altogether, based
on this text from the man page:

  If no personal intialization files exist for the current user, a
  function is run to help you change some of the most common
  settings. It won't appear if your administrator has disabled the
  zsh/newuser module. The function is designed to be self-explanatory.
  You can run it by hand with...

which seems to indicate that it can still be run manually after it's
disabled.

Also, anyone who installs zsh from a distro package would have to
manually re-remove that script file each time their package was
upgraded.

mdr


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

* Re: disable zsh/newuser
  2007-05-18 15:03   ` Matthew Rench
@ 2007-05-18 15:24     ` Peter Stephenson
  2007-05-18 20:52       ` Tim Haynes
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Stephenson @ 2007-05-18 15:24 UTC (permalink / raw)
  To: zsh-users

Matthew Rench wrote:
> On Fri, May 18, 2007 at 10:20:32AM +0100, Peter Stephenson wrote:
> > Matthew Rench wrote:
> > > I am trying to find a way to disable the automatic execution of the
> > > zsh/newuser module at startup for users without .z files.
> > This feature can be turned off simply by removing this script.
> 
> I guess I had assumed that there would be some way to disable from
> executing automatically without getting rid of it altogether, based
> on this text from the man page:
> 
>   If no personal intialization files exist for the current user, a
>   function is run to help you change some of the most common
>   settings. It won't appear if your administrator has disabled the
>   zsh/newuser module. The function is designed to be self-explanatory.
>   You can run it by hand with...
> 
> which seems to indicate that it can still be run manually after it's
> disabled.

It sounds like I've misunderstood your problem; I thought the problem
*was* getting rid of it completely, but you want to leave it, just not
run it by default.  Actually, deleting the script will allow just that:
if you look in the script you'll find it simply invokes a function that
you can run from the command line.  Alternatively, you can simply rename
the script and let people source it under some other name.  It's there
exactly to allow customization without affecting the business end of the
process in the function zsh-newuser-install.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview


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

* Re: disable zsh/newuser
  2007-05-18 15:24     ` Peter Stephenson
@ 2007-05-18 20:52       ` Tim Haynes
  0 siblings, 0 replies; 6+ messages in thread
From: Tim Haynes @ 2007-05-18 20:52 UTC (permalink / raw)
  To: zsh-users

Peter Stephenson <pws@csr.com> writes:

[snip]
> It sounds like I've misunderstood your problem; I thought the problem
> *was* getting rid of it completely, but you want to leave it, just not
> run it by default.  Actually, deleting the script will allow just that:
> if you look in the script you'll find it simply invokes a function that
> you can run from the command line.  Alternatively, you can simply rename
> the script and let people source it under some other name.  It's there
> exactly to allow customization without affecting the business end of the
> process in the function zsh-newuser-install.

Why not touch /etc/skel/zshrc or .zshrc ?

~Tim
-- 
http://pig.sty.nu/
http://scot-pics.sty.nu/


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

end of thread, other threads:[~2007-05-18 20:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-17 22:59 disable zsh/newuser Matthew Rench
2007-05-17 23:23 ` William Scott
2007-05-18  9:20 ` Peter Stephenson
2007-05-18 15:03   ` Matthew Rench
2007-05-18 15:24     ` Peter Stephenson
2007-05-18 20:52       ` Tim Haynes

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