.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "PORTALS.CONF" 5 "" "" "File Formats Manual" .SH NAME portals.conf \- XDG desktop portal configuration .SH SYNOPSIS .sp \fI$XDG_CONFIG_HOME/xdg\-desktop\-portal/{*\-}portals.conf\fP .sp \fI$XDG_CONFIG_DIRS/xdg\-desktop\-portal/{*\-}portals.conf\fP .sp \fI/etc/xdg\-desktop\-portal/{*\-}portals.conf\fP .sp \fI$XDG_DATA_HOME/xdg\-desktop\-portal/{*\-}portals.conf\fP .sp \fI$XDG_DATA_DIRS/xdg\-desktop\-portal/{*\-}portals.conf\fP .sp \fI/usr/share/xdg\-desktop\-portal/{*\-}portals.conf\fP .SH DESCRIPTION .sp xdg\-desktop\-portal uses a configuration file to determine which portal backend should be used to provide the implementation for the requested interface. This mechanism is very similar to the freedesktop.org specification for \(dqAssociation between MIME types and applications\(dq (mime\-apps). .sp Desktop environments and OS vendors should provide a default configuration for their chosen portal backends in \fB/usr/share/xdg\-desktop\-portal/DESKTOP\-portals.conf\fP, where \fBDESKTOP\fP is the desktop environment name as it would appear in the \fBXDG_CURRENT_DESKTOP\fP environment variable, after case\-folding ASCII upper case to lower case. For example, KDE should provide \fB/usr/share/xdg\-desktop\-portal/kde\-portals.conf\fP\&. .sp Users can override those defaults, or provide configuration for an otherwise unsupported desktop environment, by writing a file \fB~/.config/xdg\-desktop\-portal/portals.conf\fP\&. Users of more than one desktop environment can use desktop\-specific filenames such as \fBkde\-portals.conf\fP which will only be used in the appropriate desktop environment. .sp Similarly, system administrators can provide a default configuration for all users in \fB/etc/xdg\-desktop\-portal/DESKTOP\-portals.conf\fP or \fB/etc/xdg\-desktop\-portal/portals.conf\fP\&. .sp The following locations are searched for configuration, highest precedence first: .INDENT 0.0 .IP \(bu 2 \fB$XDG_CONFIG_HOME\fP, defaulting to \fB~/.config\fP .IP \(bu 2 each directory in \fB$XDG_CONFIG_DIRS\fP, defaulting to \fB/etc/xdg\fP .IP \(bu 2 the build\-time \fBsysconfdir\fP for xdg\-desktop\-portal, usually \fB/etc\fP .IP \(bu 2 \fB$XDG_DATA_HOME\fP, defaulting to \fB~/.local/share\fP (searched only for consistency with other specifications, writing configuration here is not recommended) .IP \(bu 2 each directory in \fB$XDG_DATA_DIRS\fP, defaulting to \fB/usr/local/share:/usr/share\fP .IP \(bu 2 the build\-time \fBdatadir\fP for xdg\-desktop\-portal, usually \fB/usr/share\fP .UNINDENT .sp In each of those locations, for each desktop environment name listed in the \fBXDG_CURRENT_DESKTOP\fP environment variable, xdg\-desktop\-portal checks for \fBxdg\-desktop\-portal/DESKTOP\-portals.conf\fP, where \fBDESKTOP\fP is the desktop environment name in lower\-case. If a desktop\-environment\-specific configuration file is not found, a non\-desktop\-specific file \fBxdg\-desktop\-portal/portals.conf\fP will be read. For example, if \fBXDG_CURRENT_DESKTOP\fP is set to \fBBudgie:GNOME\fP, then xdg\-desktop\-portal will look for \fBxdg\-desktop\-portal/budgie\-portals.conf\fP, \fBxdg\-desktop\-portal/gnome\-portals.conf\fP and \fBxdg\-desktop\-portal/portals.conf\fP in that order. .sp Only the first configuration file found is read, and lower\-precedence configuration files are ignored. All possible configuration files within one directory are tried before moving on to the next directory, so for example \fB~/.config/xdg\-desktop\-portal/portals.conf\fP is higher\-precedence than \fB/usr/share/xdg\-desktop\-portal/kde\-portals.conf\fP\&. .SS FILE FORMAT .sp The format of the portals configuration file is the same \fB\&.ini\fP format used by systemd unit files or application desktop files. .sp \fB[preferred]\fP .INDENT 0.0 .INDENT 3.5 The main configuration group for preferred portals. .UNINDENT .UNINDENT .sp The following keys can be present in the \fBpreferred\fP group: .sp \fBdefault\fP \fI(string)\fP .INDENT 0.0 .INDENT 3.5 The default portal backend to use for every interface, unless the interface is listed explicitly. .UNINDENT .UNINDENT .sp \fBorg.freedesktop.impl.portal.*\fP \fI(string)\fP .INDENT 0.0 .INDENT 3.5 One of the valid portal interface implementations exposed by xdg\-desktop\-portal. .UNINDENT .UNINDENT .sp Each key in the group contains a semi\-colon separated list of portal backend implementation, to be searched for an implementation of the requested interface, in the same order as specified in the configuration file. Additionally, the special values \fBnone\fP and \fB*\fP can be used: .sp \fBnone\fP .INDENT 0.0 .INDENT 3.5 Do not provide a portal implementation for this interface. .UNINDENT .UNINDENT .sp \fB*\fP .INDENT 0.0 .INDENT 3.5 Use the first portal implementation found, in lexicographical order. .UNINDENT .UNINDENT .SS EXAMPLE .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C [preferred] # Use xdg\-desktop\-portal\-gtk for every portal interface... default=gtk # ... except for the Screencast interface org.freedesktop.impl.portal.Screencast=gnome .ft P .fi .UNINDENT .UNINDENT .SS ENVIRONMENT .sp \fBXDG_CURRENT_DESKTOP\fP .INDENT 0.0 .INDENT 3.5 A colon\-separated list of desktop environments, most specific first, used to choose a desktop\-specific portal configuration. The default is an empty list. .UNINDENT .UNINDENT .sp \fBXDG_CONFIG_HOME\fP .INDENT 0.0 .INDENT 3.5 The per\-user \fBportals.conf\fP file is located in this directory. The default is \fB$HOME/.config\fP\&. .UNINDENT .UNINDENT .sp \fBXDG_CONFIG_DIRS\fP .INDENT 0.0 .INDENT 3.5 A colon\-separated list of system configuration directories and secondary per\-user configuration directories. The default is \fB/etc/xdg\fP\&. .UNINDENT .UNINDENT .sp \fBXDG_DATA_HOME\fP .INDENT 0.0 .INDENT 3.5 A per\-user data directory, searched for consistency with other specifications. The default is \fB$HOME/.local/share\fP\&. .UNINDENT .UNINDENT .sp \fBXDG_DATA_DIRS\fP .INDENT 0.0 .INDENT 3.5 A colon\-separated list of system data directories and secondary per\-user data directories. The default is \fB/usr/local/share:/usr/share\fP\&. .UNINDENT .UNINDENT .SS SEE ALSO .INDENT 0.0 .IP \(bu 2 \fI\%XDG Base Directory Specification\fP .IP \(bu 2 \fI\%XDG Desktop Entry specification\fP .IP \(bu 2 \fI\%XDG Association between MIME type and applications specification\fP .UNINDENT .\" Generated by docutils manpage writer. .