Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: A scheme to manage several ZSH config file collections?



On Thu, Jul 24, 2008 at 14:05, Peter Stephenson <pws@xxxxxxx> wrote:

> I don't know enough about this set-up to be able to answer this properly.
> I presume the system is strictly booting and configuring from CD only,
> so every time you boot you get to pick choices from scratch (i.e. every
> time it looks like the user has been freshly created), however I don't
> know how things are stored once the system is running.

In most cases, it is, in fact, a 'blank' CD without any volatile data. There
are ways to install grml as well as ways to keep a persistant overlay
and/or home directory on usb sticks, hdds and the likes, as well.


> You later refer to "for the first time"... I presume you mean that
> although the stuff needs doing each time you boot from the CD, later
> instances of the shell will pick up the same settings?

Yes. The session on tty1 already does display a small 'how to get
started, would you like to set up some stuff' menu which could be
expanded accordingly.
The shells on the other ttys should wait for this decission to be
made. Alternatively, they could time out and load a default or wait
until said decission is made or a key is pressed in which case they
would load the default config.


>  Do you have a
> writeable home area for the user in which .zshrc files can be copied for
> this?  In that case, the zsh/newuser module added to the main line (and
> in recent 4.3 releases) should be something like what you want, since it
> runs if there are no existing user startup files.  You may well want to
> adapt the zsh-newuser-install function to your own ends: you can simply
> write a drop-in replacement for this without altering the core of the
> system---it's been designed with this in mind.  You can simply get
> zsh-newuser-install to write a .zshrc that sources the appropriate
> selected set of files, or copy in as much or as little code and
> comments as you want.  Then the user can just edit the .zshrc.

Yes, data storage is not a problem. Depending on the end-user setup,
that would be persistant across sessions or not, but that could be
handled easily, I guess. I very much like the idea of replacing
zsh-newuser-install!
Other than sending a HUP/USR1/USR2 and trapping it in all other
zsh-newuser-install, are there any other mechnanisms that would
enable the other instances to know that a configuration decission
has been made?


> Presumably there's somewhere to save this stuff, in that case you should
> be able to use this system just by setting ZDOTDIR appropriately, since
> zsh/newuser will respect this.

Sounds like a neat solution indeed. Yet another reason to love ZSH,
I guess :)


Thanks,
Richard



Messages sorted by: Reverse Date, Date, Thread, Author