The environment variables of a program differ on whether it is started from a terminal or from the desktop (by clicking on its icon).
For example: I use bash and have specific variables set in my .bashrc for development purposes. When I start my editor of choice (sublime text, but this is true for any program) from the command line everything works fine. When I start it from the desktop (gnome 3 in this case), the variables are missing.
So my question is: What is the correct way to define variables that are honored by the desktop and the terminal alike?