You are not logged in.

#1 2009-02-01 03:21:57

zippy
Member
Registered: 2009-02-01
Posts: 54

[SOLVED] /etc/profile.d not getting sourced?

I'm not getting any $PATH 's from anything in /etc/profile.d...
jre,
kde3,
perlbin,
glest

I'm getting pretty ^%#*&#*# tired of adding a export $path to my /etc/profile after every package I install that's not in /usr/bin and the like.

Every post I've read goes like ...

=Hay guise, KDE dun werk?

-Add /opt/kde/bin to /etc/profile.

=KTHX

..with no mention of why /etc/profile.d/kde3.sh isn't supposed to export the path for them/me.

So aren't the scripts in /etc/profile.d supposed to get sourced when i login? And if they are getting sourced aren't they supposed to add paths for me?

Last edited by zippy (2009-02-01 05:39:56)

Offline

#2 2009-02-01 03:28:54

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] /etc/profile.d not getting sourced?

You're frustrated, I understand that. But, you need to slow down there a little bit.

Yes, the stuff in /etc/profile.d/ is supposed to be sourced on log in. If you source /etc/profile, are the changes persistent the next time that you log in?

Offline

#3 2009-02-01 03:59:19

zippy
Member
Registered: 2009-02-01
Posts: 54

Re: [SOLVED] /etc/profile.d not getting sourced?

yep, manual changes to /etc/profile stay permanent, i.e they stay after each login.

I'm having to manually add paths to export after i install applications that aren't in /bin, /sbin, /usr/bin or /usr/sbin.

I wanted to use amarok, and after i installed it , i had to add /opt/kde:/opt/kde/bin to my $PATH. If i didn't , i would have to run amarok from its full path, and the icon is in /opt/kde/share so XFCE wouldnt put it in the menu. I added the path to /etc/profile, logged off/in and the icon showed up and it runs from the icon.

I couldn't run any .jars after installing jre because i had to add the path to java by hand in /etc/profile.
I just lost my patience after trying to recompile an app from ABS and it died from not being able to find pod2man in the perl path, which i noticed wasnt in my $PATH either.

But everytime i research this issue, everything tells me that the scripts in /etc/profile.d should be exporting the $PATH for me, if they aren't, i don't see the point of having them. I'm just not sure i know enough about the process.

Here is my $PATH in /etc/profile right now, after i have added the kde stuff. I manually export the path for java since i rarely need it so i havent manually added it.

# Set our default path
PATH="/bin:/usr/bin:/sbin:/usr/sbin:/opt/kde:/opt/kde/bin"
export PATH

but in /etc/profile.d resides kde3.sh which is +x, owner root & 755

export KDE3DIR=/opt/kde
export KDEDIRS=/usr:$KDE3DIR
export PATH=$PATH:$KDE3DIR/bin
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$KDE3DIR/lib/pkgconfig
if [ ! -z $XDG_DATA_DIRS ]; then
  export XDG_DATA_DIRS=$XDG_DATA_DIRS:$KDE3DIR/share
else
  export XDG_DATA_DIRS=$KDE3DIR/share
fi
if [ ! -z $XDG_CONFIG_DIRS ]; then
  export XDG_CONFIG_DIRS=$XDG_CONFIG_DIRS:$KDE3DIR/etc/xdg
else
  export XDG_CONFIG_DIRS=$KDE3DIR/etc/xdg
fi
unset KDE3DIR

and perlbin.sh

# Set path to perl scripts.
export PATH="${PATH}:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core"

but if i echo $path, its..

/bin:/usr/bin:/sbin:/usr/sbin:/opt/kde:/opt/kde/bin

Offline

#4 2009-02-01 04:21:23

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] /etc/profile.d not getting sourced?

Most of the extra PATH information in Arch is being handled in /etc/ld.so.conf and not in the profile files. I do know that KDE was an exception to this. KDE 3 is still in /opt?

Here's my /etc/ld.so.conf

#
# /etc/ld.so.conf
#

/usr/X11R6/lib
/libfakeroot
/usr/lib
/usr/lib/libfakeroot

And this is everything in /etc/profile.d:

dbus-bash-completion.sh glib2.sh  locale.sh          perlbin.sh
glib2.csh  jre.sh    mozilla-common.sh  xorg.sh

Here's the PATH:

/bin:/usr/bin:/sbin:/usr/sbin:/opt/java/jre/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core

--EDIT--

I got myself a little confused here. Whenever a package is installed, everything that needs to be sourced should be automatically, as well as anything that needs ldconf run. So everything else is working fine, just not stuff in profile.d?

Offline

#5 2009-02-01 04:51:51

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] /etc/profile.d not getting sourced?

Let me give you a better example. I just installed lib32-glibc because I knew that it would go into /opt. /etc/ld.so.conf was then updated:

