Running a script on login

K

Kryyll

Guest
I have been playing around with making my CLI have colors and things. However, they do not show up when I log in. That being said, there are different colors for the root user and the regular users. I have a ~/.bashrc file for both root and normal users but they don't run on login. I would have to run 'source ~/.bashrc' to have the colored text appear. I believe bash is suppose to check that file on login. How do I get this to run on login? Any ideas?
 


You need to place the commands into .profile, or .bash_profile, depending on the Distro. Do a 'ls -la'. If you only have one of these two files, place them in that file, otherwise see if one file calls the other, or check the documentation for the specific Distro you are using.
 
Putting the commands in .bashrc works for me on Arch. .bash_profile for other distros.
 

Members online


Top