SlackwareThis Forum is for the discussion of Slackware 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.
can you explain that . /etc/profile ? I think that is against the original way (see man page of bash, invocation)
Quote:
When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior.
...
When an interactive shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists. This may be inhibited by using the --norc option. The --rcfile file option will force bash to read and execute commands from file instead of ~/.bashrc.
Yep, running /etc/profile from bashrc is most definitely wrong.
And having xhost in there isn't really appropriate either.
This was the advice I once received in this forum when I was running terminal, su-ing up and then running thunar (as root). Before adding xhost to .bashrc, I couldn't get the thunar icons.
Several hundred posts have passed since then so it will take me a while to track down which culprit gave me that advice.
This was the advice I once received in this forum when I was running terminal, su-ing up and then running thunar (as root). Before adding xhost to .bashrc, I couldn't get the thunar icons.
Several hundred posts have passed since then so it will take me a while to track down which culprit gave me that advice.
Where the /etc/profile came from I don't remember - but it works so I am not in a hurry to fix it.
I am following BLFS approach for this and it seems good: login shell calls /etc/profile with system wide variables and calls /etc/bashrc with system wide aliases, ~/.bash_profile for custom environment variables and same thing goes for ~/.bashrc.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.