I just had a horrible time doing this in Lubuntu, so I thought I would share how I finally got it. Create a
.desktop file in
/etc/xdg/autostart. You can get the format from freedesktop Desktop Application Autostart Specification and/or just look at other desktop configuration files in that folder. My big problem was that I was trying to put it in the folders listed by the command
but that gives folders that don't work, as well as the one above. Perhaps, on other systems, you could get a hint about where to put it from
sudo find / -name *.desktop
Another little hint - if you write a
.desktop file, you can check it by putting it in your desktop folder. It should show up as an icon, and when opening it, it should run your program.