Hi i made a bash script en when a mannualy click it it works but when i try to add it to RC.LOCAL its does not start activate with the system.
file exist in /home/pi/script
i went to /etc/rc.local and added the script just before the exit like this.
/home/pi/script
but it does not work.
Can some one help me?
-
- Posts: 4
- Joined: Mon Nov 04, 2019 10:22 am
Re: automatic startup Bash script
What happens if you try to execute the /etc/rc.local?
Code: Select all
sudo /etc/rc.local
-
- Posts: 4
- Joined: Mon Nov 04, 2019 10:22 am
Re: automatic startup Bash script
i found a solution adding it to sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
Re: automatic startup Bash script
The correct file ishenribusio wrote: ↑Mon Nov 04, 2019 12:37 pmi found a solution adding it to sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
~/.config/lxsession/LXDE-pi/autostart
if you want to execute a script from your home directory.
-
- Posts: 4
- Joined: Mon Nov 04, 2019 10:22 am
Re: automatic startup Bash script
well not for me because i get this error
bash: /home/pi/.config/lxsession/LXDE-pi/autostart: No such file or directory
however with this it did work
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
bash: /home/pi/.config/lxsession/LXDE-pi/autostart: No such file or directory
however with this it did work
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
-
- Posts: 4
- Joined: Mon Nov 04, 2019 10:22 am
Re: automatic startup Bash script
thank you all for helping 

Re: automatic startup Bash script
henribusio wrote: ↑Mon Nov 04, 2019 12:51 pmbash: /home/pi/.config/lxsession/LXDE-pi/autostart: No such file or directory
Code: Select all
mkdir -p ~/.config/lxsession/LXDE-pi
touch ~/.config/lxsession/LXDE-pi/autostart
nano ~/.config/lxsession/LXDE-pi/autostart