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 sleep 10
chromium-browser
cd path
./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
cd path
,./script
. Replace those two lines with the full path of your script e.g./home/user/script
instead and test it again. Let me know if that works so I can post a full answer for you.chromium-browser
automatically at startup would be the best solution. What do you suggest?