I have python script which is using selenium
web driver to do some web automation task. This python code is running perfectly fine when I am running it from the terminal. It launches firefox and does what is required.
I have made a service which looks like below:
[Unit]
Description=Start python web browser code
[Service]
Type=simple
ExecStart=/usr/bin/python3.5 /home/pi/web_automation.py
Restart=on-failure
RestartSec=30s
StandardOutput=null
[Install]
WantedBy=multi-user.target
When starting this service, it always remains in the failed state
. I have also tried editing the /home/pi/.config/lxsession/LXDE/autostart/
and include below lines
@/usr/bin/python3.5 /home/pi/web_automation.py
But it's still not working. How can I make it work. Thanks.