podman-desktop icon indicating copy to clipboard operation
podman-desktop copied to clipboard

Managed configuration file location on linux does not work for flatpak build of Podman Desktop

Open odockal opened this issue 2 weeks ago • 2 comments

Bug description

Location for default managed config /usr/share/podman-desktop/default-settings.json does nothing in PD when it is installed from flatpak.

Operating system

Linux

Installation Method

None

Version

1.24.0

Steps to reproduce

  1. Install PD from flatpak
  2. Create default-settings.json at /usr/share/podman-desktop/ with content:
{"preferences.appearance":"dark"}
  1. Open PD, check the default preference value for appearance. Should be dark Actual: It is still light/system.

Relevant log output


Additional context

No response

odockal avatar Dec 10 '25 15:12 odockal

Bug description

Location for default managed config /usr/share/podman-desktop/default-settings.json does nothing in PD when it is installed from flatpak.

Operating system

Linux

Installation Method

None

Version

1.24.0

Steps to reproduce

  1. Install PD from flatpak
  2. Create default-settings.json at /usr/share/podman-desktop/ with content:
{"preferences.appearance":"dark"}
  1. Open PD, check the default preference value for appearance. Should be dark Actual: It is still light/system.

Relevant log output

Additional context

No response

I'm assuming it'll be - "--filesystem=/usr/share/podman-desktop:ro" to finish-args: https://github.com/flathub/io.podman_desktop.PodmanDesktop/blob/master/io.podman_desktop.PodmanDesktop.yml

Will try this out and see.

Confirmed that this is working though non-flatpak.

cdrage avatar Dec 10 '25 16:12 cdrage

Investigated this and ended up building it with the added change of --filesystem=/usr/share/podman-desktop:ro (after also updating electron since we updated to 1.24.2 with it)... which unfortunatley also failed.

The reason why we are failing is because /usr is a reserved directory within Flatpak.

Which isn't an issue for native builds (non-flatpak) as they are able to access the host system, but an issue for users without root or administrative privileges on Linux (OS managed by adminisatrator), who's OS is being managed by an admin / the /usr/share directory.

This is the rare case where a sysadmin wants to manage a flatpak-installed PD on a system without admin privileges to /usr/share

Logs:

[foo@fedora io.podman_desktop.PodmanDesktop]$ flatpak run io.podman_desktop.PodmanDesktop 
F: Not sharing "/usr/share/podman-desktop" with sandbox: Path "/usr" is reserved by Flatpak
[3:1210/173509.118404:ERROR:dbus/[bus.cc:408](http://bus.cc:408/)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
(node:3) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `podman-desktop --trace-deprecation ...` to show where the warning was created)
[3:1210/173510.227832:ERROR:dbus/[bus.cc:408](http://bus.cc:408/)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[3:1210/173510.228103:ERROR:dbus/[bus.cc:408](http://bus.cc:408/)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
LaunchProcess: failed to execvp:

My suggestion is that we:

  • Mount the folder to an alternative location for the volume mounting for flatpak (ex, mount it to somewhere safe such as /mnt within the flatpak)
  • Update our https://github.com/containers/podman-desktop/blob/38b1488906281c19d6694c975c46675914675883/packages/main/src/plugin/directories-linux-xdg.ts and https://github.com/containers/podman-desktop/blob/38b1488906281c19d6694c975c46675914675883/packages/main/src/plugin/directories-legacy.ts code to detect Flatpak and use that directory instead.

cdrage avatar Dec 10 '25 22:12 cdrage