I tried to submit an app to the Ubuntu Software Centre but it was rejected because you needed to put in the admin password to use it. I need to grant root privileges to the app for it to function so I used sudo. But they said I can't use sudo in my app. How can I give it root privileges?
You need to use the
It's worth noting that if you only need root privileges on startup, you can and should start up as root, but then drop to an unprivileged user. If you're operating as a user-facing program, this probably means the user that ran the program; if this means a daemon, like an
Also, there are graphical frontends to
Your app might not be permitted at all. According to the Ubuntu wiki, the App Review Board will reject applications that touch system files:
A cleanup app would be touching system files.
While this guideline only applies to open-source apps (the policy for proprietary apps is not published), I imagine similar rules apply to proprietary apps.
If your app is open-source, you can still get it into the Software Center by packaging it and submitting it to the main Ubuntu or Debian repositories.