2

I have the sudo permission, and I can install any software using the CLI. But I want to know that whether sudo works with package installers in GUI mode.

For example I have a .chm file and I want to open it with a mouse click, but chmviewer is not installed. So some prompt appears to search on net and by clicking on that pop-up it has suggested some packages e.g kchmviewer. But when I clicked on <install> it pops-up asking for the root password, which I don't have.

Is there a way to install software in GUI mode when you have sudo permission, but not the root password?
Just for curiosity I want to know how to use sudo with a GUI installation mode.

BTW: I have already installed kchmviewer from command line :)

  • as @andrewsomething said on this question : "Graphical programs should not be run with sudo. The correct way is to use kdesudo in KDE for running GUI programs as root, or gksu in GNOME." – Coren Feb 1 '12 at 10:51
  • The program should let you choose your own method for becoming root: su, sudo or some other option (possibly via a GUI prompt). It's not a matter of using sudo with a GUI installation mode, but rather of using sudo with this particular application. – Gilles Feb 2 '12 at 1:04
4

The only way I know is to run the GUI application with root (sudo) privileges. So, if you do something like sudo dolphin or whatever is your file manager of choice, than when you click on an 'unknown' file type and an install is proposed you already have the root privileges inherited from the file manager window. However running GUI file managers with root privileges is not recommended for security reasons.

Or, you could run your GUI installer directly with sudo, like sudo your_gui_package_manager_application (ie. sudo sulfur if you are on Sabayon).

I am not sure, but I think you can do/run sudo something directly from your favorite launcher (Gnome-do, krunner, everything-starter, etc.).

  • @ Patkos Csaba thanks. i used sudo nautius and it worked for me. – shashaDenovo Feb 1 '12 at 12:11
  • I wasted 20 minutes after i found your solution. Thanks – Hidden Sep 3 '14 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.