'Is it possible to make multiple commands from one Flatpak app?

For example, I have application with server and client, is it possible to create single Flatpak app called myapp, and after installing the application with:

flatpak install myapp

running it with something like:

flatpak run myapp.server
flatpak run myapp.client

And if it is possible can you show me please how to do it? Or I have only option of creating separate applications for server and client?



Solution 1:[1]

No, it is (currently) not possible to have two command inside one flatpak app.

But what you can do, is to create two distinct launchers:

myapp.desktop and myapp.client.desktop

(one of them must match the app-id!)

One with Exec=/app/myapp and the other with Exec=/app/myapp.client

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1