Magnus Therning wrote in gmane.linux.ubuntu.user.british > On Thu, Oct 20, 2005 at 09:19:04PM +0100, David M wrote: >> >>I'd like, when I login, for one of these terminals to run some commands >>automatically. I know these would go in some kind of login file (eg, >>the more-obviously-entitled-than-some .login, in some cases), but I >>don't know which. > > Just to clarify, you want *one* out of several bash instances to run the > commands? > > AFAIK anything you put in ~/.bash* will be run for *every* instance you > start, so you'll need some more magic.
Aye, good point. :-( Actually, considering what I want to do, it won't really matter if each shell runs the commands as they're not state-changing. > What types of commands do you want to run in the bash instance? All that I really want is for the terminal to display the contents of a "TODO" file when I login, to remind me of things I need to do! It wouldn't matter if each startup terminal did this, although I suppose it would be better if subsequently-started terminals didn't do this (is there a way for an X-terminal to tell whether it is started on startup or manually?). > I think the easiest thing is to replace one of the `gnome-terminal` > calls you have in your existing script with > `gnome-terminal -e 'bash -rcfile ~/.bash_specialrc'`. This will start a > bash instance that uses ~/.bash_specialrc instead of /etc/bash.bashrc > and ~/.bashrc. Ah yes, that's an idea. Thing is, I don't know what starts up the terminals(!). They start because I deliberately leave them open so that KDE saves them as part of the session, and then restarts them automatically. I don't know where KDE saves this information, though? Thanks, David. -- --| David M. -- [en, fr, (de)] -- | reply-to email is valid <365d, | --| Edinburgh, Scotland. | but reply-to-list preferred | » Don't look lazy & stupid: Please trim & interleave quotes in replies « *Research climate change on your computer: http://climateprediction.net* -- ubuntu-uk mailing list ubuntu-uk@lists.ubuntu.com http://lists.ubuntu.com/mailman/listinfo/ubuntu-uk