Changing user home path to which PhpStorm points to

Is there a way to change the user home path to which PhpStorm points to without having to manually edit the .vmoptions files?

I am currently using multiple IntelliJ based tools (PhpStorm, PyCharm, DataGrip etc.) and it's a really painful experience to have to tinker with `-Duser.home` settings every time there is major update or an app is installed on a fresh machine.

Is there something like an environmental variable that might have been added recently?

7 comments

I afraid that currently there is no way to change user home path without altering VM Options.

However, I was wondering if you could tell more about the use case scenario of non-default user home path.

 

Basically, I think that you already familiar with this link, but, just in case, here are instructions on how to change the directory for config/plugins/cache:

https://intellij-support.jetbrains.com/hc/en-us/articles/207240985-Changing-IDE-default-directories-used-for-config-plugins-and-caches-storage

Also, you could change "Default directory" for Project Opening in "Settings | Appearance & Behavior | System Settings" — PhpStorm will point you to this directory every time you create new/open existing project.

1

I am not sure how to quote the relevant paragraph but yeah sure, I'll give examples of use cases where being able to specify a custom home path for home folder is really useful.

Windows by default creates the user home folders on the same partition where the system is installed which is why a lot of people move theirs to another partition or drive to make things easier in case they need to restore a daily system image backup when something goes wrong (and it's only a matter of time when that will happen with Windows 10) or need to reinstall the system. After that the HOME environmental variable is usually pointed to the new location and most of the tools know how to use it properly.

It's also really helpful to have the home folder set to another drive to increase performance for large projects which have a huge number of files (even with SSDs). Considering that the default values in idea.properties are bound for the home folder and that using multiple different IDEs or even different versions of the same IDE can become tiresome if every single one of them has to be manually configured with absolute paths I'd rather set the home folder in one place and let all the IDEs make use of it.

Last but not least, the home button in all dialog windows points to the location which is not used. It's one of the reasons why I have the "Favorite folders" plugin installed by default in all IntelliJ based tools.

I know this might sound like an insignificant detail but I see the issue popping all the time on these issue boards and having the ability to change the home folder through something like an environmental variable would, in my opinion, be really useful so I hope you at least take into consideration to make something like that available.

Thank you.

0

There's an existing request for that: https://youtrack.jetbrains.com/issue/IDEA-173912
And for the button to be configured, separately: https://youtrack.jetbrains.com/issue/IDEABKL-5981

Apart from that, consider using JetBrains Toolbox - you can install all our tools you use there, and set the user home for each installation in its settings (in Toolbox, behind the gear icon for the installation, click Edit... near Java Virtual Machine Options).
I just checked that, a major upgrade doesn't destroy this .vmoptions file, so it really may ease the painful experience you had.

1

I am already using the Toolbox app however I am not exactly sure how changing the installation location would help resolve the issue since the config and system folder paths are still governed by the idea.properties settings?

As for the "Favorite Folder" plugin I've already said that I am using it to at least alleviate the issue to some degree but it still doesn't help with file dialogs that point by default to home unless they are already inside a defined project.

In any case I'd love to see some kind of environmental variables support like in the linked feature request topic (I've also voted) but personally it's not a huge deal breaker just something that in my opinion would be really convenient.

0

I am not exactly sure how changing the installation location would help resolve the issue since the config and system folder paths are still governed by the idea.properties settings?

But I said nothing about the installation location, did I? Maybe the sentence wasn't structured well.

You can modify .vmoptions for a specific installation entry in Toolbox. After you start the entry, it'll resolve the user.home path to the desired location.

I checked that, if you upgrade the entry (I tried from 2018.2.6 to 2018.3.3), the .vmoptions contents persist, so that should solve the issue at least to some extent.

0

>> But I said nothing about the installation location, did I? Maybe the sentence wasn't structured well.

Sorry, somehow I missed the part about vmoptions.

However, that doesn't change the fact that it still has to be done manually for every IDE and given that I personally have at least six tools (PhpStorm, PyCharm, CLion, Android Studio, DataGrip, Webstorm) installed on at least three different machines (home, laptop, work) any kind of manual changes is a really annoying amount of additional work.

Having something centralized like an environmental variable that could get picked by all IDEs would be a real life saver.

P.S. How do you use markup for quoting and formatting on these forums? :D What type of syntax is supported. I've tried every syntax I know of, none worked.

0

> How do you use markup for quoting

We have to use 3rd party tools & resources for this :( Like this one: https://jbt.github.io/markdown-editor/

 

> Having something centralized like an environmental variable that could get picked by all IDEs would be a real life saver.

Based on what I've found - that's not possible currently. I was trying to achieve the same a year ago but there were some minor issues here and there. Here are some related links/discussions:

https://youtrack.jetbrains.com/issue/IDEA-173912

https://youtrack.jetbrains.com/issue/IDEA-1626

https://youtrack.jetbrains.com/issue/IDEA-179050

https://youtrack.jetbrains.com/issue/IDEA-155870

https://youtrack.jetbrains.com/issue/IDEA-163904

0

Please sign in to leave a comment.