Shortcut on flatpak and a strange fact

and also that post-install in finish-args. What do you think it is doing?

The fact that in the documentation I can’t find a practical example of what I want to do. I’m using ChatGPT, this gives me these solutions. But it’s strange because the .flatpak file is created for me, then

> - post-install: post-install.sh
> override-cmd: /post-install.sh

must be valid lines of code


As you can see in the image in the ‘Modules’ section there is the ‘script’ type

It’s not. The “AI” is just not intelligent. If it’s not in the documentation then it doesn’t exist. Check the build output, it’ll contain warnings.

The script type is a different thing anyway.


As I said: The way you try to do it does not work, you have to do it when you’re application is running.

How is it supposed to work at install time? If you have thousands of users on the system, should flatpak copy it into all user directories just because one might start the application? What happens if a new user is created after installation of the application?


But that’s as much I can help, I wish you good luck.

1 Like

Stop using bullshit generators like ChatGPT. Your are wasting people time.

I managed to solve it. I made sure that both if the .flatpak file is installed in the traditional way (flatpak install …) and if it is installed for the user only (flatpak install --user …), the archive and files necessary for program are copied and read in the ~/.local/share/LaMiaVideoteca/data folder. Everything works perfectly. The last thing I would like to know is related to folder permissions on Linux:
Which folder is intended to contain permanent data that any user can both see and modify (besides /home)?
Trying to find out online I read several times that the /var folder should be used for this purpose. However, using Fedora I realized that I cannot create other folders in /var unless I am root. And checking with the command: (ls -l) I can’t find any folder that has read and write permissions for any user. I know well that I could create it myself, but it seems strange to me that, for example, a /var/data folder that has this feature by default has not been created. I thought about this because if I ever decided to create a management system whose archive is accessible to any user who has access to the PC, I wouldn’t know in which directory to put the archive. Thanks everyone for the help.
PS: I know well that AI often gives wrong answers but sometimes it can be useful (clearly you shouldn’t rely too much on this technology).

Have a look at the xdg folder/basedir spec you want to use the env variables provided on the system for this

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

https://wiki.archlinux.org/title/XDG_Base_Directory