I have a BeagleBone Black here, running Debian 8.3, Linux 4.1.15-ti-rt-r43. Desktop is LXQT.
After boot, I want to run a .sh file - when the desktop environment is ready, as that file, after changing path and setting some variables, calls mono to start a GUI based program.
Using the "start menu":
Preferences -> LXQt settings -> Sessions settings -> Autostart
I added an entry, first under "Global Autostart", later under "LXQt Autostart" (only one of both boxes checked at a time). I specified, under "command", the path to my .sh script, via the "Search..." button, i.e. no mistyping possible. I tried it with both, "Wait for system tray" checked, and unchecked. Hit "close", and rebooted the machine via start menu each try.
After the desktop starts, nothing else happens. The script does run fine from ssh remote* command prompt, though - the app starts. Also, copying it to the Desktop and clicking it - works.
_* the .sh file contains the line "export DISPLAY=:0" as it was first used to start via ssh to start a GUI app. I commented it out to see if that changes anything here, it doesn't.
EDIT: So I have now manually crafted a .desktop file in ~/.config/autostart - noting the .desktop files LXQt made in that folder by me clicking around in the UI as described above. In my file, I specified the paths etc to start my .sh script, and set one extra option to true: "Terminal", which specifies the autostart program should be run in a terminal. What this did was to show me - yes indeed, something gets started after boot / loading desktop env, because the terminal is visible, i.e. my autostart file is not ignored. But the "echo" commands in my .sh script do not show up on that terminal, nor is my mono application started. If I then open another remote shell, and copy+paste the path I gave in the autostart .desktop file under "Exec", it does start my app as supposed - so the path is correct.
So, what's happening there? The LXQt desktop obviously finds my file, tries to autostart, but it doesn't do anything. Possible causes? I thought (not really knowing how this all works under the hood), perhaps mono/GUI isn't ready yet, even though the desktop loaded, for some funny reason, and I put a echo "sleeping...", sleep 30s, echo "calling mono app..." before calling the mono app in my .sh file that's supposed to autostart. None of this is visible inthe temrinal that does now open upon start, and it doesn't help.