* [gentoo-user] $PATH under GNOME/Wayland
@ 2024-11-18 19:24 Jishnu Kaiwar
2024-11-19 3:23 ` Alexis
0 siblings, 1 reply; 3+ messages in thread
From: Jishnu Kaiwar @ 2024-11-18 19:24 UTC (permalink / raw
To: gentoo-user
Hi! I was just wondering how those of you who use GNOME and wayland are
setting a session wide $PATH and more broadly any environment
variable. I used to source ~/.profile in ~/.xession before this.
I tried $HOME/.pam_environment on the wiki's recommendation [1] with the
syntax from pam_env.conf(5) but this didn't set the variables at all
(tested with a simple echo $GOPATH, echo $PATH).
It seems Arch Linux's wiki claims that this is not read anymore [2], so
I tried their suggested method of using systemd user environment
variables based on environment.d(5). Here I had some success in setting
some environment variables such as $GOPATH, but it did not change the
$PATH as I desired; systemctl --user reload-daemon and show-environment
to verify. This is odd because the man page has setting $PATH as an
example.
Has anybody else run into this issue? If so what do you do instead. I am
now sourcing ~/.profile from my ~/.bashrc but this seems not perfectly
"correct".
Cheers!
Jishnu
[1] https://wiki.gentoo.org/wiki/Knowledge_Base:Configuring_environment_variables
[2] https://wiki.archlinux.org/title/Environment_variables#Using_pam_env
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-user] $PATH under GNOME/Wayland
2024-11-18 19:24 [gentoo-user] $PATH under GNOME/Wayland Jishnu Kaiwar
@ 2024-11-19 3:23 ` Alexis
2024-11-19 5:36 ` Jishnu Kaiwar
0 siblings, 1 reply; 3+ messages in thread
From: Alexis @ 2024-11-19 3:23 UTC (permalink / raw
To: gentoo-user
Jishnu Kaiwar <jishnukaiwar@gmail.com> writes:
> I tried $HOME/.pam_environment on the wiki's recommendation [1]
> with
> the
> syntax from pam_env.conf(5) but this didn't set the variables at
> all
> (tested with a simple echo $GOPATH, echo $PATH).
>
> It seems Arch Linux's wiki claims that this is not read anymore
> [2],
In any case, the pam_env(8) man page says that user environment
files are not only deprecated, but:
> will be removed completely at some point in the future.
So once this discussion has determined the appropriate
alternative, i'll update that Knowledge Base page on the Gentoo
wiki accordingly.
> I tried their suggested method of using systemd user environment
> variables based on environment.d(5). Here I had some success in
> setting
> some environment variables such as $GOPATH, but it did not
> change the
> $PATH as I desired; systemctl --user reload-daemon and
> show-environment
> to verify. This is odd because the man page has setting $PATH as
> an
> example.
>
> Has anybody else run into this issue? If so what do you do
> instead. I
> am
> now sourcing ~/.profile from my ~/.bashrc but this seems not
> perfectly
> "correct".
Well, one factor: are you using a display manager, like GDM? Or
are you starting your GNOME session from the console?
(i might not be able to offer any help, as i use OpenRC, not
systemd, and don't use a display manager - over time i've found
them to be more trouble than they're worth for my use-case. i
start my Wayland sessions - previously Sway, currently Wayfire -
from the console, and i set the environment for my login session,
including PATH, in ~/.zprofile, Zsh's equivalent of
~/.bash_profile.)
Alexis.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-user] $PATH under GNOME/Wayland
2024-11-19 3:23 ` Alexis
@ 2024-11-19 5:36 ` Jishnu Kaiwar
0 siblings, 0 replies; 3+ messages in thread
From: Jishnu Kaiwar @ 2024-11-19 5:36 UTC (permalink / raw
To: gentoo-user
Alexis <flexibeast@gmail.com> writes:
> In any case, the pam_env(8) man page says that user environment files
> are not only deprecated, but:
>
>> will be removed completely at some point in the future.
Okay this explains it :)
> Well, one factor: are you using a display manager, like GDM? Or are
> you starting your GNOME session from the console?
> (i might not be able to offer any help, as i use OpenRC, not systemd,
> and don't use a display manager - over time i've found them to be more
> trouble than they're worth for my use-case. i start my Wayland
> sessions - previously Sway, currently Wayfire - from the console, and
> i set the environment for my login session, including PATH, in
> ~/.zprofile, Zsh's equivalent of ~/.bash_profile.)
I am starting GNOME by having the gdm systemd service enbaled. Thanks
for sharing your setup though.
I suspect that since PATH is the only variable I tested that is set
elsewhere, the reason that it in particular is not being set may have to
do with order of operations. I later tried to set EDITOR this way but
systemctl --user show-environment after a daemon-reload gave me that
EDITOR was the default /bin/nano.
Best,
Jishnu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-19 5:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-18 19:24 [gentoo-user] $PATH under GNOME/Wayland Jishnu Kaiwar
2024-11-19 3:23 ` Alexis
2024-11-19 5:36 ` Jishnu Kaiwar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox