1
I need you to call my Raspberry pi 3 for it to execute the following scripts:
$cd ~/Desktop
$source ~/.profile
$workon cv
$python raspberry.py
only that, then it will already run my program directly.
1
I need you to call my Raspberry pi 3 for it to execute the following scripts:
$cd ~/Desktop
$source ~/.profile
$workon cv
$python raspberry.py
only that, then it will already run my program directly.
3
Follow the steps:
Create a file for your script and write the commands in it.
$ sudo nano /etc/init.d/SEUSCRIPT
Example:
#!/bin/bash
echo "Script de exemplo"
Save and get out: CTRL
+ X
, Y
, ENTER
Permission to be executable
$ sudo chmod 755 /etc/init.d/SEUSCRIPT
Logs the script to run on startup
$ sudo update-rc.d superscript defaults
Obs: SEUSCRIPT is the name of the file you want to create
If you want to start when you boot into the environment LXDE
do:
Sail to:
~/.config/lxsession/LXDE-pi
Open the file autostart
$ sudo nano autostart
CTRL
+ X
, Y
, ENTER
For more information raspberrypi stackexchange
i want to start as soon as you boot the system. Can you show me what the syntax of the script is like? I don’t work with linux. is just I write my commands in a script.sh ? will the $ in front or just write normal.
Yes I will edit put an example of Script
had seen that you have to use #!/bin/sh in Raspberry, do you have any idea if bash works normal? If I choose to sh mute anything else than you had explained to me?
#!/bin/sh
is just a link to #!/bin/bash
Browser other questions tagged linux script shell initialization
You are not signed in. Login or sign up in order to post.
Do you have any graphical user interface installed ??
– NoobSaibot
I got it, it’s the Raspbian
– Matheus Mendes