Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How do I run Eclipse as root?
How do I run Eclipse as root? [message #166673] Tue, 22 August 2006 15:21 Go to next message
Eclipse UserFriend
Originally posted by: gary.extremeground.com

Jeff Myers wrote:
> Gary,
>
> Gah! You're using GCJ as your Java runtime. This isn't supported as
it causes tons of weird errors like the ones you're seeing. You'll need
to use a JRE from Sun or IBM to run the VE.
>
> - Jeff


That removes me from the Debian package system as gcj is a dependency of
Eclipse. Installing Eclipse install gcj and removing gcj removes Eclipse.

So I removed gcj and Eclipse and installed the latest Sun runtime, since
getting the IBM one seemed to involve creating an account, etc.. Then I
downloaded 3.2 and installed it. This is where things start to go wrong.

Firstly, have you ever tried to find a "how to install Eclipse" document
on the Eclipse web site? Actually, finding anything on it is nearly
impossible, but that's another issue. I remembered reading somewhere
that you just unpack the archive and run eclipse, so I tried that.

Fortunately, I also found a mention of a -vm flag in this group, so I
eventually got Eclipse to start. However, I can't get Eclipse to install
new features in my regular account - a permissions problem in the
Eclipse directory. I can live with that. I don't like installing
executable code as a regular user anyway.

However, I can't get Eclipse to run as root to install the VE either.
Using the same command line that works as my regular user, I get:

JVM terminated. Exit code=1
/usr/local/lib/jre1.5.0_08/bin/java
-jar startup.jar
-os linux
-ws gtk
-arch x86_64
-launcher /usr/bin/eclipse
-name Eclipse
-showsplash 600
-exitdata 78cc0045
-vm /usr/local/lib/jre1.5.0_08/bin/java
-vmargs
-jar startup.jar

Sorry to be such a nuisance, but how do I get around that (yes, I have
read the multi-user help section in Eclipse)?
Re: How do I run Eclipse as root? [message #166691 is a reply to message #166673] Tue, 22 August 2006 15:43 Go to previous messageGo to next message
Eclipse Webmaster is currently offline Eclipse WebmasterFriend
Messages: 607343
Registered: July 2009
Senior Member
Gary Dale wrote:
> Jeff Myers wrote:
> > Gary,
> >
> > Gah! You're using GCJ as your Java runtime. This isn't supported as
> it causes tons of weird errors like the ones you're seeing. You'll need
> to use a JRE from Sun or IBM to run the VE.
> >
> > - Jeff
>
>
> That removes me from the Debian package system as gcj is a dependency of
> Eclipse. Installing Eclipse install gcj and removing gcj removes Eclipse.
>
> So I removed gcj and Eclipse and installed the latest Sun runtime, since
> getting the IBM one seemed to involve creating an account, etc.. Then I
> downloaded 3.2 and installed it. This is where things start to go wrong.
>
> Firstly, have you ever tried to find a "how to install Eclipse" document
> on the Eclipse web site? Actually, finding anything on it is nearly
> impossible, but that's another issue. I remembered reading somewhere
> that you just unpack the archive and run eclipse, so I tried that.
>
> Fortunately, I also found a mention of a -vm flag in this group, so I
> eventually got Eclipse to start. However, I can't get Eclipse to install
> new features in my regular account - a permissions problem in the
> Eclipse directory. I can live with that. I don't like installing
> executable code as a regular user anyway.

I understand your thinking here, but I don't think executing software as
root is a great idea either.

If you're security conscious and insist on having your files owned by
root (so users can't modify them, only read/execute), you can try
chown'ing your eclipse directory *before* you update so that your update
succeeds as a plain user (to avoid having to execute software as root).
Once your update has completed, chown your files back to root so that
your plain user account cannot modify them.

gary$ sudo chown gary /path/to/eclipse -R
gary$ /path/to/eclipse/eclipse (execute to run the updates)
gary$ sudo chown root /path/to/eclipse -R

Another option is to create a user called "eclipse" who owns the files
(instead of root)...

Just some thoughts...

D.

> However, I can't get Eclipse to run as root to install the VE either.
> Using the same command line that works as my regular user, I get:
>
> JVM terminated. Exit code=1
> /usr/local/lib/jre1.5.0_08/bin/java
> -jar startup.jar
> -os linux
> -ws gtk
> -arch x86_64
> -launcher /usr/bin/eclipse
> -name Eclipse
> -showsplash 600
> -exitdata 78cc0045
> -vm /usr/local/lib/jre1.5.0_08/bin/java
> -vmargs
> -jar startup.jar
>
> Sorry to be such a nuisance, but how do I get around that (yes, I have
> read the multi-user help section in Eclipse)?

--

Eclipse WebMaster - webmaster@eclipse.org
Questions? Consult the WebMaster FAQ at
http://wiki.eclipse.org/index.php/Webmaster_FAQ
View my status at http://wiki.eclipse.org/index.php/WebMaster
Re: How do I run Eclipse as root? [message #166814 is a reply to message #166691] Tue, 22 August 2006 21:32 Go to previous message
Eclipse UserFriend
Originally posted by: gary.extremeground.com

> I understand your thinking here, but I don't think executing software as
> root is a great idea either.
>
> If you're security conscious and insist on having your files owned by
> root (so users can't modify them, only read/execute), you can try
> chown'ing your eclipse directory *before* you update so that your update
> succeeds as a plain user (to avoid having to execute software as root).
> Once your update has completed, chown your files back to root so that
> your plain user account cannot modify them.
>
> gary$ sudo chown gary /path/to/eclipse -R
> gary$ /path/to/eclipse/eclipse (execute to run the updates)
> gary$ sudo chown root /path/to/eclipse -R
>
> Another option is to create a user called "eclipse" who owns the files
> (instead of root)...
>
> Just some thoughts...
>
> D.
>


That's more trouble than it's worth! I usually just su before installing
updates - or a run-as-root version (e.g. synaptic). I'd like to do the
same here. I've read another post where someone was asking the inverse
question: how to run eclipse as non-root - so it must be possible. :)
Previous Topic:install plugin
Next Topic:CDT Code Formatter
Goto Forum:
  


Current Time: Sat Apr 27 00:57:28 GMT 2024

Powered by FUDForum. Page generated in 0.08639 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top