You are not logged in.

#1 2013-01-06 10:39:11

whoops
Member
Registered: 2009-03-19
Posts: 891

[solved] disable zsh first start "wizard" + promp warn without ~/.zshr

So... I have a global zsh configuration (including but not limited to grml-zsh-config) and don't want anything in ~/.zshrc

I'd rather not have a ~/zshrc for every user at all, but I found no way to disable the "wizard prompt" that creates one on first start if it's missing.

Also could not figure out how to remove the following "welcome" message that all users with an empty ~/.zshrc seem to get:

Set and save not yet implemented.  Please ensure your ~/.zshrc
contains something similar to the following:

  autoload -Uz promptinit
  promptinit
  prompt clint

Feels like I am missing an obvious / simple solution here...?

Last edited by whoops (2013-01-06 13:42:50)

Offline

#2 2013-01-06 12:46:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [solved] disable zsh first start "wizard" + promp warn without ~/.zshr

I don't know if there is a setting somewhere, but you could just blank out /usr/share/scripts/newuser

EDIT: According to the man page, you can also just remove /usr/lib/zsh/<version>/zsh/newuser.so

man zshmodules wrote:

THE ZSH/NEWUSER MODULE
       The  zsh/newuser  module is loaded at boot if it is available, the RCS option is set, and the PRIVILEGED option is not set (all three are true by default).  This takes
       place immediately after commands in the global zshenv file (typically /etc/zshenv), if any, have been executed.  If the module is not available it is silently  ignored
       by the shell; the module may safely be removed from $MODULE_PATH by the administrator if it is not required.

Last edited by Trilby (2013-01-06 12:51:53)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2013-01-06 13:14:55

whoops
Member
Registered: 2009-03-19
Posts: 891

Re: [solved] disable zsh first start "wizard" + promp warn without ~/.zshr

Those are both owned by the zsh package so I'd rather not change them manually hmm
But at least I found (some of) the right documentation now, thanks!

I tried adding the following to /etc/zsh/zshrc.local and /etc/zshenv:

setopt -RCS
ZDOTDIR=/etc/zsh

But that didn't help. Shouldn't that have done the trick?

On loading, the module tests if any of the start-up files .zshenv, .zprofile, .zshrc or .zlogin exist in the directory given by the environment variable ZDOTDIR, or the user's home directory if that is not set.

Could not find a way to blacklist the module or something like that.

edit: After I moved my custom zshenv to /etc/zsh, I got rid of the "new user wizard" so I'm not forced to have a ~/.zshrc now. Still getting the annoying "welcome message" though, so I guess that's something /somewhere else and not part pf the "newuser module"...

Last edited by whoops (2013-01-06 13:17:31)

Offline

#4 2013-01-06 13:29:03

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [solved] disable zsh first start "wizard" + promp warn without ~/.zshr

grep "Set and save not yet implemented." `pacman -Ql zsh` 2>/dev/null
/usr/share/zsh/functions/Prompts/promptinit:    s) print "Set and save not yet implemented.  Please ensure your ~/.zshrc"

"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2013-01-06 13:37:53

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: [solved] disable zsh first start "wizard" + promp warn without ~/.zshr

Just add a comment to that user's ~/.zshrc

Offline

#6 2013-01-06 13:40:37

whoops
Member
Registered: 2009-03-19
Posts: 891

Re: [solved] disable zsh first start "wizard" + promp warn without ~/.zshr

Trilby wrote:
grep "Set and save not yet implemented." `pacman -Ql zsh` 2>/dev/null
/usr/share/zsh/functions/Prompts/promptinit:    s) print "Set and save not yet implemented.  Please ensure your ~/.zshrc"

Thanks, that did it!

Turned out there was an "s" option somewhere in the global config files that triggered the message. Removing the -s option got rid of the messages.

Last edited by whoops (2013-01-06 13:44:04)

Offline

Board footer

Powered by FluxBB