If you want to autostart an application in Raspbian, just edit the following file;
~/.config/lxsession/LXDE-pi/autostart
contents of this file
@lxpanel –profile LXDE-pi
@pcmanfm –desktop –profile LXDE-pi
@xscreensaver -no-splash
@hexchat
I added ‘@hexchat’ on the bottom to have HexChat IRC client autostarted on logon.