Is there a way to set the enviroment variable in .desktop file?
I'm trying to run application (eclipse) with custom gtk style, so basically I want to get the following result by runing a .desktop file:
GTK2_RC_FILES=gtkrc.custom /path/to/eclipse
I've tryied to put it in a bash script and run it from the .desktop file, but then it does not integrate well with the Unity launcher.
Best Answer
You can add an environment variable to an application by editing its
.desktop
file. For example, to run "digiKam" with the environment variableAPPMENU_DISPLAY_BOTH=1
, find the correspondingdigikam.desktop
file and add the setting of the variable, via theenv
command, to the entry "Exec":In your case: