Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where do the configuration, profiles, or settings of Flatpak packages live? #1214

Closed
ghost opened this issue Nov 29, 2017 · 4 comments
Closed

Comments

@ghost
Copy link

ghost commented Nov 29, 2017

Distro:

Linux Mint 18.3

Flatpak Version:

0.10.0


This is a question not an issue.

I would like to know I can go about making a backup of the config files, profiles or settings and be able to restore or use them on a different machine or after a clean install.

Typical packages store their profiles and settings in ~/.PackageName, others in ~/.config/PackageName, or both.

For example, Atom stores packages in ~/.atom and configuration files in ~/.config/Atom.

I would then run a script that performs a backup:

~ $ rsync -aq --delete ~/.atom/ /Path-To-Backup-Drive/home-dir/atom
~ $ rsync -aq --delete ~/.config/Atom/ /Path-To-Backup-Drive/config-dir/atom

In this manner, I'm able to restore and load the exact same settings on a different computer or on a clean install.

For Flatpak, I was able to follow the general path for both user and system installs, but I didn't see a directory that contains something similar to what the example above contain.

  • user path output:

    ~ $ ls ~/.local/share/flatpak/app/App-Name/x86_64/stable/Really-Long-Number/
    ~ $ deploy export/ files/ metadata*
    
  • system path output:

    # ls /var/lib/flatpak/app/App-Name/x86_64/stable/Really-Long-Number/
    # deploy export/ files/ metadata
    

How would I go about performing a backup and restoration of config files, profiles or settings on Flatpak applications?

I'm trying to wean myself from using PPAs. I'm thinking of using mostly Flatpak hopefully more in the future as more applications become available.

@chergert
Copy link
Contributor

To ensure that applications have private storage space (and cannot snoop on each other), the various XDG dirs are changed from the user defaults. You can find them in ~/.var/app/$app_id/$xdg_dir. So the .config that the org.gnome.Builder Flatpak'd application would use is ~/.var/app/org.gnome.Builder/config/.

You can verify this with something like:

$ flatpak run --command=bash org.gnome.Builder
$ echo $XDG_CONFIG_HOME
/home/christian/.var/app/org.gnome.Builder/config

Keep in mind that applications still might use an additional subdirectory such as gnome-builder in the above case. So .config/gnome-builder/ is instead ~/.var/app/org.gnome.Builder/config/gnome-builder in it's application private space.

@ghost
Copy link
Author

ghost commented Nov 29, 2017

Thank you! 😌 Whew! This was the only thing stopping me from switching my other apps to Flatpak. I didn't know about the existence of ~/.var.

@ghost ghost closed this as completed Nov 29, 2017
@RoyiAvital
Copy link

What about the Desktop Shortcuts?
Where do they go?

For instance in Linux Mint I can see launchers for Flatpak applications in Start Menu but I can't find their .desktop files.

@TingPing
Copy link
Member

What about the Desktop Shortcuts?

/var/lib/flatpak/exports/share/applications and ~/.local/share/flatpak/exports/share/applications

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants