Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move .zprofile to .zshenv for normal linux installs? #23

Closed
yojimbosteel opened this issue Mar 10, 2024 · 3 comments
Closed

Move .zprofile to .zshenv for normal linux installs? #23

yojimbosteel opened this issue Mar 10, 2024 · 3 comments

Comments

@yojimbosteel
Copy link

yojimbosteel commented Mar 10, 2024

Hey Nick,

I think you can move the environment variables stored in '~/.config/zsh/.zprofile' into '~/.zshenv' without causing any side effects.

I was running into an issue where settings were not loading and pinned it down to how the profile works; the '.zshprofile' only loads when logging in through the shell (i.e. not the normal GUI) or through SSH. Once I moved everything into the .zshenv file, it works beautifully.

I don't use WSL or know much about it but maybe it behaves differently than a normal linux install; this could explain why it doesn't cause you any issues.

Thanks for all you do, I enjoy your content.

@nickjj
Copy link
Owner

nickjj commented Mar 10, 2024

Hi,

These dotfiles do create ~/.zshenv which ends up being a symlink to wherever you cloned the repo. It sets your XDG config path as well as ZDOTDIR so all of the config files get picked up in ~/.config/zsh.

I don't know which terminal you're using but did you configure its login shell to use zsh?

I've used these dotfiles successfully on native Linux (and macOS) without any issues with the current configuration.

@yojimbosteel
Copy link
Author

Ah, I see. The gnome-terminal has an option to launch it as a login shell, which is disabled by default. It works with the option selected. This also explains why tmux works, because it launches as a login shell by default. Thanks :)

@nickjj
Copy link
Owner

nickjj commented Mar 11, 2024

I'll add a FAQ item for this since not all terminals set that by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants