Google is your friend:
https://unix.stackexchange.com/questions/26047/how-to-correctly-add-a-path-to-path



On Sat, Nov 3, 2018 at 10:30 AM David Beach <[email protected]> wrote:

> By the way, free to point me to a simple tutorial on this if that would be
> easier for you than typing long instructions.
>
> David
>
> On Saturday, 3 November 2018 13:08:37 UTC-4, David Beach wrote:
>>
>> Thanks so much. I was hoping it would be something fairly obvious to a
>> Linux expert.
>>
>> From the dark days of MS-DOS, I remember we could set 'paths' on start up
>> so that you would not have to explicitly type in paths every time we issued
>> a command. Is there something that I can set so that when I boot up and log
>> in as user 'pi' (my home directory is /home/pi) I can run wee_config (or
>> other utility) by just typing the file name - without the extra stuff every
>> time? And could I avoid having to be in the /home/weewx/bin directory
>> *every* time?
>>
>> David
>>
>> On Saturday, 3 November 2018 12:40:41 UTC-4, Thomas Keffer wrote:
>>>
>>> The shell scans a "path" to find an executable. By default, your current
>>> directory is not in the path. This is for security reasons: it prevents you
>>> from accidentally running something in your current directory that you may
>>> have forgotten about, or downloaded.
>>>
>>> You must explicitly tell the shell that you know it's in your current
>>> directory. You do this by prepending './' to the executable file. So, it
>>> becomes
>>>
>>> *  cd /home/weewx/bin*
>>> *  ./wee_config /home/weewx/weewx.conf --help*
>>>
>>> -tk
>>>
>>> On Sat, Nov 3, 2018 at 9:14 AM David Beach <[email protected]> wrote:
>>>
>>>> I have a reliable weewx installation on a Raspberry Pi using a Vantage
>>>> Vue. And it is still working well.
>>>>
>>>> But, I disliked the scattered directories of the standard installation
>>>> so I set up a new SD card with Raspian Stretch. I followed the setup.py
>>>> installation instructions (with only a few minor detours!) I set it to
>>>> Simulator and weewx seems to work fine in that mode. I can view the web
>>>> page at /home/weewx/public_html/index.html with the 'fake' data streaming
>>>> in.
>>>>
>>>> However, when I try to run a utility, by typing "wee_config --help" for
>>>> example, I get:
>>>>
>>>> bash: wee_device: command not found
>>>>
>>>> If I precede it with sudo, I get:
>>>>
>>>> sudo: wee_config: command not found
>>>>
>>>> Even if I change directories so that I am in the /home/weewx/bin
>>>> directory and I can see the wee_config file just sitting there, I get the
>>>> same result. I would like to be able to use wee_config so I can change the
>>>> driver to my Vantage when I'm ready to switch.
>>>>
>>>> I am no Linux or weewx expert. Is there some mystical permission or
>>>> path I need to change? I hope that someone spots an obvious problem.
>>>>
>>>> Thanks!
>>>>
>>>> David
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "weewx-user" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to