No file sourced in non-login shells

0

In login shells, no problem : /etc/profile and ~/.profile are sourced. But in non-login shells (xterm in XOrg), they aren't. The $HOME variable isn't even set.

I'm using Fluxbox and the Bourne shell (/bin/sh). The only user is root, with autologin.

How to tell if in login or non-login shell : https://unix.stackexchange.com/a/237672

How can I fix it ?

Platform : x86, Buildroot, Busybox, Xorg, Fluxbox, Busybox init

dplamp

Posted 2019-01-24T09:40:00.237

Reputation: 31

Answers

0

I think I fixed it. I was calling startx from a /etc/init.d/rcS script, so of course, there was no previous login environment to propagate. Now, I call startx from /etc/profile.d/startx.sh, only if X is not running.

dplamp

Posted 2019-01-24T09:40:00.237

Reputation: 31