Appears to be the same as: Launching an executable with sudo on startup - command not found Or: Startup script with sudo in Ubuntu 16.10 But neither of them work! And rc.local does not exist on my system.
Tried to run an app: “re-Link” from Startup Applications. Needs root privileges. Had success with:
x-terminal-emulator -e sudo re-link
But it prompts for password, obviously. Can this be avoided?
Tried putting:
ALL ALL=(root) NOPASSWD: /usr/bin/re-link
In /etc/sudoersand /etc/sudoers.d/<file> with visudo, but nothing appears to happen. Still prompts for password, or refuses to start. Depending on if sudo is in command or not.
Running: Ubuntu 24.04.1 LTS