@isaaccueli: Which one do you want? “When system boots” is not the same as when session starts.
If you want a script to run at boot, forget rc.local since support for it may not be enabled by default and most likely won’t be there in the future. rc.local belongs to the SysVinit era, we are using systemd now.
Make an entry for it in crontab with magic word @reboot and it will be run at boot.
Test script /home/youruser/bin/boot-test (make executable):
#!/bin/bash
logger "This was run at boot"
Crontab entry:
@reboot /home/youruser/bin/boot-test
Reboot and check if the script was run:
journalctl -b |grep 'run at'
As for session start, you would go the autostart route (as you already know). You can use command “logger” with output (as above) to check, if the script was actually run. If that part is ok, but you still don’t get a notification, try telling notify-send where to send by adding “DISPLAY=:0” before the command:
DISPLAY=:0 notify-send ...