c++ - How to launch a QProcess with root rights? -


i need launch gphoto2 qt program. this:

qstring gphotoprogram = "/usr/bin/gphoto2"; qstringlist gphotoarguments; gphotoarguments << "--capture-image"; qprocess *gphotoprocess = new qprocess(this); gphotoprocess->start(gphotoprogram, gphotoarguments); 

but never enters running state way, gphoto2 needs admin rights launched on command line.

how can start qprocess proper rights make gphoto2 working?

edit: precise prefer user not have enter password, means gksudo, kdesudo or other graphical solution not valid option me.

i recommend finding way allow gphoto2 run logged in user's permissions. perhaps this article has helpful info.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -