I can open my terminal emulator via a keyboard shortcut or through the apps finder that executes the exo-open --launch TerminalEmulator command. My terminal starts and I can cd to any directory and execute any binaries located on any bin directory on my system.
But whenever I launch it by right-clicking any directory on thunar and using the Open terminal here option it sometimes can't find any executable on my local binaries directory (~/.local/bin/). Simply put:
- Open terminal via app finder, command launcher, keyboard shortcut, … → It can find local executables.
- Open terminal via context menu on Thunar → It sometimes can't find local executables.
This happens on any terminal (xfce4-terminal, xterm, gnome-terminal). My machine is running Fedora 20 XFCE with thunar version 1.6.3-2.
I can't say for sure since when this started happening, because it has been some time, but this became more frequent in recent days. Also, I have to mention that once my terminals can find executables on my local bin directory and I add a new one, it won't find them again, until some time passes - no matter if it was launched via the thunar's context menu or not.
Has anybody noticed this behaviour too? Can somebody shed some light on what's happening here?
Update:
I've noticed that my .bash_profile file is what adds my local bin directory to the $PATH environmental variable:
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
And when I run a login shell (not started via the context menu), it executes .bashrc and then .bash_profile, so I proceeded to move those two lines from my .bash_profile to my .bashrc and now everything works fine.
So the question now is: why does the context menu command (which is the same as the normal command) somehow make my terminal to be launched as only interactive and not as a login terminal?
/home/user/.local/bin/path is always present in the $PATH var. – arielnmz Jun 30 '14 at 07:28echo $PATH? By default terminal opens in the home directory, so, for example, it probably would work if you put./.local/bininstead of~/.local/bin. – Wilf Jun 30 '14 at 08:41.bash_profile. You need to move the PATH setting to.profile. A setting in.bashrcwill only ever take effect in terminals, never in GUI applications that aren't launched via a terminal. – Gilles 'SO- stop being evil' Jun 30 '14 at 22:24.bash_profilebeing loaded on a login shell is what the man page for bash says, as stated in the other question referenced in the answer's comments, although I'll look more into moving the path statement to.profileas you suggest. – arielnmz Jun 30 '14 at 22:34. ~/.bashrcto your.bash_profileor something like it.) – Gilles 'SO- stop being evil' Jun 30 '14 at 22:40.bash_profileindeed loads my.bashrcbut the strange part is that the$PATHenv var isn't modified when I call the terminal from the context menu, which means that when thunar calls that command, my terminal only loads.bashrcand ignores.bash_profile, should thunar do that? I have to mention that this happens most of the time, about 7 out of 10 times I call the context menu option, but not always. It's strange. – arielnmz Jun 30 '14 at 22:50.bashrc. If you put an environment variable definition in.bashrc, it only applies to that terminal and applications launched through it. – Gilles 'SO- stop being evil' Jun 30 '14 at 22:58.bashrcand I execute theexo-opencommand to launch another terminal within it, that child terminal will ignore.bash_profiletoo? – arielnmz Jun 30 '14 at 23:04