Want to run a bash script start.sh with one command that executes tmux and ffmpeg at startup on my Raspberry Pi 4B.
The RPi OS loads the Desktop, but to interact with the process only need a terminal (SSH).
/usr/bin/ffmpeg -f pulse -i 0 -acodec: libmp3lame out.mp3
The script can run after the user pi logs in and everything else has loaded. The idea is for the RPi to continue working after a power outage.
Which autostart method is the most appropriate and could you provide fail-safe instructions for the newest RPi OS with Desktop?
Edit ~./bashrc (no GUI)
- Edit /home/pi/.config/lxsession/LXDE-pi/autostart
- Edit /etc/xdg/lxsession/LXDE-pi/autostart
- Place .desktop file in /home/pi/.config/autostart