14

I want to configure the terminal console in "IntelliJ Idea 15" IDE to access iterm2 on my MacOS. Tried the steps mentioned here https://www.jetbrains.com/help/idea/2016.3/working-with-embedded-local-terminal.html

But it shows an error as below

2017-02-15 11:15:02.308 iTerm2[71018:1042426] Succeeded. 2017-02-15 11:15:02.318 iTerm2[71018:1042426] tryToAttachToServerWithProcessId: Attempt to connect to server for pid 68144 2017-02-15 11:15:02.319 iTerm2[71018:1042426] Succeeded. 2017-02-15 11:15:02.358 iTerm2[71018:1042426] Try to connect to orphaned server at /var/tmp/iTerm2.socket.1694 2017-02-15 11:15:02.358 iTerm2[71018:1042426] Failed: Connection refused

I am using Mac OS X (el capitan - v10.11.6) Could someone please assist me with this. Thanks in advance.

C V
  • 209
  • 1
  • 3
  • 13

2 Answers2

30

A terminal is not the same thing as a shell. You're basically asking the equivalent of "how can I run Firefox inside Chrome?", which doesn't make much sense.

You need to point IDEA to whatever shell you're using (bash, fish, zsh or whatever), not to iTerm.

tolgraven
  • 528
  • 5
  • 11
  • 4
    > You need to point IDEA to whatever shell you're using ; how? – blkpingu May 23 '19 at 12:18
  • 4
    You can change the shell in your IDEA in `File -> Settings -> Terminal -> Shell path` on Windows and `Preferences -> Tools -> Terminal -> Shell path` on Mac OS X. You can change it to `/bin/zsh` for instance. Of course you need to install zsh first. – Ehsan Khaveh Jun 29 '19 at 20:49
  • 1
    This is the answer: You can change the shell in your IDEA in File -> Settings -> Terminal -> Shell path on Windows and Preferences -> Tools -> Terminal -> Shell path. – lance-p Aug 09 '21 at 15:53
  • 1
    TBF, this isn't that strange of a request when other IDEs like VSCode support external terminals such as iTerm2. You give it the directory to a term program and specify you would like to use that external terminal over the internal one. I came over here looking if intelliJ supported the same. – BionicSheep Jun 22 '22 at 02:59
  • Fair enough, but mind both q and a are over half a decade old :) Something like it should still be doable by setting shell path to something that patches through to whatever your preferred tmux window. – tolgraven Jul 02 '22 at 19:53
3

To set IntelliJ to open iTerm instead of the native Terminal, set the setting in Native Terminal Plugin

enter image description here

tonisives
  • 1,962
  • 1
  • 18
  • 17