You are not logged in.
Pages: 1
Hi all.
I'm trying to run some bash commands at login but I can't seem to get it to work. I've put the commands in the ~/.bash_login file but it doesn't seem to run. I've tried it with just a simple command ("mkdir ~/test") to make sure it isn't an error in the code. ~/.bash_logout seems to work ok though.
What am I doing wrong?
Last edited by Chris Denton (2010-07-24 11:53:56)
Offline
Check if you also have a ~/.bash_profile file. If you do it is reading that first and only. Try putting your commands in that file or deleting it so it will read the .bash_login. It only reads one of ~/.bash_profile, ~/.bash_login, ~/.profile and looks for them in that order.
Offline
Ahh, thanks! That worked
Offline
Erm, actually, its not doing quite what I thought it would. It runs every time I start a new terminal in xfce. How do I just run something once when I login?
Offline
It is my understanding that ~/.bash_profile is sourced only when a new login shell is started not a new terminal. Everything in ~/.bashrc will be sourced every time a new terminal is started.
Offline
Oh, that's what I was doing wrong. Thanks again.
Offline
@ Chris Denton
Welcome to Arch. Glad you got your problem solved.
Please remember to mark topic as [solved].
Offline
Done
Offline
Pages: 1