Commands not working.

New to Debian (Or Linux in general)? Ask your questions here!

Re: Commands not working.

Postby Head_on_a_Stick » 2020-11-28 12:50

KitchM wrote:We want to know where to make the settings once and for all

Note that LightDM doesn't run the user's shell as a login session so ~/.profile won't be read. Use ~/.xsessionrc to either source ~/.profile or set PATH explicitly from there. The former approach will allow ~/.profile to work for console (TTY) logins also.

See also https://wiki.debian.org/Xsession
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13041
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Commands not working.

Postby KitchM » 2020-12-14 21:11

And does that work for all users then?
KitchM
 
Posts: 110
Joined: 2019-06-11 18:11

Re: Commands not working.

Postby reinob » 2020-12-15 07:32

KitchM wrote:And does that work for all users then?


I don't think your question, or rather request, has any sensible answer.
There is no such thing as a "universal" PATH that applies to all programs. Some programs will inherit the PATH (and/or the whole environment) of their parent process, others won't.

Some programs will apply restrictions to the environment they get (e.g. sudo) and/or load optional environments which will override the default (e.g. ~/.ssh/environment).

Even if you only focus on terminals, some will run your shell as a login shell, and others won't.

So just make sure that in *your* system the PATH for *your* particular program is set correctly.
Note that in general there's absolutely no need to adjust anything, as the PATH is rather static (mostly /usr/local/bin, /usr/bin, /bin, and /usr/local/sbin, /usr/sbin and /sbin if root). Also /usr/local/games and /usr/games is rather common.

Normally ~/.local/bin and/or ~/bin if they exist will be added to the PATH, but only for interactive shells (at .profile).

So, please ask if you have a specific question or problem.

Maybe it's even worth opening a new thread, as this one was about the OP not reading the manual, which inevitably leads to the classic "su vs su -" misunderstanding.
reinob
 
Posts: 865
Joined: 2014-06-30 11:42

Previous

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 16 guests

fashionable