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
Post a Comment