7

For example, I'm trying to run Archive Manager from Ubuntu Desktop (10.04) under sudo otherwise it won't let me extract a Software Development Kit into /usr/local

Update: I don't want sudo to be a permanent change to launching the application; only to run it under sudo when I choose, until it's quit.

Bruno Pereira
  • 74,785
John K
  • 1,173

3 Answers3

8

You can run the software from the command-line/terminal with gksudo prefixed to the command, which will present the prompt for your sudoer's password prior to launching.

gksudo file-roller

Though you mentioned you do not want to make this a permanent change - you could add a new Menu item into something like Applications -> System Tools via alacarte (System -> Preferences -> Main Menu) The command for which could be gksudo file-roller creating both a regular Archive Manager launcher and a "root" Archive Manager launcher - for convenience.

David Foerster
  • 36,900
  • 56
  • 98
  • 152
Marco Ceppi
  • 48,887
  • That's beautiful with the gksudo GUI prompt version. Also I like the idea of creating a second set of menu commands for gksudo'd items. Thanks! – John K Sep 13 '10 at 05:25
  • Alternatively you can use the alt+f2 dialog and enter gksudo file-roller – TJ L Sep 14 '10 at 19:26
2

Check out the package nautilus-gksu. After installing and restarting your session (or just nautilus) you'll be able to right-click on any file/folder and select "Open as administrator" and be prompted for your password. Works well for opening root nautilus windows, root archive managers, root text editors... you get the idea.

0

I've added a Nautilus script that allows me to - from nautilus - open the current folder as root. That way, I could open the current folder as root, right-click and extract the archive using Archive manager and then move the files to /usr/local. When done, I just close the root-nautilus; no permanent change is done, and no need for the command-line.

/N

Nicke
  • 485