New tabs do not run command as a login shell

Bug #50485 reported by John Florian
2
Affects Status Importance Assigned to Milestone
gnome-terminal (Ubuntu)
Invalid
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gnome-terminal

In the gnome-terminal preferences, there is an option to "Run command as a login shell". This option only affects the first tab.

To reproduce, define an alias (for example) in the user's .bashrc script. This alias will only be defined and available in the first (original) tab.

Revision history for this message
Richard Quirk (quirky) wrote :

The subsequent tabs have the same aliases as the 1st tab here. The only difference is that you don't get teleported back to $HOME when you open a new tab. Anything in .bashrc gets exported in the new tab though.

Revision history for this message
Daniel Holbach (dholbach) wrote :

John: does that solve the issue?

Changed in gnome-terminal:
assignee: nobody → desktop-bugs
importance: Untriaged → Low
status: Unconfirmed → Needs Info
Revision history for this message
John Florian (j100) wrote :

Daniel, no the problem hasn't been solved. It is intermittent, so I know how it's supposed to behave, but that is not always the case. Also, it may be that it's my .bash_profile that's not being sourced, since it is that file which sources my .bashrc. If I can get the problem to repeat, I'll post more details.

Revision history for this message
John Florian (j100) wrote :

Problem solved and not a bug with gnome-terminal. My ~/.bash_profile had:

[ -r .bashrc ] && source .bashrc

But, if I've moved out of my $HOME in the first tab, the above would fail to source .bashrc. I resolved the issue by changing to:

[ -r ~/.bashrc ] && source ~/.bashrc

Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks for following up.

Changed in gnome-terminal:
status: Needs Info → Rejected
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.