I am very (
bash) familiar with the shell's initialization sequence when the user logs in through a text interface.
But what about the case of a "graphic login", IOW, when the user logs in through a graphic interface (e.g. through a so-called "display manager" on Linux, or the standard OS X login)?
I am particularly interested in those files (
.profile) that are supposed to be sourced only for "login shells". When the login is via a text interface, this is more or less equivalent to being sourced "exactly once per session".
When the login happens through a graphic interface, it is not clear to me that there's ever a "login shell" to begin with. And even if
.zprofile et al. are somehow sourced at some point as part of the graphic login sequence, it is not clear to me how the settings (e.g. exported environment variables) resulting from the sourcing of these files affect the rest of the of the session.
For example, do these settings affect the environment seen by apps that are auto-started at the time of login? Or by apps that the user starts later by clicking on desktop icons?
For that matter, what about the settings that happen in
.zshenv, or in
.bashrc1? Do they have any impact on the environment seen by "auto-started" and/or "click-started" apps?
If the answers to either of the last two question is something like "not by default", the follow-up question would be: how can one ensure that the settings performed in (at least)
.profile, and possibly also
.zlogin, get transmitted to the environment seen by all the "auto-started" and "click-started" applications?
I'm interested in the answers to these question for two shells,
bash, and two operating systems, Linux and OSX.
1 assuming that
.bashrc are being sourced as part of the
bash built-in initialization sequence for "interactive" shells, rather than being sourced explicitly by