zim for whole system
Update documentation how to deploy zim for whole system. It is important to develop a single standard.
zimrc should be placed in /etc/... Only root can manage module list and all other users can use zsh and downloaded modules.
Update should be default off if you have not got right to write.
Generated files shoud have o+rX rights.
Bump; Would be nice to have this :)
@ericbn
@therealresonix you can contribute by describing a solution or by opening a pull request with a solution. Please be respectful and avoid adding comments that don't contribute to solving the problem described.
What are we missing here in more detailed terms? I see:
- zimfw is not setting the +r flag to init.zsh and the deprecated login_init.zsh (FIXED for next release)
-
zimfw updatefails with generic error messages when user does not have write permissions - running zimfw fails with the following if user sourced the init.zsh script from another user. Not sure what would be a better error message in this case.
_zimfw_source_zimrc:source:245: no such file or directory: /Users/me/.zimrc
Additionally, I think these are fine:
-
zimfw installfails with the following when user does not have write permissions:
ormkdir: /path/to/.zim/modules/newmodule: Permission deniedfatal: could not create work tree dir '/path/to/.zim/modules/newmodule': Permission denied -
zimfw upgradefails with the following when user does not have write permissions:
orcurl: (23) Failure writing output to destination/path/to/.zim/zimfw.zsh.new.gz: Permission denied
Anything I'm missing here?
Just released zimfw v1.14.0 with features that enabled having a system-wide installation.
The key points are:
- The "administrator" user will have the usual ~/.zshrc set up, with the exception that
ZIM_HOMEmust be set to a path outside theirHOMEdirectory. You can use e.g.ZIM_HOME=/usr/local/opt/zim.ZIM_HOME=/usr/local/opt/zim # Download zimfw plugin manager if missing. if [[ ! -e ${ZIM_HOME}/zimfw.zsh ]]; then curl -fsSL --create-dirs -o ${ZIM_HOME}/zimfw.zsh \ https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh fi # Install missing modules and update ${ZIM_HOME}/init.zsh if missing or outdated. if [[ ! ${ZIM_HOME}/init.zsh -nt ${ZIM_CONFIG_FILE:-${ZDOTDIR:-${HOME}}/.zimrc} ]]; then source ${ZIM_HOME}/zimfw.zsh init -q fi # Initialize modules. source ${ZIM_HOME}/init.zsh - Only the "administrator" user will have their ~/.zimrc to configure the zimfw plugin manager.
- Other users simply source the init.zsh script by adding this to their .zshrc:
source /usr/local/opt/zim/init.zsh - Other user must have read permission to
ZIM_HOME. - Other users cannot run the zimfw plugin manager.