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.

I've read that it's bad to run gui applications from a terminal using sudo.

In order to administer some eclipse updates, I need elevated privileges (view screenshot). How do I do this correctly?

enter image description here

share|improve this question
    
Use portable version of eclipse to avoid permission issues –  Tachyons Jan 29 '13 at 18:38
    
I am administering the update as the admin user. The changes I make will affect 2 other user accounts. Is this the same with the portable version? –  Frantumn Jan 29 '13 at 18:40
    
Yes it's bad, and you use gksu –  Uri Herrera Jan 29 '13 at 18:51
    
Thanks @UriHerrera Want to post that as the answer? –  Frantumn Jan 29 '13 at 18:54
    
possible duplicate of Why does Eclipse's "Check for updates" not work –  Lekensteyn Jan 29 '13 at 20:22

3 Answers 3

up vote 10 down vote accepted

To run GUI applications as root you should not be using sudo, but instead use gksu. In this particular case run gksu eclipse, then enter your password.

share|improve this answer
    
For KDE like kubuntu, use kdesu instead of gksu. For example press [ALT] + [F2] and type kdesu eclipse –  Fari Feb 10 at 11:41

If, like me, you're forced to sudo eclipse because you did it once out of desperation, which changed some config file as root, and permanently rooted you in Sudoland for Eclipse. You can try:

sudo chmod -R a+rwx ~/workspace 
sudo chmod -R a+rwx ~/.eclipse 

that got me out of it.

share|improve this answer
    
Thanks this did the job for me :) –  Gabriel Jun 1 at 15:37

Basically the Eclipse update system does not work well when repackaged for various operating system packages. If "apt-get upgrade" does not work for you, then I would suggest you stay away from the packaged version of Eclipse, and simply download the one you need directly from Eclipse, unpack and run it.

Then you can update it as needed.

share|improve this answer

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.