Magnus Therning magnus at therning.org
Fri Oct 21 08:09:40 CDT 2005


On Thu, Oct 20, 2005 at 09:19:04PM +0100, David M wrote:
>
>Please excuse my ignorance here, but there are so many startup files
>and so many caveats as to which gets run in which circumstances, that
>I'm confused.
>
>I login graphically which starts up an X session for me, which, amongst
>other things, starts up a number of xterminal windows (gnome-terminal,
>fwiw) for me.
>
>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.
>
>My terminal windows are running bash.
>Does anybody know which file I need to edit in this case?

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. What types of commands do you
want to run in the bash instance?

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.

/M

-- 
Magnus Therning                    (OpenPGP: 0xAB4DFBA4)
magnus at therning.org
http://therning.org/magnus

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

The notion that an anonymous posting needs to be traceable to its
source is a product of the unification of the old time conservative
desire to squelch free speech with the new fangled politically correct
liberal desire to squelch free speech.
      -- Perry E. Metzger
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.ubuntu.com/archives/ubuntu-uk/attachments/20051021/79202366/attachment.pgp


More information about the ubuntu-uk mailing list