3

I have a clean installation of Ubuntu 12 and I installed bashmarks, a utility to have favorites folders on the terminal.

One of the steps is to include source ~/.local/bin/bashmarks.sh at the end of ~/.bashrc, so each time you open a terminal it loads bashmarks.

If I run source manually it starts working, but when I open a terminal is not sourced automatically.

Gabriel Staples
  • 8,025
  • 7
  • 66
  • 105
johnblanco
  • 33
  • 1
  • 3

3 Answers3

2

The problem may be that the tilde expansion is not working at the time that .bashrc is being run. It may work if you either put the full directory, or use $HOME instead of the tilde.

Looking at my system-supplied .profile, they run .bashrc, if available, by using this command: "$HOME/.bashrc"

Perhaps you should try a similar statement:

"$HOME/.local/bin/bashmarks.sh"

Marty Fried
  • 18,026
  • 5
  • 51
  • 52
2

Sounds like a double to this question. It might be that the bash in your terminal is a login shell what means .bashrc is not sourced.

ohno
  • 823
  • 4
  • 9
1

Use the -i option when loading bash to ensure it opens in "interactive" mode, thereby sourcing from ~/.bashrc upon opening. Like this:

bash -i

From man bash:

-i        If the -i option is present, the shell is interactive.

And under the "INVOCATION" section of the man pages (emphasis added):

When an interactive shell that is not a login shell is started, bash reads and executes commands from /etc/bash.bashrc and ~/.bashrc, if these files exist.

Gabriel Staples
  • 8,025
  • 7
  • 66
  • 105