You are not logged in.

#1 2021-12-31 06:49:48

lyhokia
Member
Registered: 2021-01-07
Posts: 20

[SOLVED] ~/.config/environment.d/*.conf not working?

As title, I've created a custom.conf in that directory, and I wrote:

# Firefox
MOZ_ENABLE_WAYLAND=1

# Fcitx
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=\@im=fcitx

# PATH
PATH=${PATH}:${HOME}/Scripts:${HOME}/.local/bin:${HOME}/.nimble/bin:${HOME}/.yarn/bin:${HOME}/.cargo/bin

# XDG
XDG_CONFIG_HOME=${HOME}/.config
XDG_USER_CONFIG_DIR=${HOME}/.config

# Editors & Pagers
EDITOR=nvim
VISUAL=${EDITOR}
PAGER=page
TERM=alacritty

Unfortunately, none of the above environment variables I can see from shell.

BTW I'm using sway with ly as login manager on arch.

Thanks a lot!

Last edited by lyhokia (2022-01-01 02:11:48)

Offline

#2 2021-12-31 06:51:14

lyhokia
Member
Registered: 2021-01-07
Posts: 20

Re: [SOLVED] ~/.config/environment.d/*.conf not working?

Also, ~/.pam_environment is working correctly, but as the wiki said that is deprecated, so I'd like to move on to ~/.config/environment.d/*.conf.

And I found the ${HOME} semantic is not working on ~/.pam_environment

Last edited by lyhokia (2021-12-31 06:55:43)

Offline

#3 2021-12-31 08:22:48

dogknowsnx
Guest

Re: [SOLVED] ~/.config/environment.d/*.conf not working?

Please see here

#4 2021-12-31 08:31:57

lyhokia
Member
Registered: 2021-01-07
Posts: 20

Re: [SOLVED] ~/.config/environment.d/*.conf not working?

dogknowsnx wrote:

Please see here

OK, so this is GDM specific, how can I make this work under ly + sway?

Last edited by lyhokia (2021-12-31 08:33:13)

Offline

#5 2021-12-31 09:01:55

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,153

Re: [SOLVED] ~/.config/environment.d/*.conf not working?

By sourcing it - see the talk page of that wiki.

Offline

#6 2021-12-31 11:40:28

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 413
Website

Re: [SOLVED] ~/.config/environment.d/*.conf not working?

And look to move from ly, it's notoriously terrible at starting sessions properly.


"the wind-blown way, wanna win? don't play"

Offline

#7 2021-12-31 15:16:12

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,493
Website

Re: [SOLVED] ~/.config/environment.d/*.conf not working?

Are any of those variables relevant for systemd user services?  Are you running any systemd user services?  If "no" to either of these, then why use that file at all?  Don't put variables in a file in which they don't belong just to end up having to source that file from where they do belong: just put then in the right file in the first place.

All those look like they could go in a shell profile assuming you log in prior to launching sway.  Ly however could be a different beast ... I have no idea how that works - if it's like most DMs, it serves no purpose other than to break things.

Last edited by Trilby (2021-12-31 15:17:36)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2022-01-01 02:11:31

lyhokia
Member
Registered: 2021-01-07
Posts: 20

Re: [SOLVED] ~/.config/environment.d/*.conf not working?

Thank you guys for replying, I fixed this by sourcing from shell

Offline

Board footer

Powered by FluxBB