View previous topic :: View next topic |
Author |
Message |
Astronome Tux's lil' helper
Joined: 02 Jan 2016 Posts: 148
|
Posted: Mon Feb 01, 2016 1:11 am Post subject: [Solved] /etc/profile not getting sourced automatically |
|
|
After merging minetest, I added myself to the games group. I read something about needing to reboot, so I did. Afterwards, minetest wasn't showing in my path. I noticed a new file at /etc/env.d/90games that should take care of this:
Code: |
$ cat /etc/env.d/90games
# if you don't want these added for non-games users
# see https://bugs.gentoo.org/show_bug.cgi?id=408615
LDPATH="/usr/games/lib64:/usr/games/lib"
PATH="/usr/games/bin"
|
I ran env-update and verified that it is in /etc/profile.env:
Code: |
$ grep "/usr/games/bin" /etc/profile.env
export PATH='/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.3:/usr/games/bin'
|
If I source /etc/profile, minetest shows in my path. But after a log out or reboot, it's missing again.
Shouldn't this file be sourced automatically? I'm not overwriting PATH in ~/.bash_profile or ~/.bashrc. What am I doing wrong?
Last edited by Astronome on Tue Feb 02, 2016 6:18 am; edited 1 time in total |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Mon Feb 01, 2016 3:07 pm Post subject: |
|
|
after generating profile.env it run ldconfig, and ldconfig is setup in ld.so.conf to load any .conf from /etc/ld.so.conf.d
did you check if any .conf in ld.so.conf.d is altering path? |
|
Back to top |
|
|
Astronome Tux's lil' helper
Joined: 02 Jan 2016 Posts: 148
|
Posted: Mon Feb 01, 2016 3:12 pm Post subject: |
|
|
krinn wrote: | after generating profile.env it run ldconfig, and ldconfig is setup in ld.so.conf to load any .conf from /etc/ld.so.conf.d
did you check if any .conf in ld.so.conf.d is altering path? |
Code: |
$ ls -A /etc/ld.so.conf.d/
05binutils.conf 05gcc-x86_64-pc-linux-gnu.conf
$ cat /etc/ld.so.conf.d/05binutils.conf
/usr/x86_64-pc-linux-gnu/lib
$ cat /etc/ld.so.conf.d/05gcc-x86_64-pc-linux-gnu.conf
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3
|
Last edited by Astronome on Mon Feb 01, 2016 3:26 pm; edited 2 times in total |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Mon Feb 01, 2016 3:15 pm Post subject: |
|
|
sadly, like you know already, looking good for me too. |
|
Back to top |
|
|
Astronome Tux's lil' helper
Joined: 02 Jan 2016 Posts: 148
|
Posted: Mon Feb 01, 2016 3:26 pm Post subject: |
|
|
krinn wrote: | sadly, like you know already, looking good for me too. |
Here are the relevant lines from "grep -r "\bPATH\b" /etc/":
Code: |
/etc/env.d/90games:PATH="/usr/games/bin"
/etc/env.d/04gcc-x86_64-pc-linux-gnu:PATH="/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.3"
/etc/env.d/00basic:PATH="/opt/bin"
/etc/csh.env:setenv PATH '/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.3:/usr/games/bin'
/etc/crontab:PATH=/sbin:/bin:/usr/sbin:/usr/bin
/etc/init.d/xdm: PATH=${PATH}:$(. /etc/profile.env; echo "${ROOTPATH}")
/etc/login.defs:ENV_SUPATH PATH=/sbin:/bin:/usr/sbin:/usr/bin
/etc/login.defs:ENV_PATH PATH=/bin:/usr/bin
/etc/profile.env:export PATH='/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.3:/usr/games/bin'
/etc/profile: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}"
/etc/profile: PATH="/usr/local/bin:/usr/bin:/bin:${PATH}"
|
It looks like it is being overwritten in /etc/crontab, /etc/login.defs or /etc/profile. |
|
Back to top |
|
|
Astronome Tux's lil' helper
Joined: 02 Jan 2016 Posts: 148
|
Posted: Tue Feb 02, 2016 1:49 am Post subject: |
|
|
When I log into tty and startx my path is different than when I log into LXDM:
TTY:
Code: |
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.3:/usr/games/bin
|
LXDM:
Code: |
$ echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin
|
This makes me think the problem lies with /etc/init.d/xdm. |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Tue Feb 02, 2016 2:15 am Post subject: |
|
|
I would check /etc/X11 for it, alas no idea what file you should check there.
I agree that you looks closer to the solve by checking xdm. You should try to use another session if you can. |
|
Back to top |
|
|
Astronome Tux's lil' helper
Joined: 02 Jan 2016 Posts: 148
|
Posted: Tue Feb 02, 2016 6:18 am Post subject: |
|
|
Apparently the problem lies with LXDM, in that it doesn't source /etc/profile.
I switched to SLiM. |
|
Back to top |
|
|
|