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.
ok, this is really wierd. im creating new users with the adduser command, and there is no .bashrc in the home dir. ive tried making one, but for some reason it doesnt execute when a user logs in. but for some reason, when i launch a terminal in gnome, it does read it. anyone know how to get it to read it on login?
mattman, this may shed a little more light on your situation.
bash can start in two modes, a login shell and a non-login shell. When you login at the CLI, bash starts a login shell. When you are running an xterminal, bash starts a non-login shell.
In a login shell, bash looks at /etc/profile and the first of ~/.bash_profile, ~/.bash_login, and ~/.profile
In a non-login shell, bash looks at ~/.bashrc
That's why your users logging in at the CLI do not have the .bashrc commands execute, but when you open an xterm in gnome they do.
As whansard has pointed out, most people just source ~/.bash_profile from ~/.bashrc, so you get the same stuff no matter what kind of shell starts up.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.