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


Click here to return to the 'Terminal Startup Items' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Terminal Startup Items
Authored by: thinkyhead on Apr 29, '01 04:04:56PM
Yeah, there's a trick or two for getting things to start up when your session begins. One is to place a script named .tcshrc in your home folder. This startup script will work if you're using tcsh as your shell (the default). Other shell startup scripts are named similarly, as in .bashrc, .cshrc, and .sshrc.

Now if you want to get things running differently for each settings (shortcut?) file then I believe there's a hack possible but someone else will have to confirm it cuz I'm away from my X machine right now. The idea is to edit the terminal shortcut file and change the line that names the shell (that's a terminal setting, right?) Add a flag to load a different startup script. A cursory glance over the man pages for tcsh indicates there's no such flag but other shells might allow for redirection using this method. The only thing in tcsh is the -f option that tells it to skip .tcsh.

It might let you use < (input redirection) to get the input from a file which should effectively behave like a shell script. The problem with this approach is that the shell will probably quit after reading the file, which ruins the reason for using it in the first place! Gee, would spawning another shell at this point just lead to infinite regress?

[ Reply to This | # ]