1

I have a weird bug that only happens when I start clion from the icon. Clicking on the icon I get: ImportError: No module named catkin.environment_cache in the cmake window. When I start clion from the console like I usually do I don't get this error, I get no error at all. I assume it has something to do with the environment variables that are different depending on the way I start it. I checked jetbrains-clion.desktop and it launches the same binary with the same options I do when starting it from the command line.

Is there a way to set the same environment variables for a .desktop file, as if the command was run from a terminal?

Hakaishin
  • 366
  • 3
  • 18
  • See second answer with 29 votes regarding `terminal=true` https://askubuntu.com/questions/299052/how-to-execute-sh-script-from-a-desktop-shortcut – WinEunuuchs2Unix Sep 07 '18 at 12:22
  • Maybe you should add `Path=` directive within the .desktop file. Please provide the content od this file. – pa4080 Sep 07 '18 at 12:23
  • You can start via a terminal window: For the `Exec` line of the desktop file you can use something like `Exec=xterm ... -e program-name %f` where `...` are various options and `program-name` is the name of the program you want to start. Maybe you have to install `xterm` or use another terminal program. – sudodus Sep 07 '18 at 12:24
  • I tried your suggestion @WinEunuuchs2Unix it did not work. – Hakaishin Sep 07 '18 at 12:29

1 Answers1

2

You could try modifying the CLion .desktop entry to open clion with bash by changing the Exec line

Exec=bash -i -c "/INSTALL_LOCATION/clion-2018.2.3/bin/clion.sh" %f

Replace the install location with wherever clion is installed to

Amith KK
  • 13,372
  • 13
  • 66
  • 121