Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

In Ubuntu, when I click on Switch User Account... and then choose the same account to log in (for example if my name is John Smith, I click on switch user account and then log into the John Smith account again), how can I run a script after that?

(I know, that I can run a script after "first" login by putting it in /etc/profile file, but this script is not executed again when I choose switch user account and then immediately log in back to the same account.)

share|improve this question
add comment

1 Answer

I don't know how this would behave, but you can try putting the script under ~/.bashrc, which is local to every user.

share|improve this answer
    
No it will not help me - ~/.bashrc file is executed when I start terminal - not when "relogin" –  Peter Sivák Aug 30 '12 at 17:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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