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



At 23:51 -0400 3/13/11, Jean-Philippe Fleury wrote:
>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
>

And then try bring up gedit as a process whose parent is bash. Sometimes I think Ubuntu does what Apple's OS-X does and ignore the user's environment in favor of a more general default when an application is started up using Finder.

In a bash terminal I think it would be the same as what I use in tcsh:

gedit  $HOME/Scratchpad.txt &

That makes sure gedit is a child of the terminal you're running and places it in the background. Would someone confirm that for bash?

<ftp://ftp.macnauchtan.com/Software/gedit/target/> is a directory in which I have placed some more stuff that addresses the question of environment variables for gedit.

--
-->  The best programming tool is a soldering iron <--


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