I would like to set an environment variable so that it is set when I launch a specific Flatpak application, and only set for this application. How do I go about doing this in a permanent manner?


You can do this via the flatpak override command.

To set only one environment variable you can use this syntax:

flatpak override --env=VARIABLE_NAME=VARIABLE_VALUE full.application.Name

To set multiple environment variables you can use this syntax:


This will set it globally and therefore requires you to run the command as root. If you want to do this for your current user, you can add the --user parameter to the command, like so:

flatpak override --user --env=VARIABLE_NAME=VARIABLE_VALUE full.application.Name

Source and further reading: http://docs.flatpak.org/en/latest/flatpak-command-reference.html#flatpak-override

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.