When your X session starts /etc/xdg/autostart/*.desktop files are run:
http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html#idm140084019418032
Another possible way to do it would be: http://www.debian-administration.org/articles/50
A third way to do it would be...