Hallo
ich möchte ein python3 Programm automatisch starten und habe folgendes versucht mit rc.local:
Bash
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
cd /home/pi
su pi -c '/usr/bin/tightvncserver :1'
printf "vnc started"
cd /home/pi/plant
sudo idle3 -r TEST#PlantServiceXe_3.py
printf "python3 started"
cd /home/pi
exit 0
Alles anzeigen
Fakt ist, dass ich damit den Raspi irgendwie schwer durcheinander bringe - crasht sogar manchmal und außerdem sehe ich mit
nichts das nach Python aussieht.
ohne
sudo idle3 -r TEST#PlantServiceXe_3.py
funktioniert alles ... ich muss natürlich das Programm händischstarten.
Ich möchte natürlich das X-Terminal im VNC sehen.
Bitte um Expertenhilfe
Gottfried