While it is technically correct to say "run on startup", it is better to say "run on login" in this case.
An flatpak
application like Slack should be launched after the user logged in, and not before that.
But a flatpak
application like Jellyfin Server could also start regardless if the user logged in, so this is more akin to "run on startup".
I point this out because there are many scenarios and different ways to achieve them.
The Arch-Linux wiki covers many of them, based on Desktop-Environment, Window-Manager, etc.:
Now to return to Ubuntu and Gnome:
When adding a startup application via Gnome Tweaks, a .desktop
file is created under ~/.config/autostart
.
With that in mind one can create custom .desktop
files in that directory.
For example here is a custom file to launch flatpak's PCSX2 after the user logged in:
cat ~/.config/autostart/test-PCSX2.desktop
[Desktop Entry]
Type=Application
Name=test-PCSX2
Exec=flatpak run net.pcsx2.PCSX2
These files can be tested by logging-out and logging-in again, no full restart needed :)