Manjaro Update 2023-12-01 and the XFCE Desktop

Yesterday I updated my Manjaro Linux host and ran into a problem (it likely started already with update 2023-11-28). At boot, after I logged in, the desktop background would not change to my chosen picture and no desktop icons would appear. Also, when clicking the file browser, it wouldn’t open. After nearly 30 seconds the desktop background changes and the icons appear. Also, the file browser opens.

My Linux computer uses XFCE, a modern, lightweight desktop environment. It’s been a stable companion for many years (unlike Gnome), together with my other favorite desktop – Mate – which I run on my other Linux computers.

Most of the text below is from my post on the Manjaro forum, and I still hope to get an answer to my questions.

Examining the logs

I went through the logs, first the system log, then the user log. The system log didn’t reveal anything unusual, which I kind of expected as the system booted normal up until the login.

So I focused on the user log. Here the output of journalctl -b --user

...
Dec 02 12:20:41 woody systemd[2146]: Started flatpak document portal service.
Dec 02 12:20:41 woody xdg-desktop-por[2388]: Choosing gtk.portal for org.freedesktop.impl.portal.Lockdown as a last-resort fallback
Dec 02 12:20:41 woody xdg-desktop-por[2388]: The preferred method to match portal implementations to desktop environments is to use the portals.conf(5) configuration file
Dec 02 12:20:41 woody dbus-daemon[2161]: [session uid=1000 pid=2161] Activating via systemd: service name='org.freedesktop.impl.portal.desktop.gtk' unit='xdg-desktop-portal-gtk.service' requested by ':1.38' (uid=1000 pid=2388 comm="/usr/lib/xdg-desktop-portal")
Dec 02 12:20:41 woody systemd[2146]: Starting Portal service (GTK/GNOME implementation)...
...
Dec 02 12:20:41 woody systemd[2146]: Started Portal service (GTK/GNOME implementation).
Dec 02 12:20:41 woody xdg-desktop-por[2388]: No skeleton to export
Dec 02 12:20:41 woody xdg-desktop-por[2388]: Choosing gtk.portal for org.freedesktop.impl.portal.FileChooser as a last-resort fallback
Dec 02 12:20:41 woody xdg-desktop-por[2388]: Choosing gtk.portal for org.freedesktop.impl.portal.AppChooser as a last-resort fallback
Dec 02 12:20:41 woody xdg-desktop-por[2388]: Choosing gtk.portal for org.freedesktop.impl.portal.Print as a last-resort fallback
Dec 02 12:20:41 woody xdg-desktop-por[2388]: Choosing gtk.portal for org.freedesktop.impl.portal.Notification as a last-resort fallback
Dec 02 12:20:41 woody xdg-desktop-por[2388]: Choosing gtk.portal for org.freedesktop.impl.portal.Inhibit as a last-resort fallback
Dec 02 12:20:41 woody xdg-desktop-por[2388]: Choosing gtk.portal for org.freedesktop.impl.portal.Access as a last-resort fallback
Dec 02 12:20:41 woody systemd[2146]: Started PipeWire Multimedia Service.
Dec 02 12:20:41 woody xdg-desktop-por[2388]: Choosing gtk.portal for org.freedesktop.impl.portal.Account as a last-resort fallback
Dec 02 12:20:41 woody xdg-desktop-por[2388]: Choosing gtk.portal for org.freedesktop.impl.portal.Email as a last-resort fallback
Dec 02 12:20:41 woody xdg-desktop-por[2388]: Choosing gtk.portal for org.freedesktop.impl.portal.DynamicLauncher as a last-resort fallback
Dec 02 12:20:41 woody dbus-daemon[2161]: [session uid=1000 pid=2161] Successfully activated service 'org.freedesktop.portal.Desktop'
Dec 02 12:20:41 woody systemd[2146]: Started Portal service.
...
Dec 02 12:20:42 woody systemd[2146]: Started Sound Service.
Dec 02 12:21:06 woody dbus-daemon[2161]: [session uid=1000 pid=2161] Activating via systemd: service name='org.gtk.vfs.Metadata' unit='gvfs-metadata.service' requested by ':1.18' (uid=1000 pid=2274 comm="xfdesktop")
...

The above log pointed to the problem:

Dec 02 12:20:41 woody xdg-desktop-por[2388]: The preferred method to match portal implementations to desktop environments is to use the portals.conf(5) configuration file

as well as:

Dec 02 12:20:41 woody xdg-desktop-por[2388]: No skeleton to export
Dec 02 12:20:41 woody xdg-desktop-por[2388]: Choosing gtk.portal for org.freedesktop.impl.portal.FileChooser as a last-resort fallback

Searching for “portals.conf”

As mentioned above, my desktop environment is XFCE.

