Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JetBrains applications/products installed using JetBrains Toolbox won't start #240444

Open
x80486 opened this issue Jun 29, 2023 · 16 comments
Open

Comments

@x80486
Copy link

x80486 commented Jun 29, 2023

Describe the Bug

I recently installed jetbrains-toolbox with Home Manager. I then installed at least 3 applications I commonly use, using JetBrains Toolbox...and not a single one will start.

Steps To Reproduce

  1. Install jetbrains-toolbox
  2. Open JetBrains Toolbox and install DataGrip (or any other application/product)
  3. Start the application

Expected Behavior

Applications installed should work.

Additional Context

This is the error I'm getting in the journal:

Jun 28 18:12:46 uplink jetbrains-idea.desktop[59365]: /home/x80486/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9161.38/bin/idea.sh: line 171: /home/x80486/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9161.38/jbr/bin/java: cannot execute: required file not found

And something similar if I try to just run the shell script directly:

[x80486@uplink:~/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9161.38/bin]$ ./idea.sh 
./idea.sh: line 171: /home/x80486/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9161.38/jbr/bin/java: cannot execute: required file not found

Notify maintainers

@AnatolyPopov

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[x80486@uplink:~]$ nix-shell -p nix-info --run "nix-info -m"
this path will be fetched (0.01 MiB download, 0.05 MiB unpacked):
  /nix/store/5wdlffjhcr4i43sfajxcvx3lvnkryh5y-stdenv-linux
