Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] /etc/profile not getting sourced automatically
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Astronome
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2016
Posts: 148

PostPosted: Mon Feb 01, 2016 1:11 am    Post subject: [Solved] /etc/profile not getting sourced automatically Reply with quote

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
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Mon Feb 01, 2016 3:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
Astronome
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2016
Posts: 148

PostPosted: Mon Feb 01, 2016 3:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Mon Feb 01, 2016 3:15 pm    Post subject: Reply with quote

sadly, like you know already, looking good for me too.
Back to top
View user's profile Send private message
Astronome
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2016
Posts: 148

PostPosted: Mon Feb 01, 2016 3:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
Astronome
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2016
Posts: 148

PostPosted: Tue Feb 02, 2016 1:49 am    Post subject: Reply with quote

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
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Tue Feb 02, 2016 2:15 am    Post subject: Reply with quote

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
View user's profile Send private message
Astronome
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2016
Posts: 148

PostPosted: Tue Feb 02, 2016 6:18 am    Post subject: Reply with quote

Apparently the problem lies with LXDM, in that it doesn't source /etc/profile.

I switched to SLiM.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum