I have modified my
.vimrc to my likings. Both files
source other files containing more configuration and plugins (
antibody). Now I would like to use these configurations when I change to the root user as well.
.zshrc looks like this
# .zshrc # Sources the files in .shell directory export SHELL_CONF_DIR='/home/myUser/.shell' source $SHELL_CONF_DIR/initShell.sh
initShell.sh does the following
# initShell.sh # Sources further scripts . $SHELL_CONF_DIR/antibody.sh . $SHELL_CONF_DIR/compinstall.sh . $SHELL_CONF_DIR/configuration.sh . $SHELL_CONF_DIR/options.sh . $SHELL_CONF_DIR/aliases.sh . $SHELL_CONF_DIR/variables.sh . $SHELL_CONF_DIR/virtualenv.sh . $SHELL_CONF_DIR/functions.sh . $SHELL_CONF_DIR/keybindings.sh . $SHELL_CONF_DIR/xorg.sh
I want to manage my
.vimrc in a similar fashion.
Now the root users
.zshrc is just a symlink to my normal users
.zshrc. This works pretty well but I think, concerning security, this might not be an ideal solution. So where should I actually put all this configuration and how should I handle it so the root user can use it, too? Or is this actually the wrong approach?
I know that I can preserve environment variables with
sudo -E but that doesn't work when doing