I want to run a command in a terminal (not background) every time my pi is completely booted (once it loads the desktop). I tried to edit the rc.local and add these commands
./script but nothing happens. It doesn't even open the terminal so those commands are probably run in BG. Crontab makes the command run in BG too... is there a way to emulate me clicking on the terminal icon and typing in a few commands?
Here's my rc.local file
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "piexit 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
And then the commands added by me such as
sleep 10 and
chromium-browser. There is also
exit 0 at the end