On 4/3/25 3:31 PM, blu.256 via tde-devels wrote:
It looks like your Firefox is configured for portals
and xdg-desktop-portal-tde probably installed correctly.
I assume you are running a full TDE session, since the TDE portal will only automatically
start within it.
Getting xdg-desktop-portal to work can be a little tricky and there is always a
probability of a bug, so if you're OK with a little bit of debugging, you can run the
xdg-desktop-portal in verbose mode and mail me the log, or even better post it as an issue
in TGW mentioning the distribution.
How to do it:
```
$ killall xdg-desktop-portal
$ /path/to/xdg-desktop-portal -v
I don't know the root cause yet, but I have more information to share.
With some reflection, I realized Firefox is launching the KDE file
picker portal and not the generic Qt. I was fooled by this because the
dialog was opening with all of the generic flat icons and did not look
like the normal KDE file picker I had configured in my KDE environment.
The xdg-desktop-portal-tde.desktop is installed in
/opt/trinity/share/applications rather than
/opt/trinity/share/applications/tde like all other TDE desktop files.
The org.freedesktop.impl.portal.desktop.tde.service file is installed in
/usr/share/dbus-1/services, the same place as
org.freedesktop.impl.portal.desktop.kde.service.
The tde.portal file is installed in
/usr/share/xdg-desktop-portal/portals, the same as the kde.portal file.
The tde.portal file has UseIn=Trinity where the kde.portal has UseIn=KDE.
I do not think 'Trinity' is a valid XDG reference and the key should be
UseIn=TDE. The sources show UseIn=Trinity and should be patched to
UseIn=TDE. Refer to
https://specifications.freedesktop.org/menu-spec/latest/onlyshowin-registry….
I changed UseIn=Trinity to UseIn=TDE. Initially that did not seem to do
anything because when I launched Firefox the KDE portal launched. More
on that change later.
Next I moved xdg-desktop-portal-tde.desktop to
/opt/trinity/share/applications/tde/. Moving the file made no difference.
I terminated Firefox and killed all portal processes each time.
Next I killed the portal processes while leaving Firefox running. I
launched /usr/libexec/xdg-desktop-portal --verbose. The output spew
showed that xdg-desktop-portal had selected the TDE portal for the file
picker ("Using tde.portal for org.freedesktop.impl.portal.FileChooser in
TDE"). The process list showed both the KDE and TDE portals. I tried to
use Firefox File-->Open and the TDE file picker dialog opened.
I closed Firefox and killed the portal processes. I launched Firefox and
again killed the portal processes. I manually launched
/usr/libexec/xdg-desktop-portal but not verbose. I launched Firefox and
again the TDE file picker opened.
I closed Firefox and killed the portal processes. I manually launched
/usr/libexec/xdg-desktop-portal without verbose and as a background
process. The process list showed both the KDE and TDE portals. I
launched Firefox and the TDE file picker dialog was used.
I created a $TDEHOME/Autostart desktop file to force launch
/usr/libexec/xdg-desktop-portal. After starting my TDE session, the
process list showed the TDE portal. Again Firefox used the TDE file picker.
Seems when xdg-desktop-portal is manually launched before launching
Firefox then everything behaves as expected. Having Firefox launch
xdg-desktop-portal fails to call the TDE portal.
I removed the temporary autostart file. Although Firefox had
widget.use-xdg-desktop-portal.file-picker=1, just to be sure, I toggled
all other widget.use-xdg-desktop-portal.* options to 1. I then renamed
kde.portal to kde.portal.bak. I logged out and restarted TDE. I verified
no portal processes. I launched Firefox and saw that there was no kde
portal process and the tde portal process was running. Firefox then used
the TDE file picker.
Some more trial-and-error testing indicates UseIn=TDE does need to
change in the sources.
Although the TDE portal will launch manually and everything behaves,
seems KDE is receiving priority over TDE when both portals are
available. I don't know where the mixup might be. Could be me. Could be
Slackware. Could be TDE. Could be something else. I think the TDE portal
package is fine. One way or another something is awry.
I hope the information helps. Any feedback is welcomed. :)