Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Contents of ${USER_HOME}/.eclipse directory
Contents of ${USER_HOME}/.eclipse directory [message #1731894] Tue, 10 May 2016 16:56 Go to next message
Tamás Kiss is currently offline Tamás KissFriend
Messages: 11
Registered: May 2016
Junior Member
Hi,

I have a question about the contents of the ${USER_HOME}/.eclipse directory (Linux). I found in the Eclipse documentation, that the private user configuration of a shared Eclipse install goes to the ${USER_HOME}/.eclipse/<product_id>_<product_version>/configuration directory by default, and this can be overridden with the -configuration CLI option.

This setup made it possible to use different Eclipse installations simultaneously (not necessarily at the same time). If the Eclipse instances had different product identification, then I did not have to do anything special, because their user configuration went under different subdirectories under ~/.eclipse, but if I wanted to, I could even provide totally different paths, e.g. ~/foo/configuration and ~/bar/configuration to have completely separate directory structures.

This was great, until these Oomph and Aeri things appeared in the default installations. None of them follows the "convention", it doesn't matter what I do they create the ~/.eclipse directory and put their contents there:

  • ~/.eclipse/org.eclipse.oomph.setup
  • ~/.eclipse/org.eclipse.oomph.p2
  • ~/.eclipse/org.eclipse.epp.logging.aeri

These 3 directories are always created and used, which (probably) breaks the separation of Eclipse instances.

My question is: what is the reason for this behaviour, is it intentional, or just a bug?

Thanks,
Tamas
Re: Contents of ${USER_HOME}/.eclipse directory [message #1731901 is a reply to message #1731894] Tue, 10 May 2016 17:46 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Tamás,

Comments below.

On 10.05.2016 19:16, Tamás Kiss wrote:
> Hi,
>
> I have a question about the contents of the ${USER_HOME}/.eclipse
> directory (Linux). I found in the Eclipse documentation, that the
> private user configuration of a shared Eclipse install goes to the
> ${USER_HOME}/.eclipse/<product_id>_<product_version>/configuration
> directory by default, and this can be overridden with the
> -configuration CLI option.
Quite a few things follow this convention of storing information that's
shared across all installations in the ~/.eclipse folder. The surrogate
configuration for a read-only shared installation being one of them...

E.g., secure storage is in ~/.eclipse/org.eclipse.equinox.security
>
> This setup made it possible to use different Eclipse installations
> simultaneously (not necessarily at the same time).
Yes, that should always be possible.
> If the Eclipse instances had different product identification, then I
> did not have to do anything special, because their user configuration
> went under different subdirectories under ~/.eclipse, but if I wanted
> to, I could even provide totally different paths, e.g.
> ~/foo/configuration and ~/bar/configuration to have completely
> separate directory structures.
Yes, for the configuration you could control this.
>
> This was great, until these Oomph and Aeri things appeared in the
> default installations. None of them follows the "convention", it
> doesn't matter what I do they create the ~/.eclipse directory and put
> their contents there:
>
> ~/.eclipse/org.eclipse.oomph.setup
> ~/.eclipse/org.eclipse.oomph.p2
> ~/.eclipse/org.eclipse.epp.logging.aeri
>
That is the convention. This information is not installation specific.
It's shared across installations so should go into a single well-known
place.
> These 3 directories are always created and used, which (probably)
> breaks the separation of Eclipse instances.
No, it doesn't break that. It's intentional. If we wanted to store
things specific to the installation, we'd store it under the surrogate
installation folder .eclipse/<product_id>_<product_version>
>
>
> My question is: what is the reason for this behaviour, is it
> intentional, or just a bug?
Yes, it's intentional. Note that with Oomph you can create dozens of
installations, all of which share a single bundle pool (if you enable
that, which is the case by default) so that there is only one copy of
any bundle or feature on your machine, not one copy per installation.
This makes it simple to create installations for many different purposes
quickly and easily.
>
> Thanks,
> Tamas


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Contents of ${USER_HOME}/.eclipse directory [message #1731992 is a reply to message #1731901] Wed, 11 May 2016 13:16 Go to previous messageGo to next message
Tamás Kiss is currently offline Tamás KissFriend
Messages: 11
Registered: May 2016
Junior Member
Hi Ed,

Thanks, this is good news.

The main reason these directories concern me is that at work we use several "pre-assembled" Eclipse installations, each one for different tasks (e.g. development, test, architectural modeling, etc.), and each of those pre-assembled Eclipses is on different SW level, with different plugins. And I couldn't find any info on the Eclipse website if it's safe to use more than one of them. So I looked into the Eclipse docs, and I only found this config directory related info.

My other concern is that some of those Eclipse instances don't have an .eclipseproduct file, so the config dir name they create under ~/.eclipse only contains a number (e.g. 121238974987). I hope this number is unique, and enough by itself to identify the specific Eclipse instance, otherwise they might break each other's configuration.
Re: Contents of ${USER_HOME}/.eclipse directory [message #1742660 is a reply to message #1731992] Tue, 06 September 2016 13:04 Go to previous messageGo to next message
Mrsimple Mind is currently offline Mrsimple MindFriend
Messages: 3
Registered: August 2016
Junior Member
I dont like this approach, why can't I configure where Oomph and Aeri etc stuff should go?
I want to direct all eclipse stuff to certain folders, and the idea that Oomph and Aeri write in user.home makes me sick!

This doesnt make sense, I mean... I can set user.home property different for each eclipse.ini, then it will write multiple Oomph and Aeri folders in that certain home folder.
But this is not a good approach anyway, as I want eclipse to find my personal git and maven settings (which are normally in user.home).

I would classify this as a bug, not an intentional feature. Oomph and Aeri should use the configuration or data settings. Or any other configurable parameter, everything is better than hardcoded write to user.home !!!


Re: Contents of ${USER_HOME}/.eclipse directory [message #1742682 is a reply to message #1742660] Tue, 06 September 2016 15:26 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Mrsimple Mind wrote on Tue, 06 September 2016 09:04
I dont like this approach, why can't I configure where Oomph and Aeri etc stuff should go?

Too me that seems like overkill. I'm not sure you can even configure where your secure store goes instead of to ~/.eclipse/org.eclipse.equinox.security/secure_store. Perhaps that's configurable, but I don't know how. Also, read-only installations result in a surrogate installation in ~/.eclipse/<product_id>_<product_version> and I wouldn't know how to configure that either. Nor am I sure how you would want to configure it? By modifying the config.ini or eclipse.ini of each installation you ever create?

Quote:

I want to direct all eclipse stuff to certain folders, and the idea that Oomph and Aeri write in user.home makes me sick!

Perhaps you're being overly dramatic.

Quote:

This doesnt make sense, I mean... I can set user.home property different for each eclipse.ini, then it will write multiple Oomph and Aeri folders in that certain home folder.
But this is not a good approach anyway, as I want eclipse to find my personal git and maven settings (which are normally in user.home).

And do you configure those to be in some place other than the default? E.g., ~/.m2 or ~/.gitconfig...

Quote:

I would classify this as a bug, not an intentional feature. Oomph and Aeri should use the configuration or data settings. Or any other configurable parameter, everything is better than hardcoded write to user.home !!!

Be that as it may, it is intentional that things to be shared across all installations/applications are in a consistently-the-same location across all of them. Even if they were configurable via the eclipse.ini or the config.ini, you'd forget to configure them, and end up with multiple such things and then you'll be back feeling sicker.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Contents of ${USER_HOME}/.eclipse directory [message #1742751 is a reply to message #1742682] Wed, 07 September 2016 07:53 Go to previous messageGo to next message
Mrsimple Mind is currently offline Mrsimple MindFriend
Messages: 3
Registered: August 2016
Junior Member
Thanks Ed for answering and for taking the time!

Quote:
Too me that seems like overkill. I'm not sure you can even configure where your secure store goes instead of to ~/.eclipse/org.eclipse.equinox.security/secure_store. Perhaps that's configurable, but I don't know how. Also, read-only installations result in a surrogate installation in ~/.eclipse/<product_id>_<product_version> and I wouldn't know how to configure that either. Nor am I sure how you would want to configure it? By modifying the config.ini or eclipse.ini of each installation you ever create?

Of course you can, just put the -eclipse.keyring in eclipse.ini and point out your secure storage.


Quote:
And do you configure those to be in some place other than the default? E.g., ~/.m2 or ~/.gitconfig...

It is common to have single git and maven, so those are per default in my user.home/.m2 folder and .gitcofing file. That is why I don't modify eclipse user.home java property, as it would not find the git and maven settings.


Quote:
Be that as it may, it is intentional that things to be shared across all installations/applications are in a consistently-the-same location across all of them. Even if they were configurable via the eclipse.ini or the config.ini, you'd forget to configure them, and end up with multiple such things and then you'll be back feeling sicker.

Doesnt make sense, if oomph and aeri uses the common osgi configuration / and p2 data parameters that would be fair enough. Or another global setting for oomph or aeir, I would then (if wanted) have this shared thing by use same location for all installations. I dont even no why Eclipse creates oomph folder even when not using the oomph installation mechanism. I use the eclipse single zip bundle, unzip and run.

[Updated on: Wed, 07 September 2016 08:02]

Report message to a moderator

Re: Contents of ${USER_HOME}/.eclipse directory [message #1742796 is a reply to message #1742751] Wed, 07 September 2016 15:53 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
I didn't know about the -eclipse.keyring thing.

The intent of using the .eclipse folder is exactly like the intent of .m2 and .gitconfig, i.e., a single default that's used now where where you run or which installation you run. It's for things shared by all installation. To keep this consistent, one might imagine using an environment variable, but editing a .ini for each installation is just not something anyone is likely to do consistently properly. And it would need to be done for the installer as well, which is hard on Windows because it's essentially a self extract executable.

The Oomph folder is used for things like saving preferences so that they're consistently the same across all workspace. I.e., you probably either want or don't want line numbers in your editors. If you do want them, you're always having to set that preference again, but with Oomph you can set it once and record it.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Contents of ${USER_HOME}/.eclipse directory [message #1742867 is a reply to message #1742796] Thu, 08 September 2016 10:12 Go to previous messageGo to next message
Mrsimple Mind is currently offline Mrsimple MindFriend
Messages: 3
Registered: August 2016
Junior Member
I see, I have to live with this... and I will pray that a configuration will be valid even for this folders in future Wink

The .m2 and .gitconfig is configurable, not the .eclipse and .p2 folders Wink

m2 can be global in maven installation too, and if you want user specific this is configurable.
gitconfig same approach there.

Re: Contents of ${USER_HOME}/.eclipse directory [message #1743636 is a reply to message #1742682] Sat, 17 September 2016 13:01 Go to previous messageGo to next message
Daniel Mising name is currently offline Daniel Mising nameFriend
Messages: 47
Registered: July 2014
Member
i am a bit out of scope of your thread-theme but ed, your question some answers ago triggered me Smile (quote + reply below)

Ed Merks wrote on Tue, 06 September 2016 17:26
And do you configure those to be in some place other than the default? E.g., ~/.m2 or ~/.gitconfig...

i do ... two reasons for doing so pop up instantly


  • quota on directory containing user.home makes me redirect stuff which normally would go there (like the local m2-repo-mirror-directory or the jubula profile which might contain a database)
  • configuring not a global git repo but a git repo inside each workspace (which is - as i read rather recently - not a best practice as all file changes get eclipses attention. but it works for small repos) so that my workspace is completely portable

I just wanted to mention that to maybe further your point of view concerning usage of eclipse property page settings - as there maybe are better ways to do what i mentioned but currently that is how i do it (sometimes when needed).
Re: Contents of ${USER_HOME}/.eclipse directory [message #1743640 is a reply to message #1743636] Sat, 17 September 2016 16:29 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Yes, the .m2 folder can be big. But what's in the .eclipse folder is generally very small. The pool itself can grow big and you can put it anywhere. Where you put your git repos is up to you, and Oomph's project setups have rules for where you can put them, which is not generally ever in the .eclipse folder.

Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Eclipse Install error
Next Topic:Install for All Users [Enterprise Environment]
Goto Forum:
  


Current Time: Fri Apr 19 04:52:15 GMT 2024

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

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

Back to the top