Weird that it doesn’t work. The usual way to run scripts on startup is through systemd units though. That has the added benefits of automatically logging all output and letting you control it through commands like
systemctl enable <unit name>
. It’s a really neat system, and I highly recommend learning it if you see yourself doing this kind of automation more often.The usual way to run scripts on startup is through systemd units though.
Even worse than via some utility of your window manager
You can also get cron to do it.
I’ve found out the hard way: Running the script during startup, and running it using the proper user authorization, are two different things.
And environment —
DISPLAY
andPATH
in particular.
When all else fails…
crontab -e
@reboot sleep 300 && sudo ./myshell.sh
(this is actually broken on some distros)
I’ve been in the systemd world so long none of my systems even have cron
Reject systemd embrace bashrc.