This question has been asked numerous times but for some reason, none of the solutions proposed worked for me. I just want to run a simple script after the user has logged in.
Here are my attempts:
- I have tried putting the script in
/etc/init.d/and making a symlink in/etc/rc0.d. - I tried scheduling it using the
@rebootin crontab (crontab -e). Annoyingly,@rebootdoes not seem to work in Ubuntu(?). I tried this simple line@reboot echo "hi there"to no avail. - I tried putting it into the root's crontab(
sudo crontab -e) but still nothing happened. Also a simpleechoin this crontab does not work too. - I also tried to use the @reboot syntax suggested here (
@reboot root /home/me/Desktop/script.sh) - Followed this and placed the path of the script in /etc/rc.local
Notes:
- I'm using Ubuntu 14.04
- home is mounted, but I also tried my attempts in a VM where home is not mounted
- I only want to run the script after the user has logged in
- Nothing fancy about the script it just echoes "hello world"