Files
2026-04-08 06:54:37 +00:00
..
2025-09-15 05:18:30 +03:00
2024-10-23 17:10:08 -07:00
2026-04-07 23:28:47 +00:00
2025-08-01 12:42:33 -07:00
2025-08-27 06:55:32 +03:00
2024-10-23 17:10:08 -07:00
2026-04-07 23:28:47 +00:00
2026-04-08 06:54:37 +00:00
2026-04-08 06:54:37 +00:00
2025-08-01 12:42:33 -07:00
2025-08-01 12:42:33 -07:00
2025-08-27 06:55:32 +03:00
2025-08-27 06:55:32 +03:00

Flatpak plugin [WIP]

Status

  • Applications can be installed
  • Progress is displayed during installation
  • Applications can be started in sandbox

Ubuntu Package Dependency

sudo apt install libflatpak-dev libxml2-dev zlib1g-dev

Fedora Runtime Packages

sudo dnf install flatpak-devel libxml2-devel

Example flatpak CLI usage

flatpak remotes
flatpak list
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak remote-ls
flatpak install org.gnome.Todo
flatpak run org.gnome.Todo

Flutter code

https://github.com/toyota-connected/tcna-packages/tree/v2.0/packages/flatpak

Yocto Notes

  • Requires meta-flutter and meta-gnome

  • The toyota-connected-tcna-packages-flatpak-flutter-example recipe has a runtime dependency on flatpak and xdg-desktop-portal-gnome.

  • To enable xwayland for weston, include x11 wayland in DISTRO_FEATURES. This will allow any app to run ( x11/wayland).

  • You will likely need to resize your root partition to fit your storage drive. This is best done on the birthday boot; saves on image size.

  • conf/local.conf

IMAGE_INSTALL:append = " \
    toyota-connected-tcna-packages-flatpak-flutter-example
"    

Set locale for App runtime. Using the default of C will not work with some apps.

# localectl set-locale C.UTF-8
# localectl
  • Requires logging out and back in for the LANG environmental variable to update.

Install/verify a Flathub app using Flatpak

  • If youre running under a minimal Weston session (user: weston), ensure theres a user session bus before running the checks.
eval `dbus-launch --sh-syntax`
  • Wayland only
mkdir -p /home/weston/.local/share/flatpak/exports/share
export XDG_DATA_DIRS=/home/weston/.local/share/flatpak/exports/share:$XDG_DATA_DIRS
  • X11/Wayland
eval `dbus-launch --sh-syntax`
flatpak --user remote-add flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak --user install org.telegram.desktop -y
flatpak --user run org.telegram.desktop

Launch Flutter Flatpak app

eval `dbus-launch --sh-syntax`
flatpak --user update --appstream
SPDLOG_LEVEL=debug homescreen -b /usr/share/flutter/toyota-connected-tcna-packages-flatpak-flutter-example/3.35.7/release/

Troubleshooting: org.freedesktop.portal.Settings error

If you see errors like:

qt.qpa.theme.gnome: dbus reply error: [ "org.freedesktop.DBus.Error.UnknownMethod" ] "No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop"

It means the XDG Desktop Portal on your session bus doesnt provide the Settings interface. This usually happens when the portal or a matching backend isnt installed/running, or the portal is too old.

Verify the portal provides the Settings interface:

# Ensure a session bus exists (use dbus-launch if needed, as shown above)
busctl --user introspect org.freedesktop.portal.Desktop \
    /org/freedesktop/portal/desktop org.freedesktop.portal.Settings

# Alternative
gdbus introspect --session \
    --dest org.freedesktop.portal.Desktop \
    --object-path /org/freedesktop/portal/desktop | grep -i Settings || true

Flatpak sandbox notes:

  • Portals run on the host. To check from inside a Flatpak:
flatpak-spawn --host busctl --user introspect \
    org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop \
    org.freedesktop.portal.Settings

Generate message.g.h and messages.g.cc

git clone https://github.com/toyota-connected/tcna-packages/tree/v2.0/packages/flatpak
cd packages/flatpak
dart run pigeon --input pigeons/messages.dart

Flatpak API reference

https://docs.flatpak.org/en/latest/libflatpak-api-reference.html