Why is the value of $PATH in console mode different from the $PATH in xterm emulator?
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Yes that's pretty annoying all this differences. Standards would help.. (maybe dash follows)
I add this type of line in scripts when I don't know when they're called.
The first few describe bash's use of the files, because that's what I'm used to. My apologies to users of other shells...
Code:
.bash_profile read by the bash shell every time you login to the system (ie only in login shells);
.bashrc is read by the bash shell every time you open a subshell with the bash command;
.profile is used by the bash shell as a synonym for .bash_profile (derived from bourne and korn shells);
/etc/profile is a system-wide 'parent' of .bash_profile/.profile;
/etc/bashrc is a system-wide 'parent' of .bashrc <= I've never used this one...
.xinitrc is a script that gets run every time startx is executed;
.xsession is executed when users log in using xdm (.xinitrc is ignored)
What's the difference between xterm, eterm and rxvt in terms of implementation that might have caused this difference? As far as I can notice, /etc/profile is the only place where my $PATH is defined.
Quote:
Originally Posted by Akhran
For testing purpose, I installed rxvt and eterm. rxvt has the same error but eterm displays the correct $PATH value ( no extra space ).
In short, $PATH shows the correct value in eterm, but incorrect in rxvt and xterm on both machines.
No file under /root but lots under /etc with 'PATH='. Eyeball check seems to indicate none of the lines in /etc contain '/ sbin'. What is the correct syntax to use to grep PATH="some_path_here:/ sbin:more_path_here" (with a space between / and sbin).
Also, another point to consider is why only eterm is not affected.
Thanks for all the replies
Quote:
Originally Posted by dracae
Use these to track down the problem
grep -r 'PATH=' /root
grep -r 'PATH=' /etc
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.