← Blender.Today
  • Published 7 Jul 2020

Blender on Linux, doubt ...

Hello, I am moving from Mac to Linux to use Blender (it gives me the feeling that it is more stable and, above all, faster). The problem I have is the following: On Mac I had a script, to run an instance of each version of Blender, in which I defined the ENV variables: $ BLENDER_USER_CONFIG and $ BLENDER_USER_SCRIPTS, so that the program started with a different configuration ( startup file and installed addons) depending on the version (if you launched the script for 2.83 it came with certain addons or if you launched the 2.79 or 2.90a with others). In Linux I have managed to configure a .desktop for each version so that it launches the corresponding instance but ... does anyone know how to define the ENV variables for each .desktop so that they have their different path to config and scripts? I hope I explained myself well ... Thanks!

danielcamino
7 Jul 2020

13 Comments

michael

This should work: You can change the Exec line in the .desktop file like this:

Exec=env YOUR_VAR1=value1 YOUR_VAR2=value2 /opt/blender-2.90/blender %f

However, I'm wondering why you'd need that for what you're trying to do. Blender saves separate settings for each version in ~/.config/blender/ anyways.

1
danielcamino Author

* @michael * Thanks!!!! I save my setting in external cloud disk (so I can access to config and scripts in all of my devices). That's why!

1
michael

* @danielcamino * Oh that's neat! (You can use the blender cloud addon for that as well, btw. ;) - But I see that your solution is even better, because it's automatic.

1
danielcamino Author

* @michael * I try modify Exec in .desktop and did not work... :(

danielcamino Author

* @danielcamino * This is my Exec line: Exec=env BLENDER_USER_CONFIG=/Home/daniel/Dropbox/apps/BLENDER/CONF/2.83/config BLENDER_USER_SCRIPTS=/Home/daniel/Dropbox/apps/BLENDER/CONF/2.83/scripts /opt/blender2.83/blender %f

michael

* @danielcamino * hmm.... I believe I missed the " "

Can you try this:

Exec=env BLENDER_USER_CONFIG=/Home/daniel/Dropbox/apps/BLENDER/CONF/2.83/config BLENDER_USER_SCRIPTS=/Home/daniel/Dropbox/apps/BLENDER/CONF/2.83/scripts "/opt/blender2.83/blender" %f

1
danielcamino Author

* @michael * Nop... still the same... Blender starts but with default configuration (with quote / no quote versions)

michael

* @danielcamino * AH! it's probably because your path is wrong. It's /home, not /Home It's case sensitive!!

1
danielcamino Author

* @michael * Oh my God! I change it and still not working... :(

danielcamino Author

* @danielcamino * This is my .desktop file: dropbox.com/s/k4g90zq0heijn7k/blender_desktop.jpg

michael

* @danielcamino * Hm, sorry to hear. But this is generally the way to do it. - See here or here

Something else you can try:

To be sure your path is correct: navigate to the folder in a Terminal and use the output of the pwd command as your path.

Also, I'm not sure if you'll need to add a / to the end of the path. - Because when you add a scripts folder in User Prefs, the path is saved with a / at the end.

Edit: I checked some of my .desktop files and found one where a path is configured - You definitely need the trailing / .

1
danielcamino Author

* @michael * Done! Finaly I get other way to resolve it. I create an sh file (with "export" command declaring the ENV variables) and call this file from .desktop. Works nice and dandy!

NiCapp

* @danielcamino * when i used dopbox to save my configuration i simple move .config Blender folder on dropbox and symlink (ln -s .... ) it on older Blender default place. this was always worked until dopbox is available before open Blender. I use symlink to store my Blender config in safe place on NAS just now