PATH ~/bin under gnome

Gilles Gravier Gilles at Gravier.org
Tue Nov 21 13:19:08 UTC 2006


Just put stuff in /etc/profile ...

Gilles.

Peter Garrett wrote:
> On Tue, 21 Nov 2006 07:31:18 -0500
> "Todd Slater" <dontodd at gmail.com> wrote:
>
>   
>> On 11/21/06, Peter Garrett <peter.garrett at optusnet.com.au> wrote:
>>     
>>> On Mon, 20 Nov 2006 17:45:40 -0500
>>> "Todd Slater" <dontodd at gmail.com> wrote:
>>>
>>>       
>>>> On 11/20/06, rodrigochinaski <rodrigo.chinaski at gmail.com> wrote:
>>>>         
>>>>> Greetings...
>>>>>
>>>>> I would like to add my ~/bin in the PATH. I already uncommented the
>>>>> following lines on my ~/.bash_profile, but it only works on the console,
>>>>> not on the gnome environment.
>>>>>
>>>>>
>>>>> # set PATH so it includes user's private bin if it exists
>>>>> if [ -d ~/bin ] ; then
>>>>>     PATH="${PATH}":~/bin
>>>>> fi
>>>>>
>>>>> What's the "cleanest" way to do this?
>>>>>           
>>>> Just add that to the end of your ~/.bashrc file. You'll probably have
>>>> to log out and back in for it to take effect.
>>>>         
>>> No. Gnome doesn't read ~/.bashrc - it only applies to the console
>>> or terminal emulators.
>>>
>>> I think the file to use would be ~/.gnomerc , which doesn't exist by
>>> default, but is executed if present when you log in to GNOME.
>>>
>>> Edit: Just tried it and it works as I suggested . An Xdialog script in
>>> ~/bin "works" with it, and so does ~/bin/mailspeak  ;) -
>>>
>>> #!/bin/bash
>>> # "Just for fun"
>>> echo " `echo $USER`. you have mail" | festival --tts
>>>       
>> I only call items in ~/bin from a terminal so adding it to ~/.bashrc
>> works for me. How else do you call those scripts?
>>     
>
> Right - ~/.bashrc works when you call stuff from the command line. If, for
> example, you want to run a script that has a graphical front end ( using
> zenity, Xdialog or kdialog for instance), typing the command for the
> script in ~/.bashrc will work fine.
>
> If, on the other hand, you want to use a GNOME menu item or panel launcher
> etc. , you would have to type the whole path. ( example: your launcher
> would have the command field as  /home/peter/timer ) By placing the same
> path generating lines in ~/.gnomerc , you ensure that *GNOME* knows ~/bin
> is in your PATH. Thus, a launcher or graphical menu item with the command
> "timer"  ( without quotes ) will then work.
>
> Personally I can't think of a use case where this is particularly
> important, but my interpretation was that this would be what the OP
> wanted . 
>
> Since ~/bin is placed first in the list of directories in the
> PATH  by that snippet from ~/.bash_profile , I suppose for example, that if
> you had two identically named executables, doing this would make sure the
> one in your personal directory ran on menu click, instead of the "global
> default". That could be handy for people who have no root access but want
> to run an updated app installed in ~/bin.
>
> On the other hand, it isn't hard to edit a menu or launcher to include a
> full path. 
>
> Peter
>
>   

-- 
/*Gilles Gravier*/ *=* *Gilles at Gravier.org* <mailto:Gilles at Gravier.org> 
*=* *http://www.gravier.org/*
ICQ : *77488526* 
<http://www.icq.com/whitepages/about_me.php?Uin=77488526> * || *MSN 
Messenger : Gilles at Gravier.org <http://members.msn.com/Gilles@Gravier.org>*
*Skype : ggravier <callto://ggravier>* || *Y! : ggravier 
<http://profiles.yahoo.com/ggravier> || AOL : gillesgravier 
<aim:goim?screenname=gillesgravier>
PGP Key ID : *0x8DE6D026* 
<http://pgp.mit.edu:11371/pks/lookup?search=0x8DE6D026&op=index>
"Chastity is its own punishment." (/Solomon Short/) [/David Gerrold/]
"De toutes les aberrations sexuelles, la chasteté est la plus 
aberrante." [Anatole France]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20061121/a9652559/attachment.html>


More information about the ubuntu-users mailing list