Code: Select all
# Create directory for Autologin link
sudo mkdir -p /etc/systemd/system/getty.target.wants
# Load new .bashrc to source the startup script at boot and log-on
cp /home/pi/rpidatv/scripts/configs/startup.bashrc /home/pi/.bashrc
# Always auto-logon and run .bashrc (and hence startup.sh)
sudo ln -fs /etc/systemd/system/autologin@.service\
/etc/systemd/system/getty.target.wants/getty@tty1.service
Please could someone give me a clue as to how to run a bash script, as user pi, with all environment variables set at boot without any user intervention?
I have tried adding the script as a cron job, but that then appears unhappy to run fbcp (framebuffer copy), which I need to get the framebuffer (fb0) displayed on the 3.5 inch touchscreen (fb1).
Thanks
Dave, G8GKQ