zsh-users
 help / color / mirror / code / Atom feed
* zprofile and .profile sourcing
@ 2022-09-08 21:37 Piscium
  2022-09-08 21:42 ` Eric Cook
  2022-09-08 23:14 ` Felipe Contreras
  0 siblings, 2 replies; 8+ messages in thread
From: Piscium @ 2022-09-08 21:37 UTC (permalink / raw)
  To: zsh-users

I have been trying (unsuccessfully) to figure out why ~/.profile is
sourced in some cases and not in others.

I am on Arch Linux, and zsh is my login shell. If I log in to Arch
over lightdm to a Xfce session, then a variable defined in .profile
becomes part of my environment. I think this is because in Arch
/etc/zsh/zprofile has a single statement that calls /etc/profile in sh
compatibility mode:
https://github.com/archlinux/svntogit-packages/blob/packages/zsh/trunk/zprofile

And here is /etc/profile:
https://github.com/archlinux/svntogit-packages/blob/packages/filesystem/trunk/profile

However if within Xfce I log in to a Linux console with Ctrl-Alt-F4;
or if I log in to a headless (no X, no Wayland) Arch VM in VirtualBox;
then a variable defined in .profile does not become part of my
environment. Why?

The Zsh man page says (in different sections):
"Login shells source /etc/profile followed by $HOME/.profile."
"If the shell is a login shell, commands are read from
/etc/zsh/zprofile and then $ZDOTDIR/.zprofile."

~/ zsh --version
zsh 5.9 (x86_64-pc-linux-gnu)

What am I missing?


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-09-13  9:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-08 21:37 zprofile and .profile sourcing Piscium
2022-09-08 21:42 ` Eric Cook
2022-09-08 21:45   ` Eric Cook
2022-09-08 22:12     ` Piscium
2022-09-08 22:30       ` Lawrence Velázquez
2022-09-08 22:45         ` Piscium
2022-09-13  7:28           ` Piscium
2022-09-08 23:14 ` Felipe Contreras

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).