Ubuntu:
ou can add the command in the /etc/rc.local
script that is executed at the end of startup.
Write the command before exit 0
. Anything written after exit 0
will never be executed.
Raspbian:
to execute commands "at boot", if autologin is enabled (since what it really does it execute them when the pi user logs in), i'd suggest editing the autostart
file wich is in the ~/.config/lxsession/LXDE-pi/
directory.
just add these two lines at the end of the file:
@export DISPLAY=:0
@epiphany /path/to/your/file.png &
P.S. you need to have root permissions to edit autostart
Python:
if you want to execute commands in a python script just do this:
from os import system
system("sudo pigpiod")