Bug in Cinnamon

After tinkering with Endeavour Cinnamon, Debian Plasma and also Linux Mint Cinnamon, there appears to be a bug in Cinnamon → found and report itself created with ai (i’m way not tech smart enough and also too lazy to do this on my own, took 3 days WITH ai).
Started with flameshot >= Version 14 not working correctly.

Bug Report: Multiple Qt/KDE integration issues under Cinnamon (Arch-based distributions)

Environment

  • EndeavourOS (current)
  • Linux Mint 22.3 Cinnamon (same behavior)
  • Cinnamon (X11)
  • KDE Frameworks 6
  • KDE Connect 26.04.2
  • Huawei Pura 70 Ultra (EMUI 14.2 / Android 14)

Reference system:

  • Debian Sid + Plasma 6
  • Same phone
  • Same network
  • Everything works correctly.

Summary

Several independent Qt/KDE applications exhibit problems under Cinnamon while working correctly under Plasma.

The issue appears to affect the integration between Cinnamon and Qt/KIO/xdg-desktop-portal rather than KDE Connect itself.


Observed problems

KDE Connect filesystem browsing

The phone pairs successfully.

Connection establishment succeeds.

The SFTP subsystem works.

However, graphical browsing from KDE Connect (and Dolphin) displays an empty directory.


Dolphin

Launching Dolphin under Cinnamon prints:

Could not activate remote peer 'org.freedesktop.portal.Desktop'
Failed to register with host portal

xdg-desktop-portal

graphical-session.target
Active: inactive (dead)
xdg-desktop-portal.service
Dependency failed

Portal startup fails because graphical-session.target is never activated.


Additional affected applications

The following applications also malfunction under Cinnamon but work correctly under Plasma:

  • KDE Connect filesystem browser
  • Flameshot >= 14
  • Forkgram
  • Ayugram

This suggests a general Qt/KDE integration issue.


Terminal diagnostics

SFTP connection succeeds

sftp -P 1739 ...
Connected to phone

The connection itself is valid.


Root directory cannot be listed

sftp> ls
remote readdir("/"): Permission denied

This is expected Android Scoped Storage behavior.


Internal storage is accessible

sftp> cd storage/emulated/0
sftp> ls
Android
DCIM
Download
Movies
Music
Pictures
...

The exported filesystem itself works correctly.


sshfs mount exists

cat /proc/<pid>/mountinfo

shows

fuse.sshfs
kdeconnect@192.168.x.x:/

indicating that the FUSE mount succeeds.


Mountpoint cannot be listed

ls /run/user/.../UUID

returns

Permission denied

despite

drwxr-xr-x

permissions.


graphical-session.target

systemctl --user status graphical-session.target

returns

Active: inactive (dead)

during an active Cinnamon session.


xdg-desktop-portal

systemctl --user status xdg-desktop-portal.service

returns

Dependency failed

because

Requisite=graphical-session.target

cannot be satisfied.


graphical-session.target cannot be started manually

systemctl --user start graphical-session.target

returns

Operation refused
RefuseManualStart=yes

indicating that the desktop session should activate this target automatically, but does not.


Portal startup fails repeatedly

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

always results in

Dependency failed

KIO sees KDE Connect devices

kioclient5 ls kdeconnect:/

returns

Meins
HBP-LX9

meaning the KIO slave itself works.

However, opening the device results in an empty directory instead of the phone storage.


Comparison

Component Cinnamon Plasma
KDE Connect pairing OK OK
SSH connection OK OK
SFTP OK OK
Manual access to /storage/emulated/0 OK OK
KDE Connect GUI browser Broken OK
Dolphin browsing Broken OK
Flameshot >=14 Broken OK
Forkgram Broken OK
Ayugram Broken OK
xdg-desktop-portal Broken OK

Expected behavior

Qt/KDE applications should function identically under Cinnamon and Plasma.

The KDE Connect filesystem browser should automatically enter the exported storage directory and display the phone contents.


Actual behavior

Under Cinnamon, multiple Qt/KDE applications fail or behave incorrectly while all tested functionality works correctly under Plasma on the same hardware.

The evidence suggests a missing or broken Cinnamon integration with Qt6/KIO/xdg-desktop-portal rather than a KDE Connect transport issue.

It’s almost certainly a xdg-dektop-portal bug that is affecting other DEs. See this topic on the Arch Linux forum that includes a solution that works for me on Xfce - https://bbs.archlinux.org/viewtopic.php?pid=2300839#p2300839

Stop xdg-desktop-portal.service first with:

systemctl --user stop xdg-desktop-portal.service

Create an empty file called “xdg-desktop-portal.service” in /home/yourusername/.config/systemd/user (you might need to create the systemd and user folders)

In this file add this text from the Arch forum post I linked to above :up_arrow:

[Unit]
Description=Portal service
PartOf=graphical-session.target
#Requisite=graphical-session.target   # removed = workaround
Requires=dbus.service
After=dbus.service graphical-session-pre.target

[Service]
Type=dbus
BusName=org.freedesktop.portal.Desktop
ExecStart=/usr/lib/xdg-desktop-portal
Slice=session.slice

Save and exit the file, then restart xdg-desktop-portal.service with:

systemctl --user start xdg-desktop-portal.service

Try running this again and check the output:

systemctl --user status xdg-desktop-portal.service

That’s definitely cleaner way of doing this. I’ve made them into easy copy paste steps, for future me.

systemctl --user stop xdg-desktop-portal.service
mkdir -p ~/.config/systemd/user
printf '[Unit]\nDescription=Portal service\nPartOf=graphical-session.target\n#Requisite=graphical-session.target\nRequires=dbus.service\nAfter=dbus.service graphical-session-pre.target\n\n[Service]\nType=dbus\nBusName=org.freedesktop.portal.Desktop\nExecStart=/usr/lib/xdg-desktop-portal\nSlice=session.slice\n' > ~/.config/systemd/user/xdg-desktop-portal.service
systemctl --user daemon-reload
systemctl --user start xdg-desktop-portal.service
systemctl --user status xdg-desktop-portal.service

And then I run this, afterwards, to fix dark mode:

gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'

And then I suppose you could add this Pacman hook, to keep it alive in the event stuff gets updated (and thus reset):

printf '[Trigger]\nOperation=Upgrade\nType=Package\nTarget=xdg-desktop-portal\n\n[Action]\nDescription=Reapply xdg-desktop-portal graphical-session fix\nWhen=PostTransaction\nExec=/bin/sh -c "grep -v Requisite /usr/lib/systemd/user/xdg-desktop-portal.service > /home/v/.config/systemd/user/xdg-desktop-portal.service && systemctl --user daemon-reload"\n' | sudo tee /etc/pacman.d/hooks/xdg-portal-fix.hook

Happy it works for you :+1:

It may be fixed in Arch at some point (it already has been in Sway), and also fixed upstream in xdg-desktop-portal - https://github.com/flatpak/xdg-desktop-portal/issues/1983 (log thread alert so scroll to the bottom for the latest). So if you are using a pacman hook, you need to watch out for updates with the fix already applied.

Oh, that’s good to know. I’ll refrain from adding the hook option. Thank you for spreading the good word! :slight_smile:

Flameshot configuration: scroll a bit down and choose “Use Legacy X11” (Deprecated)