Is There a Way to Delay Startup of Certain Autostart Apps in GNOME?

Hey GNOME folks,

I’ve got a few custom apps that launch at login via .desktop files in ~/.config/autostart, but I’d like to delay some of them (like backup sync clients) by 15–30 seconds to avoid slowing down initial session load.

Is there a GNOME-native or recommended way to handle delayed autostart? I saw some older workarounds using Exec=sh -c ‘sleep’ tricks, but curious if anything cleaner exists now or is being planned?

Thanks in advance for any tips or links!

— Jhonn Mick

1 Like

Hi,

There is a special key for that: X-GNOME-Autostart-Delay=15, to add to the *.desktop file.

1 Like

Where did you get that information from? That setting doesn’t exist, and as far as I can find never existed.

I’m using that key for one of my startup app, it’s actually quite old, I think I did it when I was using Gnome 2, and never touched the desktop file since then.

I’m currently on Cinnamon, and that key is still supported there.

TBH, I don’t know about the current support on recent Gnome releases, I assumed it’s still there, but can be wrong…

The feature never existed upstream, in GNOME.

It was a downstream patch in Ubuntu, though. See: Bug 608402 – Add support for delaying autostart applications

Cinnamon must have forked Ubuntu’s patched version of gnome-session, rather than the upstream GNOME version. So, Cinnamon inherited the patch, and continues to have it to this day

1 Like