[Qt-interest] help needed: How I obtain root user access in my QT application? (Ubuntu Platform)

Pablo Martí Gamboa pmarti at warp.es
Thu May 27 11:39:38 CEST 2010


On 27 May 2010 11:22, shafiul azam <ishafiul at gmail.com> wrote:

> In my QT application, I need to execute some commands which need root
> access. When I execute them with QProcess, it says access denied.
>
> How to solve the problem? i.e How i can execute commands like "sudo
> nautilus" ?
>
> Many GUI applications in Ubuntu/linux prompt for root access (prompts for
> user password) when they starts-up. If I need to implement it automatically
> in my application, (i.e when a user double-clicks on my application icon it
> will prompt for root user access) what to do?


> Please help with solution and ideas :(
>

Have a look at PolicyKit and its replacement, PolicyKitOne

http://hal.freedesktop.org/docs/PolicyKit/
http://fedoraproject.org/wiki/Features/PolicyKitOne

The latter is pretty new and only available for Fedora

Best regards,

-- 
Pablo Martí
http://minimoesfuerzo.org
python -c "print '706d617267616d40676d61696c2e636f6d'.decode('hex')"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100527/c1879cb0/attachment.html 


More information about the Qt-interest-old mailing list