Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

up vote 8 down vote accepted

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.

share|improve this answer
    
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 5:25
    
Alternatively you can use the alt+f2 dialog and enter gksudo file-roller –  tj111 Sep 14 '10 at 19:26
    
+1 That's exactly what I'd do. –  Evan Plaice Sep 16 '10 at 13:47

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.

share|improve this answer

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

share|improve this answer
    
Is is this one? g-scripts.sourceforge.net/nautilus-scripts/Execute/Misc/… –  John K Sep 14 '10 at 0:48
    
Yup, that's the one! –  Nicke Sep 16 '10 at 6:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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