I have been trying to get my script run right after I reboot. I have tried editing the rc.local file without success. After that I tried to add an entry to Startup Applications with the path to my script /home/user/Scripts/myScript.sh.
Then my system rebooted running the wanted script. The problem obviously isn't with execution privileges (which I've added with chmod command) but with denied access, because the command was not run with root privileges. Since gksu and gksudo is no longer supported, I was wondering how could I work around this problem.
I am running Ubuntu 18.04, 64-bit
I also now found, that running rc.local does run the script, however it does not run on startup
Permissions of the script:
user@d4tor:~$ ll /home/user/Scripts/myScript.sh
-rwx--x--x 1 user user 129 July 3 16:50 /home/user/Scripts/myScript.sh*
Permissions of rc.local:
user@d4tor:/etc$ ls -l rc.local
-rwxr-xr-x 1 root root 328 July 5 17:45 rc.local