1

I'm using Fedora 35 Linux and I installed IntelliJ IDEA via flatpak, and when I try to use the docker command in the IDEA's terminal window, it gives me the following error message:

bash-5.1$ docker
bash: docker: command not found

In a normal terminal window I can use the docker command fine with my user.

I installed the fish terminal too for my user but the IDEA not see the fish command too.

The Terminal config in the IDEA looks like this: enter image description here

Süli Patrik
  • 85
  • 2
  • 8
  • Type `echo $PATH` in Idea terminal, what would you see? – Nadia Solovyeva Mar 23 '22 at 13:29
  • `bash-5.1$ echo $PATH /home/spatrik/.local/bin:/home/spatrik/bin:/app/bin:/usr/bin:` My username on the system is `spatrik`, so it is looks like correct. Maybe missing here something? In a normal terminal the output is: `/home/spatrik/.local/bin /home/spatrik/bin /usr/local/bin /usr/local/sbin /usr/bin /usr/sbin` – Süli Patrik Mar 23 '22 at 13:52

3 Answers3

1

I installed IntelliJ IDEA via flatpak

IntelliJ IDEA's terminal can't see docker executables because the environment running the IDEA is a sandbox and there is no docker or other programs. You could use ls /usr/bin/docker to check it.

You can install a non-flatpack/non-snap version if you want to use those programs: https://www.jetbrains.com/idea/download/other.html

Egor Klepikov
  • 3,386
  • 5
  • 19
  • 34
  • Yes, the output is: `bash-5.1$ ls /usr/bin/docker ls: cannot access '/usr/bin/docker': No such file or directory` Is this the only way or can I somehow change the flatpak running environment? Or pass my environment variables to this sandbox environment for example. – Süli Patrik Mar 24 '22 at 10:40
1

Set the following command in the IDEA Shell path setting will solve the problem:

/usr/bin/env -- flatpak-spawn --host bash

enter image description here

Scott Anderson
  • 631
  • 5
  • 26
Süli Patrik
  • 85
  • 2
  • 8
  • 1
    I got this issue when using this command: https://github.com/flathub/com.visualstudio.code/issues/315, however `/usr/bin/flatpak-spawn --host zsh` (My default shell is zsh) worked well – Scott Anderson Sep 20 '22 at 20:31
0

I gave up with flatpak and installed via snap: https://snapcraft.io/intellij-idea-ultimate

Terminal works as expected.

Ian Wood
  • 41
  • 4
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/34744395) – Ram Chander Aug 01 '23 at 09:33