/usr/X11R6/lib
/libfakeroot
/usr/lib
/usr/lib/libfakeroot
/opt/lib32/lib
/opt/lib32/usr/lib

As you can see from this example (as opposed to what I posted above), there are new paths added. All of these libraries can now be seen system wide.

Offline

#6 2009-02-01 05:10:17

zippy
Member
Registered: 2009-02-01
Posts: 54

Re: [SOLVED] /etc/profile.d not getting sourced?

Everything runs GREAT. Always has..[except the intel drivers pre 2.6.28] i seriously love arch to death. Its only the apps that live outside the default paths.
I use core/community/extra standard repos, with kdemod-legacy enabled as well. No weird stuff or configs, except xfce 4.5.99 RC1 for about a week, but I've been having this issue for about 7 months.

My ld.so.conf

 #
# /etc/ld.so.conf
#

# End of file
/usr/lib/libfakeroot
/opt/qt/lib
/opt/kde/lib

and my profile.d

-rwxr-xr-x  1 root root  553 2008-12-26 10:51 dbus-bash-completion.sh
-rwxr-xr-x  1 root root   28 2009-01-15 13:23 glib2.csh
-rwxr-xr-x  1 root root   28 2009-01-15 13:23 glib2.sh
-rwxr-xr-x  1 root root 2201 2008-12-05 22:55 gvfs-bash-completion.sh
-rwxr-xr-x  1 root root  118 2008-12-02 21:31 jre.sh
-rwxr-xr-x  1 root root  436 2008-12-06 06:35 kde3.sh
-rwxr-xr-x  1 root root  100 2009-01-30 17:41 locale.sh
-rwxr-xr-x  1 root root   75 2008-06-29 06:43 mozilla-common.sh
-rwxr-xr-x  1 root root   31 2009-01-26 16:35 openoffice.sh
-rwxr-xr-x  1 root root  118 2008-07-07 09:05 perlbin.sh
-rwxr-xr-x  1 root root  131 2008-09-14 09:15 qt3.sh
-rwxr-xr-x  1 root root  392 2008-09-20 04:53 xorg.sh

bash completion doesnt work, jre doesnt, kde apps dont, mozilla's plugins are fine, and perl doesnt. I have to manually export the path per session or in my /etc/profile for said apps to work (or just call them with their absolute paths)

Last edited by zippy (2009-02-01 05:15:14)

Offline

#7 2009-02-01 05:20:10

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] /etc/profile.d not getting sourced?

I'm not seeing what's wrong. The last thing that I can think of is with the file /etc/profile itself. Do you have a /etc/profile.pacnew file? If so, is it the same as /etc/profile?

Offline

#8 2009-02-01 05:38:46

zippy
Member
Registered: 2009-02-01
Posts: 54

Re: [SOLVED] /etc/profile.d not getting sourced?

Wow, THANKS!

I moved the profile.pacnew to profile, logged off and on, and all my paths showed up

/bin:/usr/bin:/sbin:/usr/sbin:/opt/java/jre/bin:/opt/kde/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin

The only difference in the 2 files , the .pacnew has...

# Export default pkg-config path
PKG_CONFIG_PATH="/usr/lib/pkgconfig"
export PKG_CONFIG_PATH

I'll read more about that part later. Its sleepy time.

Thanks alot again!

Offline

#9 2009-02-01 05:52:12

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] /etc/profile.d not getting sourced?

zippy wrote:

Wow, THANKS!

I moved the profile.pacnew to profile, logged off and on, and all my paths showed up

/bin:/usr/bin:/sbin:/usr/sbin:/opt/java/jre/bin:/opt/kde/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin

The only difference in the 2 files , the .pacnew has...

# Export default pkg-config path
PKG_CONFIG_PATH="/usr/lib/pkgconfig"
export PKG_CONFIG_PATH

I'll read more about that part later. Its sleepy time.

Thanks alot again!

Sweet! I'm glad we found it. Thanks for sticking with this one with me.

Offline

#10 2009-02-02 21:09:36

el_zoona
Member
From: Argentina
Registered: 2008-02-01
Posts: 58
Website

Re: [SOLVED] /etc/profile.d not getting sourced?

I'm having the same issue.

Anything that is located un /usr/sbin just "dissapear" from my visual. I added the bin path in my .bashrc, but now I discover that my Mozilla plugins are missing.

Everything is fine. Profile exists and has the hole PKG_CONFIG_PATH thing, there's no .pacnew anywhere (FTP install) and mozilla-common.sh is in place with all the right permissions.

The only thing that comes to my mind is to export everything in my ~/.bashrc, but I guess it's not an elegant solution.

My issue solved too :-). The reason? Well, I -Don't know why- put "openbox-session" in my login_cmd var in slim.conf, so Slim was ignoring my bash profile, restored to the original value and everything went fine.

Last edited by el_zoona (2009-02-02 21:38:48)


// Send more Chuck Berry

Offline

Board footer

Powered by FluxBB