Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've fiddled around with my .profile and .bash_profile to speed up some stuff: PATH=$PATH:/home/yoshi/android-sdk-linux/platform-tools

First I appended the line to my .profile and perfect. Then I've read the comments:

> # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
> # exists.

Good Idea! So I've moved it over there (had to create it). And that's how this trouble started. I edit via nano, closed file and terminal window. Started new window from the launcher and get a lonely cursor blinking on a blank screen. No typical foo@bar:~$.
Same problem when switching to a tty session.

Rebooting was possible and now I can login to a tty shell though it's staying blank first and I've to interrupt something (?) via CTRL+C. Sadly this magic doesn't work on unity's terminal. :(

The relevant part of my .profile. I've removed .bash_profile.

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
    . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi
share|improve this question

1 Answer 1

up vote 6 down vote accepted

I think I need an award for this.

Not knowing ubuntu also has a .profile by default I've edited source .profile to the end of .bashrc

=> ∞

Profile called bashrc, who called profile which called bashrc.... ... facepalm

I managed to find this loop via logging execution of .profile. Adding well placed echo "including X/finding Y" revealed always the same pattern: [...] echo "include .bashrc" which brought me to mischievous source .profile-line :)

share|improve this answer
4  
Now that's one i haven't seen. I know what i'm doing to my buddy for April fools day... grins –  jrg Jan 8 '13 at 3:33

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.