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?

  • See second answer with 29 votes regarding terminal=true askubuntu.com/questions/299052/… – WinEunuuchs2Unix Sep 7 '18 at 12:22
  • Maybe you should add Path= directive within the .desktop file. Please provide the content od this file. – pa4080 Sep 7 '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 7 '18 at 12:24
  • I tried your suggestion @WinEunuuchs2Unix it did not work. – Hakaishin Sep 7 '18 at 12:29
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

  • 1
    Thank you very much, simply fix that worked for me. – Hakaishin Sep 7 '18 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.