Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm on Ubuntu 13.04 and I'd like to configure my terminal, so that every time a new tab/window is open, it executes the following command automatically and right away.

 /bin/bash --login

How could I achieve this? On OSX with iTerm 2 there is an option to run a command on start. I guess here I should achieve this thru some kind of dotfile...

share|improve this question
    
Why do you want to do this? When you open a new terminal, this command is already executed. –  Spack May 4 '13 at 1:27
    
No its not. I need this because of a bug in some development environment I use. The --login flag is crucial. –  Jan Netherdrake May 4 '13 at 1:51

2 Answers 2

up vote 0 down vote accepted

Add it to your ~/.bashrc: http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html

Each time a new terminal is opened ~/.bashrc is invoked.

share|improve this answer

Try:

  • In terminal, Edit > Preferences > Tab Title and command > Run a custom command of my shell.

enter image description here

Or

  • gnome-terminal --tab -e "your command" to open a new tab.

More informations: ManPage Gnome-terminal

share|improve this answer
    
Actually, just checking the run command as login shell fixed my problem. –  Jan Netherdrake May 4 '13 at 13:58

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.