Page 1 of 1

LightDM and PATH

Posted: Tue May 16, 2017 5:17 pm
by PelleB
Hello,

I have tried LightDM in stead of Slim. It works nicely with one exception, most of the PATH is lost in X. I think this is a quite well known problem, but I could not find a solution by searching the net and experimenting a bit.

Using Slim I get

Code: Select all

echo $PATH
/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin
but with LightDM only the last two. In the console (logging in as the same user on tty2) I get the full version.

What is it that I do not know?

Per B.

Re: LightDM and PATH

Posted: Tue May 16, 2017 5:49 pm
by ASX
yep, it depend on the shell you are using and therefore on the shell initialization files ~/.profile ~/.chshrc ... etc.
As far as I know /bin/sh works fine, some shell do have problem like yours.

ericbsd will add more info.

Re: LightDM and PATH

Posted: Tue May 16, 2017 8:21 pm
by ericbsd
PelleB
If you use fish add this to
/usr/local/etc/fish/config.fish
set -x PATH $PATH /sbin /usr/sbin /usr/local/sbin

Re: LightDM and PATH

Posted: Tue May 16, 2017 9:59 pm
by PelleB
That solved it! I could not have figured out that one myself. Fish was the default option at install, so I let it be installed in order to not complicate matters. maybe this was not the right idea...

Per B.