FLATPAK-OVERRIDE(1)
π FLATPAK-OVERRIDE π
okay bestie, pull up a chair πͺ because we're talking about flatpak-override β that's section 1 of the manual, the main character of the flatpak override saga π
β¨ NAME β¨
flatpak-override β Override application requirements π
π¦ SYNOPSIS π¦
flatpak override [OPTION...] [APP]
πΈ DESCRIPTION πΈ
so basically? it overrides the application's specified runtime requirements. π Which is the fancy way of saying: this is how you hand a sandboxed app more or less stuff than it asked for. Give it the goods, or take the goods away. Your call, your rules, your sandbox ποΈ
By default, the app gets access to the resources it requested when it's started. That's the "trust the app, it knows what it wants" default. But you β yes you, the icon you are π β can override that:
- On a particular instance β by passing extra arguments to
flatpak run. One-off vibe, just for that run. - Every single time β by using
flatpak override. Permanent, set-it-and-forget-it energy β¨
The application overrides get saved in text files that live in $XDG_DATA_HOME/flatpak/overrides in user mode π (yes, literally text files, you can go look at them, they're not hiding anything, we love transparency π).
If the application ID APP is not specified, then the overrides affect all applications π β global queen behaviour. But (plot twist π«’) the per-application overrides can override the global overrides. So the specific app always wins the argument. Periodt π
β οΈ Heads up bestie: unless you override it with the--useror--installationoptions, this command changes the default system-wide installation. So like, it's not just you β it's everybody. Act accordingly π
more coming, don't go anywhere π«Ά
β¨ OPTIONS β¨
okay so here's the whole menu of things you can pass. all of these are understood by the command, bestie π
-h,--helpβ shows you the help options and dips. that's it, that's the whole job π«Ά-u,--userβ updates a per-user installation. your own little corner of the world, just for you π--systemβ updates the default system-wide installation. the big shared one, everybody's business π--installation=NAMEβ updates a system-wide installation, picked byNAME, from the ones defined in/etc/flatpak/installations.d/. and heads up: using--installation=defaultis literally the same thing as using--system, no cap π--share=SUBSYSTEMβ shares a subsystem with the host session. this overrides theContextsection from the application metadata.SUBSYSTEMhas to be one of:network,ipc. you can use this option multiple times, stack 'em up β¨--unshare=SUBSYSTEMβ the opposite vibe: does NOT share a subsystem with the host session. this overrides theContextsection from the application metadata.SUBSYSTEMmust be one of:network,ipc. also usable multiple times π--share-if=SUBSYSTEM:CONDITIONβ shares a subsystem with the host session conditionally, only when the specified condition is actually met at runtime. this overrides theContextsection from the application metadata.SUBSYSTEMmust be one of:network,ipc.CONDITIONmust be one of:true,false,has-input-device,has-wayland,has-usb-device,has-usb-portal. conditions can be negated with!, like!has-input-device. multiple uses allowed. available since1.17π¦
see the Conditional Permissions section in flatpak-metadata(5) for the whole tea.
--socket=SOCKETβ exposes a well-known socket to the application. this overrides theContextsection from the application metadata.SOCKETmust be one of:x11,wayland,fallback-x11,pulseaudio,system-bus,session-bus,ssh-auth,pcsc,cups,gpg-agent,inherit-wayland-socket. multiple uses, go wild π--nosocket=SOCKETβ does NOT expose a well-known socket to the application. this overrides theContextsection from the application metadata.SOCKETmust be one of:x11,wayland,fallback-x11,pulseaudio,system-bus,session-bus,ssh-auth,pcsc,cups,gpg-agent,inherit-wayland-socket. multiple uses allowed π--socket-if=SOCKET:CONDITIONβ exposes a well-known socket to the application conditionally, only when the specified condition is met at runtime. this overrides theContextsection from the application metadata.SOCKETmust be one of:x11,wayland,fallback-x11,pulseaudio,system-bus,session-bus,ssh-auth,pcsc,cups,gpg-agent,inherit-wayland-socket.CONDITIONmust be one of:true,false,has-input-device,has-wayland,has-usb-device,has-usb-portal. conditions can be negated with!, like!has-wayland. multiple uses allowed. available since1.17β
see the Conditional Permissions section in flatpak-metadata(5) for more details.
--device=DEVICEβ exposes a device to the application. this overrides theContextsection from the application metadata.DEVICEmust be one of:dri,input,usb,kvm,shm,all. multiple uses, bestie π₯--nodevice=DEVICEβ does NOT expose a device to the application. this overrides theContextsection from the application metadata.DEVICEmust be one of:dri,input,usb,kvm,shm,all. multiple uses π--device-if=DEVICE:CONDITIONβ exposes a device to the application conditionally, only when the specified condition is met at runtime. this overrides theContextsection from the application metadata.DEVICEmust be one of:dri,input,usb,kvm,shm,all.CONDITIONmust be one of:true,false,has-input-device,has-wayland,has-usb-device,has-usb-portal. conditions can be negated with!, like!has-input-device. multiple uses allowed. available since1.17πΈ
see the Conditional Permissions section in flatpak-metadata(5) for more details.
--allow=FEATUREβ allows access to a specific feature. this updates the[Context]group in the metadata.FEATUREmust be one of:devel,multiarch,bluetooth,canbus,per-app-dev-shm. multiple uses allowed π§
see flatpak-build-finish(1) for what all these features actually mean.
--disallow=FEATUREβ disallows access to a specific feature. this updates the[Context]group in the metadata.FEATUREmust be one of:devel,multiarch,bluetooth,canbus,per-app-dev-shm. multiple uses allowed π--allow-if=FEATURE:CONDITIONβ allows access to a specific feature conditionally, only when the specified condition is met at runtime. this overrides theContextsection from the application metadata.FEATUREmust be one of:devel,multiarch,bluetooth.CONDITIONmust be one of:true,false,has-input-device,has-wayland,has-usb-device,has-usb-portal. conditions can be negated with!, like!has-input-device. multiple uses allowed. available since1.17β¨
see the Conditional Permissions section in flatpak-metadata(5) for more details.
--filesystem=FILESYSTEMβ lets the application access a subset of the filesystem. this overrides theContextsection from the application metadata.FILESYSTEMcan be one of:home,host,host-os,host-etc,host-root,xdg-desktop,xdg-documents,xdg-download,xdg-music,xdg-pictures,xdg-public-share,xdg-templates,xdg-videos,xdg-run,xdg-config,xdg-cache,xdg-data, an absolute path, or a homedir-relative path like~/diror paths relative to the xdg dirs, likexdg-download/subdir. the optional:rosuffix means the location is read-only. the optional:createsuffix means the location is read-write AND gets created if it doesn't already exist. multiple uses allowed. check the"[Context] filesystems"list inflatpak-metadata(5)for what all these filesystems actually mean π--nofilesystem=FILESYSTEMβ undoes the effect of a previous--filesystem=FILESYSTEMfrom the app's manifest or a lower-precedence layer of overrides, and/or removes a previous--filesystem=FILESYSTEMfrom this layer of overrides. this overrides theContextsection of the application metadata.FILESYSTEMtakes the same values as for--filesystem, but the:roand:createsuffixes are not used here. multiple uses allowed π
lowkey important: this option does NOT block access to a more narrowly-scoped--filesystem. for example, if an application has the equivalent of--filesystem=xdg-config/MyAppin its manifest or as a system-wide override, and you doflatpak override --user --nofilesystem=homeas a per-user override, then it gets blocked from most of the home directory, but it's still allowed to access$XDG_CONFIG_HOME/MyApp. sneaky, right? π
and as a special case: --nofilesystem=host:reset ignores ALL --filesystem permissions inherited from the app manifest or a lower-precedence layer of overrides, on top of doing the --nofilesystem=host thing. full reset energy π
--add-policy=SUBSYSTEM.KEY=VALUEβ adds a generic policy option. for example,"--add-policy=subsystem.key=v1 --add-policy=subsystem.key=v2"would map to this metadata:
[Policy subsystem]
key=v1;v2;
this option can be used multiple times π
--remove-policy=SUBSYSTEM.KEY=VALUEβ removes a generic policy option. this option can be used multiple times π¦--env=VAR=VALUEβ sets an environment variable in the application. this overrides theContextsection from the application metadata. this option can be used multiple times β¨--unset-env=VARβ unsets an environment variable in the application. this overrides theunset-environmententry in the[Context]group of the metadata, and the[Environment]group. this option can be used multiple times π--env-fd=FDβ reads environment variables from the file descriptorFD, and sets them just like--envwould. this is the move when you want to keep environment variables and their values from being visible to other users. privacy slay π
each environment variable is in the form VAR=VALUE followed by a zero byte. this is the same format used by env -0 and /proc/*/environ π₯
--own-name=NAMEβ lets the application own the well-known nameNAMEon the session bus. this overrides theContextsection from the application metadata. multiple uses allowed π--talk-name=NAMEβ lets the application talk to the well-known nameNAMEon the session bus. this overrides theContextsection from the application metadata. multiple uses allowed πΈ--no-talk-name=NAMEβ does NOT let the application talk to the well-known nameNAMEon the session bus. this overrides theContextsection from the application metadata. multiple uses allowed π--system-own-name=NAMEβ lets the application own the well known nameNAMEon the system bus. ifNAMEends with.*, it lets the application own all matching names. this overrides theContextsection from the application metadata. multiple uses allowed π--system-talk-name=NAMEβ lets the application talk to the well known nameNAMEon the system bus. ifNAMEends with.*, it lets the application talk to all matching names. this overrides theContextsection from the application metadata. multiple uses allowed β--system-no-talk-name=NAMEβ does NOT let the application talk to the well known nameNAMEon the system bus. ifNAMEends with.*, it lets the application talk to all matching names. this overrides theContextsection from the application metadata. multiple uses allowed π--persist=FILENAMEβ if the application doesn't have access to the real homedir, this makes the (homedir-relative) pathFILENAMEa bind mount to the corresponding path in the per-application directory, so that location can be used for persistent data. this overrides theContextsection from the application metadata. multiple uses allowed π--resetβ removes overrides. if an APP is given, it removes the overrides for that application; otherwise it removes the global overrides. clean slate, iconic π§--showβ shows overrides. if an APP is given, it shows the overrides for that application; otherwise it shows the global overrides. peek behind the curtain β¨-v,--verboseβ prints debug information while the command is processing. the receipts, basically π--ostree-verboseβ prints OSTree debug information while the command is processing. deeper receipts, for the OSTree girlies π
π EXAMPLES π
okay bestie, real talk β this is the part where it all clicks. three little lines, three big moods π
$ flatpak override --nosocket=wayland org.gnome.gedit
this one's like... "bestie, no wayland for you." we're telling org.gnome.gedit it doesn't get the wayland socket, periodt. just blocking that one doorway and moving on with our lives β¨
$ flatpak override --filesystem=home org.mozilla.Firefox
and HERE'S the iconic one β we're handing org.mozilla.Firefox the keys to your entire home directory. that's a lot of trust, ngl. slay for a browser that genuinely needs it, but be a little discerning about who you give this to π
$ flatpak override --socket-if=x11:!has-wayland org.example.App
Grant X11 socket access only when not running in a Wayland session.
lowkey the most galaxy-brain of the three π§ β¨ conditional sockets!! we're saying: give org.example.App the x11 socket only if it does not have has-wayland. so on Wayland, no X11 for you; on a plain X11 session, come on in. it's giving "i contain multitudes" π
β¨ SEE ALSO β¨
go read these next, they're the whole friend group π«Ά
flatpak(1)β the main character herself, all the generalflatpaklore πflatpak-run(1)β everything about actually running apps, which is what all your overrides are quietly feeding into π¦
and that's the page, bestie!! πΈ this one's from the flatpak crew, section 1 of the manual β FLATPAK OVERRIDE(1), no cap. go forth and override responsibly, mwah π
ππ
π¦ where this page comes from
- fedora 44: flatpak 1.18.4-1.fc44 Β· LGPL-2.1-or-later
- fedora 44: flatpak 1.18.4-1.fc44 Β· LGPL-2.1-or-later
- nixpkgs unstable: flatpak 1.18.4
- ubuntu stonking: flatpak 1.18.4-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms