So I get that running a GUI application as root in a Linux environment is a Bad Idea, and the prevailing wisdom seems to be that it's better to run such a service by having separate processes: a GUI interface process and a background, root-privileged daemon which does the actual work.
I'm creating a program targeted at not tech-savy, desktop users of Linux environments. I don't want to require them to open the command-line and run a command in order to start my program. They should be able to click the menu item (or a .desktop file) and simply have this program work. Therefore the GUI program needs to start the root-process or vice-versa. They will of course need to enter the admin password, but I'm not sure how to even allow that in a secure, distribution agnostic manner.
This is a backup program so it needs to partition the target drive to duplicate the partitions on the source drive, which requires root permissions. After that step, it simply needs to mount and unmount the partitions in order to copy the files from the source drive to the target. The program would be installed via a package manager, presumably with administrative permissions for at least the initial install.
How can I securely allow a GUI program to run a root-privileged daemon?
Note: If it matters, the language I'm using is Python 3.