1

When I launch IntelliJ from my Favorite icon and then launch a Maven Run Configuration, system environment variables (those exported in ~/.bashrc) are not recognized inside IntelliJ. If I run the same idea.sh that is run from the Favorites icon, then they are defined.

Related:

  • Question on Stack Overflow, but this issue is more about Ubuntu passing of environment than IntelliJ specifics.
  • Question on Ask Ubuntu about Eclipse, but that recommends a shell script, which is already the case here.

Contents of the desktop file:

    [Desktop Entry]
    Version=1.0
    Type=Application
    Name=IntelliJ IDEA Ultimate Edition
    Icon=/hdd/executables/idea-IU-191.6707.61/bin/idea.svg
    Exec="/hdd/executables/idea-IU-191.6707.61/bin/idea.sh" %f
    Comment=Capable and Ergonomic IDE for JVM
    Categories=Development;IDE;
    Terminal=false
    StartupWMClass=jetbrains-idea
2

1 Answer 1

2

Set the variables in ~/.profile instead of ~/.bashrc.

You may want to study the page EnvironmentVariables for explanations.

4
  • I moved the code setting these variables from .bashrc to .profile. I logged out and in; and confirmed with env that the values where there. But still, the values do not appear in Intellij
    – Joshua Fox
    May 21, 2019 at 20:16
  • @JoshuaFox: That's a bit odd. Possibly a reboot is needed for the desktop environment you are using. May 21, 2019 at 20:36
  • @JoshuaFox: Btw, are you running Wayland? May 21, 2019 at 20:38
  • echo $XDG_SESSION_TYPE gives x11, so, apparently not Wayland. This is a recently installed Ubuntu 18.04.2 LTS
    – Joshua Fox
    May 22, 2019 at 6:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .