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.

This question already has an answer here:

When I open Konsole the settings in .profile are not executed, and it means the ~/bin is not added to the PATH.

Is there a way to get Konsole to do that?

PS. Is there a way to tell whether Konsole is running bash or dash

share|improve this question

marked as duplicate by Radu Rădeanu, Braiam, Eric Carvalho, chaskes, Seth Nov 14 '13 at 3:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

These files: .profile or .bash_profile are executed by the command interpreter only for login shells. See what is Difference between Login Shell and Non-Login Shell?

To execute, for example, .profile file in your konsole after you open it, run the following command:

source ~/.profile

or:

. ~/.profile

These commands are equivalent and they source/execute the code from inside of ~/.profile file.

share|improve this answer
    
Is there a way to get Konsole to execute the required commands every time I run it? –  vfclists Nov 13 '13 at 9:31
    
@vfclists To source ~/.profile in your ~/.bashrc file will be wrong, because ~/.profile is sourcing ~/.bashrc. But, when you log in graphically, ~/.profile will be specifically sourced, so any change that you make in this file will take effect next time when you log in. Only if you don't want to logging out and in again you have to run source ~/.profile every time when you open Konsole. –  Radu Rădeanu Nov 13 '13 at 10:09
    
The problem is although ~/.profile may be executed for the graphical shell the settings in it don't get passed on to new instances of Konsole so I will be to place those commands directly in .bashrc then. –  vfclists Nov 13 '13 at 11:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.