[user@home ~]$ echo $XDG_CURRENT_DESKTOP
XFCE

Next thing I did was to read the man page for portals.conf(5). From the portals.conf man page:

Desktop environments and OS vendors should provide a default configuration for their chosen portal backends in /usr/share/xdg-desktop-portal/DESKTOP-portals.conf, where DESKTOP is the desktop environment name as it would appear in the XDG_CURRENT_DESKTOP environment variable, after case-folding ASCII upper case to lower case.

man portals.conf

According to that man page, every desktop environment should include a portals.conf file named after the desktop environment name in lower case. In my case (XFCE) it is to be called xfce-portals.conf.

The portals.conf man page lists the locations of where the system looks for the portals.conf file. So I searched for xfce-portals.conf in all locations, without success.

Problem

It seems that XFCE doesn’t install the xfce-portals.conf file which is now required. See the bug report / discussion over at Debian: Bug#1050802: xfce4-session: please provide an xfce-portals.conf for xdg-desktop-portal.

For a detailed explanation as to why the -portals.conf is needed, see: MBF: adding portals.conf(5) to desktop environments. Here a quote from above email:

In Debian 12, if xdg-desktop-portal does not find a suitable backend for the current desktop environment, it would fall back to trying any backend. This meant that all backends needed to be prepared to run in an environment where their functionality cannot actually work, which is rarely tested, leading to undesired situations where a desktop environment’s backend can cause bugs (such as crashes or slow application startup) while running different desktop environments.

Further down it reads:

In a future version of xdg-desktop-portal, installing a portals.conf(5) file is likely to become a requirement for desktop environments that want to have working portal interfaces. For the moment, there is some backwards-compatibility to keep existing desktop environments mostly working (see below).

My machine does not include a xfce-portals.conf file, neither under ~/.config, nor under /usr/share/xdg-desktop-portal/ or any other folder.

Temporary solution?

Update December 4, 2023: Fellow Manjaro forum user CrackalackingZ posted a more detailed explanation and temporary solution on the Manjaro forum. There is a long and ongoing discussion on that topic by developers of different desktops, so it’s not only a XFCE thing. For now, the XFCE developers promote a xfce-portals.conf file that uses both the xdg-desktop-portal-gtk and xdg-desktop-portal-xapp for different tasks. The file is part of the xfce4-session package, which is why I’m surprised that it wasn’t installed with the update.

First make sure you have the following packages installed:

  • xdg-desktop-portal
  • xdg-desktop-portal-gtk
  • xdg-desktop-portal-xapp

Copy the /usr/share/xdg-desktop-portal/gtk-portals.conf file into ~/.config and rename it to xfce-portals.conf. Edit the ~/.config/xfce-portals.conf as follows:

[preferred]
default=gtk;
org.freedesktop.impl.portal.Wallpaper=xapp;gtk;
org.freedesktop.impl.portal.Screenshot=xapp;gtk;

Once you saved the ~/.config/xfce-portals.conf file, restart the services as follows:

systemctl --user restart xdg-desktop-portal.service xdg-desktop-portal-gtk.service xdg-desktop-portal-xapp.service

The above solution seems to solve the issue with the delay after login, for now. Please USE WITH CAUTION !

Note: Once the maintainers include the xfce-portals.conf file in the xfce4-session package, there is no need for the local ~/.config/xfce-portals.conf file. Check with the next update of xfce4-session to see if there is a /usr/share/xdg-desktop-portal/xfce-portals.conf file included. If yes, you can delete your local xfce-portals.conf file, else it will override any configuration provided by the developers/maintainers.

I posted this problem on the Manjaro forum and I hope the distribution maintainers fix it soon.

Edit: The gtk-portals.conf file in /usr/share/xdg-desktop-portal/gtk-portals.conf is provided by the xdg-desktop-portal-gtk package, a gtk backend for xdg-desktop-portal. The XDG desktop portal is a portal frontend service for Flatpak and other desktop containment frameworks.

The XDG Desktop Portal git site lists the available backends:

It suggests Xapp for use with Xfce, but Xapp doesn’t support all applications or situations. In most cases, gtk will be the better option. The <desktop>-portals.conf file gives you the option to define different backends for different tasks.

One of the best sources of information is the Arch Linux XDG Desktop Portal wiki page.

Summary

There are discussions among the desktop (DE) developers/maintainers on who should take responsibility and how and to what extend each DE should implement the required tasks such as file-chooser, screen capture, wallpaper, etc. This means that you can expect future changes and surprises (bugs).

The official solution must come via an update from the maintainers of your distribution, in my case Manjaro. It will probably include a xfce-portals.conf file in /usr/share/xdg-desktop-portal/xfce-portals.conf.

Author: Heiko Sieger

The day has 24 hours. If that isn't enough, I also use the night.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.