copying path '/nix/store/5wdlffjhcr4i43sfajxcvx3lvnkryh5y-stdenv-linux' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.35, NixOS, 23.05 (Stoat), 23.05.1375.9790f3242da`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.3`
 - channels(x80486): `"home-manager-23.05.tar.gz"`
 - channels(root): `"nixos-23.05"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@nazarewk
Copy link
Member

nazarewk commented Jul 7, 2023

I'm not sure what happened, but after recent system update and rm -rf ~/.cache/JetBrains/Fleet it is launching for me, but only through Jetbrains Toolbox - the script doesn't work.

It seems to start in it's own bwrap environment

@x80486
Copy link
Author

x80486 commented Jul 10, 2023

I see what you describe. Not sure what's going on with Toolbox, but the applications are able to start if started, as you said, from Toolbox itself. Basically the desktop icon is useless for the time being.

Feel free to let this one open if you have plans to take a look at it at some point. Thanks for the tip! 👋

@AnatolyPopov
Copy link
Member

As far as I understand the reason is that you are using JetBrains JDK that is downloaded into your home directory. It is not properly patched to see the all the needed system library and interpreter and has default paths in ELF file. That's the reason for file not found. When you start your ide from JB Toolbox it's started via appimage and the appimage environment has all the required paths, so dependencies of jvm are resolvable there. So this appimage env is propagated to ide and because of that it magically works. I was trying to solve this issue for quite long time (before I discovered how to run Toolbox) and all my attempts were unsuccessful.

@mattiasflodin
Copy link

I'm seeing this problem also. I have not downloaded anything "manually" - I installed the NixOS package for jetbrains-toolbox and then used that for installing JetBrains applications (as is pretty much the whole point of it).

Applications work when started by JetBrains Toolbox because they are then launched inside the bwrap environment. The problem is the .desktop files created by Jetbrains Toolbox just try to start the java binary without the bwrap environment.

I realize it is messy to live-patch .desktop files that JetBrains Toolbox creates. But if NixOS at least provded a way for me to launch applications inside of the same environment as JetBrains Toolbox (similar to the steam-run package) then I could create my own .desktop files or shell scripts to start the developer tools without having to click my way through the Toolbox every time.

@mattiasflodin
Copy link

This is aggravated by the fact that the Jetbrains Toolbox tray icon does not display properly in the polybar tray, so if you ever close the Toolbox window you have to start another Toolbox process even though the previous one is still running.

@Valpha80
Copy link

Valpha80 commented Dec 5, 2023

New to NixOS here, and I have the same behaviour.

Fresh install of "jetbrains-toolbox" through systemPackages in /etc/nixos/configuration.nix

I installed RustRover from the ToolBox and whenever I try to start it with the "application shortcut" it doesn't start.
I need to start it from Jetbrains Toolbox for it to start properly.

@haraldh
Copy link
Contributor

haraldh commented Mar 4, 2024

  programs.nix-ld.enable = true;
  programs.nix-ld.libraries = with pkgs; [
    curl
    expat
    fontconfig
    freetype
    fuse
    fuse3
    glib
    icu
    libclang.lib
    libdbusmenu
    libxcrypt-legacy
    libxml2
    nss
    openssl
    python3
    stdenv.cc.cc
    xorg.libX11
    xorg.libXcursor
    xorg.libXext
    xorg.libXi
    xorg.libXrender
    xorg.libXtst
    xz
    zlib
  ];

works for me with rustrover...

@brcha
Copy link
Contributor

brcha commented Mar 8, 2024

  programs.nix-ld.enable = true;
  programs.nix-ld.libraries = with pkgs; [
    curl
    expat
    fontconfig
    freetype
    fuse
    fuse3
    glib
    icu
    libclang.lib
    libdbusmenu
    libxcrypt-legacy
    libxml2
    nss
    openssl
    python3
    stdenv.cc.cc
    xorg.libX11
    xorg.libXcursor
    xorg.libXext
    xorg.libXi
    xorg.libXrender
    xorg.libXtst
    xz
    zlib
  ];

works for me with rustrover...

First time I hear of nix-ld. Thanks, I will look into it and use it to enable apps. It's mostly probable that your setup works for other jetbrains apps as well, since they are all one app, anyway.

@captainepoch
Copy link

captainepoch commented Mar 9, 2024

It somehow works, but when using Android Studio, I cannot setup the JDK path to the JAVA_HOME env. variable, which is possible using the android-studio package. It doesn't even show at the JDK version selector.

@haraldh Do you happen to know how to fix this with your setup?

@haraldh
Copy link
Contributor

haraldh commented Mar 11, 2024

You can try with all appimage packages as defined in

multiPkgs = pkgs: with pkgs; [
desktop-file-utils
xorg.libXcomposite
xorg.libXtst
xorg.libXrandr
xorg.libXext
xorg.libX11
xorg.libXfixes
libGL
gst_all_1.gstreamer
gst_all_1.gst-plugins-ugly
gst_all_1.gst-plugins-base
libdrm
xorg.xkeyboardconfig
xorg.libpciaccess
glib
gtk2
bzip2
zlib
gdk-pixbuf
xorg.libXinerama
xorg.libXdamage
xorg.libXcursor
xorg.libXrender
xorg.libXScrnSaver
xorg.libXxf86vm
xorg.libXi
xorg.libSM
xorg.libICE
freetype
curlWithGnuTls
nspr
nss
fontconfig
cairo
pango
expat
dbus
cups
libcap
SDL2
libusb1
udev
dbus-glib
atk
at-spi2-atk
libudev0-shim
xorg.libXt
xorg.libXmu
xorg.libxcb
xorg.xcbutil
xorg.xcbutilwm
xorg.xcbutilimage
xorg.xcbutilkeysyms
xorg.xcbutilrenderutil
libGLU
libuuid
libogg
libvorbis
SDL
SDL2_image
glew110
openssl
libidn
tbb
wayland
mesa
libxkbcommon
vulkan-loader
flac
freeglut
libjpeg
libpng12
libpulseaudio
libsamplerate
libmikmod
libthai
libtheora
libtiff
pixman
speex
SDL_image
SDL_ttf
SDL_mixer
SDL2_ttf
SDL2_mixer
libappindicator-gtk2
libcaca
libcanberra
libgcrypt
libvpx
librsvg
xorg.libXft
libvdpau
alsa-lib
harfbuzz
e2fsprogs
libgpg-error
keyutils.lib
libjack2
fribidi
p11-kit
gmp
# libraries not on the upstream include list, but nevertheless expected
# by at least one appimage
libtool.lib # for Synfigstudio
xorg.libxshmfence # for apple-music-electron
at-spi2-core
pciutils # for FreeCAD
pipewire # immersed-vr wayland support

e.g.

    programs.nix-ld.libraries = with pkgs; [
      SDL
      SDL2
      SDL2_image
      SDL2_mixer
      SDL2_ttf
      SDL_image
      SDL_mixer
      SDL_ttf
      alsa-lib
      at-spi2-atk
      at-spi2-core
      atk
      bzip2
      cairo
      cups
      curlWithGnuTls
      dbus
      dbus-glib
      desktop-file-utils
      e2fsprogs
      expat
      flac
      fontconfig
      freeglut
      freetype
      fribidi
      fuse
      fuse3
      gdk-pixbuf
      glew110
      glib
      gmp
      gst_all_1.gst-plugins-base
      gst_all_1.gst-plugins-ugly
      gst_all_1.gstreamer
      gtk2
      harfbuzz
      icu
      keyutils.lib
      libGL
      libGLU
      libappindicator-gtk2
      libcaca
      libcanberra
      libcap
      libclang.lib
      libdbusmenu
      libdrm
      libgcrypt
      libgpg-error
      libidn
      libjack2
      libjpeg
      libmikmod
      libogg
      libpng12
      libpulseaudio
      librsvg
      libsamplerate
      libthai
      libtheora
      libtiff
      libudev0-shim
      libusb1
      libuuid
      libvdpau
      libvorbis
      libvpx
      libxcrypt-legacy
      libxkbcommon
      libxml2
      mesa
      nspr
      nss
      openssl
      p11-kit
      pango
      pixman
      python3
      speex
      stdenv.cc.cc
      tbb
      udev
      vulkan-loader
      wayland
      xorg.libICE
      xorg.libSM
      xorg.libX11
      xorg.libXScrnSaver
      xorg.libXcomposite
      xorg.libXcursor
      xorg.libXdamage
      xorg.libXext
      xorg.libXfixes
      xorg.libXft
      xorg.libXi
      xorg.libXinerama
      xorg.libXmu
      xorg.libXrandr
      xorg.libXrender
      xorg.libXt
      xorg.libXtst
      xorg.libXxf86vm
      xorg.libpciaccess
      xorg.libxcb
      xorg.xcbutil
      xorg.xcbutilimage
      xorg.xcbutilkeysyms
      xorg.xcbutilrenderutil
      xorg.xcbutilwm
      xorg.xkeyboardconfig
      xz
      zlib
    ];

@meenzen
Copy link

meenzen commented Mar 20, 2024

You can try with all appimage packages as defined in

multiPkgs = pkgs: with pkgs; [
desktop-file-utils
xorg.libXcomposite
xorg.libXtst
xorg.libXrandr
xorg.libXext
xorg.libX11
xorg.libXfixes
libGL
gst_all_1.gstreamer
gst_all_1.gst-plugins-ugly
gst_all_1.gst-plugins-base
libdrm
xorg.xkeyboardconfig
xorg.libpciaccess
glib
gtk2
bzip2
zlib
gdk-pixbuf
xorg.libXinerama
xorg.libXdamage
xorg.libXcursor
xorg.libXrender
xorg.libXScrnSaver
xorg.libXxf86vm
xorg.libXi
xorg.libSM
xorg.libICE
freetype
curlWithGnuTls
nspr
nss
fontconfig
cairo
pango
expat
dbus
cups
libcap
SDL2
libusb1
udev
dbus-glib
atk
at-spi2-atk
libudev0-shim
xorg.libXt
xorg.libXmu
xorg.libxcb
xorg.xcbutil
xorg.xcbutilwm
xorg.xcbutilimage
xorg.xcbutilkeysyms
xorg.xcbutilrenderutil
libGLU
libuuid
libogg
libvorbis
SDL
SDL2_image
glew110
openssl
libidn
tbb
wayland
mesa
libxkbcommon
vulkan-loader
flac
freeglut
libjpeg
libpng12
libpulseaudio
libsamplerate
libmikmod
libthai
libtheora
libtiff
pixman
speex
SDL_image
SDL_ttf
SDL_mixer
SDL2_ttf
SDL2_mixer
libappindicator-gtk2
libcaca
libcanberra
libgcrypt
libvpx
librsvg
xorg.libXft
libvdpau
alsa-lib
harfbuzz
e2fsprogs
libgpg-error
keyutils.lib
libjack2
fribidi
p11-kit
gmp
# libraries not on the upstream include list, but nevertheless expected
# by at least one appimage
libtool.lib # for Synfigstudio
xorg.libxshmfence # for apple-music-electron
at-spi2-core
pciutils # for FreeCAD
pipewire # immersed-vr wayland support

e.g.

    programs.nix-ld.libraries = with pkgs; [
      SDL
      SDL2
      SDL2_image
      SDL2_mixer
      SDL2_ttf
      SDL_image
      SDL_mixer
      SDL_ttf
      alsa-lib
      at-spi2-atk
      at-spi2-core
      atk
      bzip2
      cairo
      cups
      curlWithGnuTls
      dbus
      dbus-glib
      desktop-file-utils
      e2fsprogs
      expat
      flac
      fontconfig
      freeglut
      freetype
      fribidi
      fuse
      fuse3
      gdk-pixbuf
      glew110
      glib
      gmp
      gst_all_1.gst-plugins-base
      gst_all_1.gst-plugins-ugly
      gst_all_1.gstreamer
      gtk2
      harfbuzz
      icu
      keyutils.lib
      libGL
      libGLU
      libappindicator-gtk2
      libcaca
      libcanberra
      libcap
      libclang.lib
      libdbusmenu
      libdrm
      libgcrypt
      libgpg-error
      libidn
      libjack2
      libjpeg
      libmikmod
      libogg
      libpng12
      libpulseaudio
      librsvg
      libsamplerate
      libthai
      libtheora
      libtiff
      libudev0-shim
      libusb1
      libuuid
      libvdpau
      libvorbis
      libvpx
      libxcrypt-legacy
      libxkbcommon
      libxml2
      mesa
      nspr
      nss
      openssl
      p11-kit
      pango
      pixman
      python3
      speex
      stdenv.cc.cc
      tbb
      udev
      vulkan-loader
      wayland
      xorg.libICE
      xorg.libSM
      xorg.libX11
      xorg.libXScrnSaver
      xorg.libXcomposite
      xorg.libXcursor
      xorg.libXdamage
      xorg.libXext
      xorg.libXfixes
      xorg.libXft
      xorg.libXi
      xorg.libXinerama
      xorg.libXmu
      xorg.libXrandr
      xorg.libXrender
      xorg.libXt
      xorg.libXtst
      xorg.libXxf86vm
      xorg.libpciaccess
      xorg.libxcb
      xorg.xcbutil
      xorg.xcbutilimage
      xorg.xcbutilkeysyms
      xorg.xcbutilrenderutil
      xorg.xcbutilwm
      xorg.xkeyboardconfig
      xz
      zlib
    ];

I can confirm this works for:

  • IntelliJ IDEA Ultimate
  • Rider
  • RustRover
  • WebStorm

@haraldh
Copy link
Contributor

haraldh commented Mar 20, 2024

libsecret is also nice to have

@meenzen
Copy link

meenzen commented Mar 21, 2024

When I launch an IDE using the jetbrains-toolbox app git works fine. When I start the IDE externally, any git server communication fails with the following error:

unable to access 'https://git.example.org/foo/bar.git/': server certificate verification failed. CAfile: none CRLfile: none

Is there a workaround to make the system CA bundle available?

@haraldh
Copy link
Contributor

haraldh commented Mar 21, 2024

Does setting
export SSL_CERT_FILE="/etc/ssl/certs/ca-bundle.crt"
help?

@haraldh
Copy link
Contributor

haraldh commented Mar 21, 2024

or NIX_SSL_CERT_FILE

@meenzen
Copy link

meenzen commented Mar 21, 2024

I've set both variables, it doesn't help unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants