Re: [gedit-list] environment variables and the external tools plugin



Ernesto Posse a écrit le 2011-02-22 16:48 :
> I've noticed that the External Tools plugin seems to ignore the values
> of existing environment variables (PATH to be precise) and executes a
> tool in an empty environment with some default values for variables
> such as PATH. Is this intentional, or is it a bug?
>
> Personally this behaviour is a serious limitation of External tools,
> since sometimes you want to execute tools which are on your PATH but
> not in the predefined default path.
>
> If it is not a bug, is there any way to access those variables?

Hi Ernesto,

Try to create a file ~/.bash_profile with the following code:



#!/bin/bash

export default_dir=${default_dir:=$HOME}

if [ -f $default_dir/.bashrc ]; then
	. $default_dir/.bashrc
elif [ -f $default_dir/Bashrc ]; then
	. ${default_dir}/Bashrc;
elif [ -f ~/.bashrc ]; then
	. ~/.bashrc;
fi



Regards,

Jean-Philippe


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]