Skip to content

Host programms not runnable from flatpak darktable  #86

@hcw70

Description

@hcw70

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

flathub/org.gnu.emacs#14

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....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions