Having a little past experience with Linux I recently decided to install Lubuntu 14.04 LTS to try and get away from windows and got most everything working except one thing so far... I have set Firefox to "Show my windows and tabs from last time" and that works just fine as long as I remember to close Firefox before I shutdown or restart, but if I forget, the next time I start Firefox 9/10 times it says that Firefox was not closed properly and sometimes forgets my tabs I had open.
I thought to try and find the logout script for lxde (if there is one) so I can maybe add a command such as "sleep 1" to delay logout for a second to allow Firefox to close properly, in my Google searches the only solution I could find that was close was Firefox not closed properly when logging out and I tried the solution suggested in that and couldn't get it to work and figured the reason why was because the solution was for gnome as opposed to lxde
So my question is, How can I add a delay during logout/shutdown to allow Firefox(or any other programs) to exit properly before continuing with logout/shutdown?
If there is already a solution to this issue, I apologize for not searching hard enough.
wmctrl -c firefox;
without a delay in your script. – TuKsn May 10 '14 at 09:48