Order of startup applications

Does anybody knows if It is possible to make one application start before another when using autostart?

In my case, I want my tailscale instance to start running before my nextcloud sync app does. I’m currently using a local instance of Nextcloud AIO via tailscale, so I need tailscale to start first.

I don’t use either tailscale or nextcloud so do not have enough info for a full answer.

How are these apps launched? Are they services or via a desktop icon? (a .desktop file)

If you are using autostart with the icons (.desktop file) I am not sure how to sequence the launch. I am guessing you may have the desktop file under ~/.config/autostart/ and if so then maybe someone with experience can step in with the details.

I do have 3 apps with autostart and I note that they start in alphabetical order of the file names, but am unsure if that is a result of the naming or if that is a result of the app size and the time required to load and start each one.

If it is a service you can place commands within that .service file to ensure that they start in the correct order. An example of doing that is seen in the /lib/systemd/system/cockpit.service file with the requires and after statements.

Tailscale can start at boot as a system service:

sudo systemctl enable tailscaled.service --now

Nextcloud can start at login as a user service.

See also: Enable WiFi at boot - #2 by vgaetera

2 Likes

For what it is worth, under Gnome Shell, autostart applications can be delayed with an X-GNOME-Autostart-Delay statement in the .desktop launcher, e.g.

X-GNOME-Autostart-Delay=10

to delay for 10 seconds.

2 Likes