awesome: add DesktopNames and xdg-desktop-portal config support under… - #62480
Open
ramos wants to merge 1 commit into
Open
awesome: add DesktopNames and xdg-desktop-portal config support under…#62480ramos wants to merge 1 commit into
ramos wants to merge 1 commit into
Conversation
… awesomewm.
Portals depend on =XDG_CURRENT_DESKTOP= being
set, via =DesktopNames=, and on a portals preference file. This commit
includes the changes:
1. New patch =patches/awesome-desktop-names.patch= — adds =DesktopNames=awesome;= to the source's =awesome.desktop= (installed to =/usr/share/xsessions/=).
2. New file =files/awesome-portals.conf=:
#+begin_src ini
[preferred]
default=gtk;
#+end_src
3. New function in =template=:
#+begin_src bash
post_install() {
vmkdir usr/share/xdg-desktop-portal
vinstall ${FILESDIR}/awesome-portals.conf 644 usr/share/xdg-desktop-portal
}
#+end_src
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… awesomewm.
awesome: add DesktopNames and xdg-desktop-portal config
awesome does not currently set DesktopNames in its xsessions .desktop
entry, so XDG_CURRENT_DESKTOP is never set in the session. As a result,
xdg-desktop-portal finds no portal configuration for the session and
flatpak applications cannot use portals (OpenURI, FileChooser, etc.),
which breaks e.g. opening links from sandboxed applications.
This commit:
adds DesktopNames=awesome; to awesome.desktop (patch), so
XDG_CURRENT_DESKTOP=awesome is set at login;
ships /usr/share/xdg-desktop-portal/awesome-portals.conf
(post_install + files/), selecting xdg-desktop-portal-gtk as the
default backend:
Testing:
xdg-open inside a flatpak sandbox opens URLs on the host as expected.
Note for users: the D-Bus session bus must receive the session
environment for portal backends to start (on setups where the bus is
started before X, e.g. dbus-update-activation-environment --all at
session start). This is session configuration, outside the scope of
this change.
Testing the changes