External Publication
Visit Post

What would be the best way to refer to the Flatpak XDG data home in a config file?

Flathub Discourse [Unofficial] June 18, 2026
Source

Sorry for the weird phrasing, but basically, I’m trying to package a source port of a game for which the default game data install location is ../share/vanillatd or ../share/vanillara(it covers the original Command & Conquer as well as Red Alert).

Because I don’t want to ask users to create folders and install the game data in /var/lib/flatpak/app/com.github.vanillaconquer.Vanilla-Conquer/x86_64/master/26fefaf6c137637293569700598454a6749cb1ef0bc445355d087f60d970e0ec/files/share because that’s silly, I want to create the folder structure and barebone config files pointing to /home/hazelnot/.var/app/com.github.vanillaconquer.Vanilla-Conquer/data/vanillatd/.

The problem is that I’m not really sure how to do that, since it seems like the config files only point the executables to the exact path defined in the file. I assume there has to be some shell script-y way of defining it before installing the config file, but I’m not sure how to do that? Since if I hardcode it in the file itself it looks like it would have to directly use the username of the current user

It’s my first time attempting to create a Flatpak (and it’s actually already functional, though it does currently require the user to manually set a data path in the config file, and it also doesn’t have icons or desktop files yet), so I would really appreciate any help with this!

Discussion in the ATmosphere

Loading comments...