-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Main reason for me to use lua scripts is to be able to
- open image in gimp
- Create HDR Image
- Reveal in file browser
However, when trying any of these lua scripts, they are blocked by not able to find the associated executable
in the flatpak sandbox, however the host apps are installed and work flawlessly.
Recently i came across a solution based on
where the app can be started by flatpak-run.
This now works for me for HDRMerge, since i modified the file HDRMerge.lua like this:
local function BuildExecuteCmd(prog_table) --creates a program command using elements of the passed in program table
local result = 'flatpak-spawn --host '..CleanSpaces(prog_table.bin)..' '..CleanSpaces(prog_table.arg_string)..' '..CleanSpaces(prog_table.images_string)
return result
end
and added the dbus permission using flatseal to darktable.
This works perfectly, but needs to be done for every script which calls a host executable.
However it would be impractical to modify all scripts to also work in flatpak also.
Proposal
Extend function
'dtutils.system.external_command()
to prepend the string "'flatpak-spawn --host "
to the exec command when running in flatpak environments.
Or add a new command "external_host_command()" which has these semantics, when the former should not be modified....