July 13, 2012

napajejenunedk0 napajejenune..
Lab Rat
99 posts

Show Fedora 17 Gnome authentication dialog


I want to execute a terminal command that requires root privileges through QProcess or the system() function. For example:

  1. QProcess process;
  2. process.start("su -c \"cp -f -r /home/<user>/file.txt /etc\"");
  3. while( process.waitForFinished());

… or …:

  1. system("su -c \"cp -f -r /home/<user>/file.txt /etc\"");

“su” is a command-line interface command for providing root privileges. I want to use a “gksu”, “kdesu”, “beesu” – a GUI equivalent of the command-line interface in Fedora 17 Gnome to ask the user for the root’s password.

I know that “beesu” could be installed additionally and thus provide the desired GUI interface, but it should be installed additionally. I want to use a GUI password authentication dialog that comes in Fedora 17 Gnome by default.

When you install packages through the “Add/Remove Software” tool in Fedora, it asks you for the administrator/root password through a GUI interface:

This is the interface I want to use and call. Is this interface integrated in the “Add/Remove Software” tool or is it a separate program that can be called by any other program?


1 reply

July 16, 2012

Josué V. Herrera Josué V. Herrera
Lab Rat
35 posts


I believe this is what you’re looking for: How to get applications running with root privileges [qt-project.org]

  ‹‹ itemview (insert in modal)      Remove Borders around a QLabel ››

You must log in to post a reply. Not a member yet? Register here!