I am setting up a machine that's sole purpose is to run a specific python application that uses a curses ui. That being said, there are some aspects of the application that require it to be run as su.
How can I run this application on login so the user doesn't need to execute it every time? I have seen Is there a script that runs as root when user logs in? and it seems different than mine as they don't actually require su there.
I really don't care about security at all for this application, it's not online nor will it ever be online. I don't even care if I have to enter my credentials twice either. I just want it to execute the line:
sudo python ~/Application/main.py
on login. If there's a more efficient way where I don't have to enter credentials twice, that would be even better. This has to work on Ubuntu Server as well.