When using login managers such as LightDM to start the X server add them to the ~/.xprofile file. When using the startx command or SLiM to login, add them to the ~/.xinitrc file.