I’m trying to execute a system command, for example with
os.system('wl-copy "some-string"') in Python. When building with flatpak, my program is unable to find the program
wl-copy, because it’s installed on the host system, and my program is sandboxed.
I’ve tried adding
--filesystem=host to the
finish-args in the flatpak manifest, but as I learned here, the
/usr directory where the program lives is blacklisted.
I then came across the concept of “flatpak portals”, which seems to be in the right direction, but I don’t see any documentation on how to implement them in a GTK+ program, and I need my program to be able to execute any arbitrary system command, as a link handler can be specified by the user in a settings dialog.
Can this be accomplished using flatpak?