Hello RobH!
Tuesday November 10 2020 20:08, you wrote to me:
Do a ssh into your Pi.
Then do
pwd
ls -la
Now do
sudo -s
pwd
ls -la
and report what you get
Vince
> On 10/11/2020 06:05, Vincent Coen wrote:
>> Hello RobH!
>>
>> Tuesday November 10 2020 17:40, you wrote to All:
>>
>> > I have a python script to run some leds, and I'm having a
>> problem with
>> > it! When I ssh into my pi zero, then sudo python3 python
>> script.py, it
>> > doesn't run, no leds are lit.
>> > But if I open a terminal in the pi desktop and run the same
>> command
>> > line, it works and the leds light up.
>>
>> > Anyone know why this happens.
>>
>> Who owns the script.py and where is it ?
>>
>>
>> Remember sudo takes root priv. and the directory so try :
>>
>> sudo python3 /home/pi/script.py or whater the user name is along
>> with the correct python run command is.
>>
>>
>> Vincent
>>
> I ssh'd into my pi zero, then I created the script with : sudo nano
> script.py then copied some other python script into the new script.py.
> I then ran sudo python3 script.py from within the directory the said
> script is in, which is the Downloads directory.
> Nothing happens, no errors, no leds lit.
> If I open a terminal window on the pi desktop and run the exact same
> sudo python3 script.py, it runs and the leds light up
Vincent
--- Mageia Linux v7.1 X64/Mbse v1.0.7.17/GoldED+/LNX 1.1.5-b20180707
* Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1)
|