Skip to content

awesome: add DesktopNames and xdg-desktop-portal config support under… - #62480

Open
ramos wants to merge 1 commit into
void-linux:masterfrom
ramos:awesome-portals
Open

awesome: add DesktopNames and xdg-desktop-portal config support under…#62480
ramos wants to merge 1 commit into
void-linux:masterfrom
ramos:awesome-portals

Conversation

@ramos

@ramos ramos commented Sep 11, 2026

Copy link
Copy Markdown

… 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:

    [preferred]
    default=gtk;
    

Testing:

  • built with ./xbps-src pkg awesome and installed from hostdir/binpkgs
  • after re-login, xdg-desktop-portal loads gtk.portal for awesome and
    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

  • I tested the changes in this PR: YES

… 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant