April 23, 2013

Env variables available in KDE

To make some environmental variable available in KDE you should export it during KDE initialization. To do this you can:

1
Create an initialization script, for example:
#!/bin/sh
# my_var_init.sh

export MY_VAR=my_value
2
Put this script to one of the next directories:
~/.kde/env/
# or
~/.kde4/env/
# or something similar

If you absolutely do not know, where to put you script, then go to
"System settings -> Startup and Shutdown -> Autostart" and add path to it.

3
Restart your session.