I have a shell script that I want to be run each time a user logs on. I use Ubuntu as the OS. The script should be run after user logon in ubuntu.

Thanks for your help

link|improve this question
feedback

3 Answers

up vote 4 down vote accepted

In Ubuntu, any script ending in .sh that's placed in /etc/profile.d/ will be run whenever a user logs in. That's what lines 4-11 of /etc/profile do.

link|improve this answer
feedback

take a look at /etc/profile

link|improve this answer
Yes i have look at that, but i can't figure out where to put my shell script path so it should be run when user has logon to the computer. – Frozzare Oct 24 '09 at 23:12
all files in /etc/profile.d/ are executed automatically, you dont have to setup an specail script path (whatever this should be) – evildead Oct 25 '09 at 0:57
feedback

Yes i have look at that, but i can't figure out where to put my shell script path so it should be run when user has logon to the computer.

link|improve this answer
2  
This isn't an answer, it's a comment. Please put it in the right place. – womble Oct 24 '09 at 23:05
1  
That's not really a fair comment when he lacks the karma to actually comment. – Cian Oct 25 '09 at 10:51
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.