Linux - Launching a terminal from context menu loses environment ($PATH)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Linux - Launching a terminal from context menu loses environment ($PATH)

This post has NOT been accepted by the mailing list yet.
When I launch gnome-terminal from another terminal, or from any launcher no problem.

But when I start one from a custom context menu item within smartgit it opens but the $PATH default has been lost/trashed (those found in the etc/environment file)

Gnome-terminal is set as a bash login shell so I have a temporary work around which is to put those default paths back into $PATH right at the beginning of my bash_profile file. The issue is I need to launch a bash script from that context menu and of course it says it doesn't know what bash is because the default paths (those to all the bin directories) have all been trashed and are not resurrected until bash_profile loads which is too late to launch that script.

I did load in another graphical terminal (guake) and does the same thing.

Any ideas why this is happening? I can only guess that this (bad) behavior is particular to java based programs running in linux, smartgit being one?   Note that opening a terminal from Nemo's context menu is not an issue so I don't believe it's anything to do with the context menu itself.

So question is: How can I get smartgit to not lose the linux environment ($PATH) settings from the preference/tools (context menu) when launching a terminal (gnome-terminal)

Note that I can launch other programs from the same context menu without issue, for example sublime text and nemo.

I am running Linux Mint 17.1 (ubuntu 14.10)