I need to launch gphoto2 from a Qt program. I do this:
QString gphotoProgram = "/usr/bin/gphoto2";
QStringList gphotoArguments;
gphotoArguments << "--capture-image";
QProcess *gphotoProcess = new QProcess(this);
gphotoProcess->start(gphotoProgram, gphotoArguments);
but it never enters the Running state this way, as gphoto2 usually needs admin rights to be launched on command line.
How can I start this QProcess with proper rights to make gphoto2 working?
Edit: I precise that I would prefer the user to not have to enter a password, which means gksudo, kdesudo or any other graphical solution is not a valid option for me.