0

I've tried everything, I've followed and undone every method I've come across on here but nothing works.

I want to run a simple start-up script for an executable upon reboot, and no other time, as a specific user.

For example, I want to run /home/path/to/shscript/start.sh as user "bob"

Cron seems to do nothing. And I'm at a loss as to how to do this.

Ubuntu server version 21.10. Minimal installation.

  • Every boot (once) or at every login of that user? For cron issues, check [this answer](https://askubuntu.com/a/1288948/349837) (or [without cron](https://askubuntu.com/a/290107/349837)). Then [`sudo -u bob -- /pathto/script.sh`](https://unix.stackexchange.com/a/372889/209677). Of course, the script should be readable and executable by bob. – Pablo Bianchi Apr 29 '22 at 04:42
  • For us to be of any help, show us ***exactly*** what you tried. What was the cron line used? In which cron file? (etc.) If you have tried ***everything***, then obviously there's nothing left to do and it's a lost cause, isn't it? – muru Apr 29 '22 at 06:42

1 Answers1

0
sudo ln -s /usr/bin/"ProgramName" ~/.config/autostart

Have you tried this. It works for me in ubuntu 18.04 i am not sure about ubuntu 21.10.