Skip to content

Config does not persist in flatpaks if .config/cosmic folder does not exist #1111

@FriederHannenheim

Description

@FriederHannenheim

With c2b7d78 flatpak support was added to cosmic_config.

However the way it is implemented now does not work if XDG_CONFIG_HOME is not set on the host and .config/cosmic does not exist on the host.
When the application requests --filesystem=xdg-config/cosmic:rw the $XDG_CONFIG_HOME/cosmic folder is only mounted in if it exists.

When XDG_CONFIG_HOME is not set on the host, flatpak does not set HOST_XDG_CONFIG_HOME in the Sandbox and cosmic_config uses $HOME/.config/cosmic in the sandbox as a fallback. But this directory is cleared after the flatpak exits.

Proposed solution

Fallback to $XDG_CONFIG_HOME/cosmic if the app is sandboxed and $HOME/.config/cosmic does not exist

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