Skip to content

Conversation

@bmp192529
Copy link

This addition to the documentation could clarify the differences between testing the application with flatpak-builder --run and by fully installing and running the application, and how those differences could cause problems with system integration while running with flatpak-builder. Adding this to the documentation could save developer time and make flatpak development easier for newcomers. I personally spent a large amount of time trying to debug multiple issues that were solely a result of testing the application with flatpak-builder --run, which is especially confusing considering that the application mostly works as expected when tested that way.

Clarify the importance of fully installing the package before debugging and provide commands for local test installation.
Before debugging, it is essential to install the debug packages used by
Before debugging, ensure you fully install the package, as simply running the package with "flatpak-builder --run ..." will run a version of the program with more limited system integration. Many perceived bugs seen when running the application with "flatpak-builder --run" may completely disapear when the application is installed fully. Some examples of features that might not work properly while running within flatpak-builder are file explorer dialogues and automatic detection of Wayland or X11 sessions. To make a local test install of your application, and then run it, use the following::

$ flatpak-builder --install <build-dir> <manifest>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use flatpak-builder from inside flatpak, as we suggests in the docs. (this only won't work for extra data apps)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what you mean by "from inside flatpak". Can you explain and potentially point out where the docs suggest this?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://docs.flathub.org/docs/for-app-authors/submission#build-and-install

flatpak run --command=flathub-build org.flatpak.Builder --install <manifest>

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thank you for clarifying that. It seems that you are talking about the flatHub documentation, while I was referring to the flatpak and flatpak-builder documentation. If you review the building section of the flatpak documentation at https://docs.flatpak.org/en/latest/building.html, you'll see that the command you specify is not used in any of the pages in that section.

As a related point, what is the intended function of "flatpak-builder --run" if running a program in that manner is not recommended?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I'm in the wrong context

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I'm in the wrong context

@bbhtt bbhtt closed this Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants