Autostart mozilla

I have 2 systems where I rely on .config/autostart scripts to start applications when I login which has always worked fine and as expected for me.

Last week I upgraded a system from Leap 15.3 to 15.4 and both Mozilla firefox and thunderbird will start but only as a window without any “interface” and within that window I just see the background of Leap. I have no idea why that suddenly happens but for some reason I have changed the exec line to include a sleep and that makes it work so it seems to be a timing issue. I do start non Mozilla apps without this particular issue.

 Exec=bash -c "sleep 5; /usr/bin/firefox"

I need a longer sleep on the other system that is older and slower.

Does anyone have an idea of a better solution as this seems a work around but not a final solution to me. Would like to understand why this is happening.

The better solution is likely to use a systemd service to start these applications, see:

You probably want your “WantedBy” set to “graphical.target” so that you are sure the display manager is started before starting Firefox/Thunderbird.