You are not logged in.

#1 2013-01-18 15:03:15

neilzium
Member
Registered: 2011-12-17
Posts: 41

[SOLVED]systemd session, environment and infinality

I'm currently running awesome WM and have completely moved to a systemd managed session.
Since bash never seems to run as a login shell in the process, the /etc/profile.d scripts don't run and hence infinality font variables aren't set.
In order to get infinality working right, I've put the infinality environment variables in an EvironmentFile and loaded it with my window manager service file.
Is there possibly a better or more standard way to handle this and for any other cases where environment variables need to be loaded from a shell script?

Last edited by neilzium (2013-01-19 07:52:56)

Offline

#2 2013-01-18 15:17:16

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: [SOLVED]systemd session, environment and infinality

Something like this

if [-d /etc/profile.d/]; then
	for profile in /etc/profile.d/*.sh; do
		[ -r "$profile" ] && . "$profile"
	done
	unset profile
fi

in your .xinitrc should do the job.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#3 2013-01-18 15:37:50

neilzium
Member
Registered: 2011-12-17
Posts: 41

Re: [SOLVED]systemd session, environment and infinality

unfortunately it seems as though xinitrc isn't  run when using xorg-launch-helper from the AUR as per the systemd/user wiki page.

Offline

#4 2013-01-18 16:38:23

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: [SOLVED]systemd session, environment and infinality

Sorry, my bad, I must have misread.

As far as I know, doing it your way -- i.e. using EnvironmentFile -- is a recommended way of dealing with variables (see here).


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#5 2013-01-19 07:52:30

neilzium
Member
Registered: 2011-12-17
Posts: 41

Re: [SOLVED]systemd session, environment and infinality

Thanks for the input, will mark as solved. Hopefully the infinality patchset will have systemd session support sometime in the future. Don't know how you would implement this on a package level though.

Offline

Board footer

Powered by FluxBB