Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'You can also just use .login' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
You can also just use .login
Authored by: wilkens on Mar 16, '03 08:56:27PM
Seems like the following should work - I use it to run a simple script when I log in and it works for me:

  1. In your home directory, create a text file named .login
  2. Begin the file like any shell script: #!/bin/sh
  3. Put the rest of your script in this file, or call other scripts from it
  4. Make .login executable by typing chmod u+x .login from the command line
That's it. The .login script is executed every time you log in (either from the console or over the network via ssh), but not when you start up another terminal or a new shell. And it runs as the user logging in, not as root.

Hope that helps!

[ Reply to This | # ]