I need to run gphoto2
from a Qt program. I'm doing it:
QString gphotoProgram = "/usr/bin/gphoto2";
QStringList gphotoArguments;
gphotoArguments << "--capture-image";
QProcess *gphotoProcess = new QProcess(this);
gphotoProcess->start(gphotoProgram, gphotoArguments);
but it never enters the state Running
this way, since it gphoto2
usually requires administrator privileges to run on the command line.
How can I run this QProcess
with proper execute permissions gphoto2
?
Edit: I definitely want the user to not enter a password, which means that gksudo, kdesudo or any other graphical solution is not a valid option for me.
source
share