Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: find web browser via flatpak portals #150

Merged
merged 4 commits into from
Jun 25, 2024

Conversation

williamjmorenor
Copy link
Contributor

Hello

I am playing with the packaging as flatpak of app using flaskwebgui to serve a flask app as desktop app.

By default apps running as flatpak have very limited access to the host system.

To have access to the host system you must provide --filesystem=host-os:ro to access the /usr/bin dir that become available under /run/host/usr

The proposed changes include these dir to find a web brower after looking at a system installed one.

I certify that the proposed changes are my authorship and I agree that they will be included in the source code of the application under the terms of the project license.

Copy link
Owner

@ClimenteA ClimenteA left a comment

Choose a reason for hiding this comment

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

When finding a browser for linux this line: subprocess.check_output(["which", os.path.basename(path)]) - should take care of all the possible paths that are not provided, but adding a few paths won't break anything.

Some updates:

  • Bump version to version="1.1.2" in setup.py;
  • Include some docs on how to package/publish the app using flatpack in the Distribution section of the readme file;
  • Minimize comments - one line comment should be enough (Web browsers installed via flatpack);
  • (Optional) Maybe research how to package/publish it under snap?

Signed-off-by: William Moreno <[email protected]>
Signed-off-by: William Moreno <[email protected]>
Signed-off-by: William Moreno <[email protected]>
@williamjmorenor williamjmorenor changed the title Include support for find web browers inside a flatpak container. feat: find web browser via flatpak portals Jun 24, 2024
@williamjmorenor
Copy link
Contributor Author

for any looking for this in the future (hopes search index will find this):

Example of packaging a flaskwebgui powered app as flatpak: https://github.com/cacao-accounting/cacao-accounting-flatpak

Example of packaging a flaskwebgui powered app as snap: https://github.com/cacao-accounting/cacao-accounting-snap

@ClimenteA
Copy link
Owner

Nice man!

@ClimenteA ClimenteA closed this Jun 25, 2024
@ClimenteA ClimenteA reopened this Jun 25, 2024
@ClimenteA ClimenteA merged commit b673165 into ClimenteA:master Jun 25, 2024
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.

None yet

2 participants