I think I'm starting to go mad. I have tried several things by now, and nothing works.
This is on an Ubuntu 22.04 LTS Desktop Version.
I tried this guide: https://www.baeldung.com/linux/run-script-on-startup
My script file is a quite simple, start chromium-browser in kiosk mode with this IP / page.
chromium-browser -kiosk -incognito https://google.com
Saved this file as tiles.sh in /usr/local/ Then I chmod +x tiles.sh
First option I have tried: crontab -e | where I added:
@reboot root /usr/local/tiles.sh
2nd thing I tried was to add it to .profile in the home folder on the bottom line. Nothing...
sh /usr/local/tiles.sh
I have then tried to use Ubuntu's built in "Startup Application Preferences", again nothing... https://itsfoss.com/manage-startup-applications-ubuntu/
Name; Tiles, Path: /usr/local/tiles.sh, I didn't add any comments.
4th thing was with a tiles.service added to the systemctl
[Unit]
description=Tiles
[Service]
Type=simple
ExecStart=/bin/bash /usr/local/tiles.sh
[Install]
WantedBy=multi-user.target
chmod 644 /etc/systemd/system/tiles.service
systemctl enable tiles.service
systemctl start tiles.service
reboot
So, can someone please tell me what I'm doing wrong here?
Edit:
So I fixed a copy-paste error with missing /, so the path looked incomplete
A comment suggested that 'crontab -e' is only for 'on boot' stuff, so this wouldn't work.