You are not logged in.
After doing `pacman -Syu` today, double-clicking a file in KDE Dolphin no longer opens it with its default MIME application. Instead, an empty application selection window pops up, and I could not find any "mimeapps.*" under my home folder.
So I started up "/usr/lib/xdg-desktop-portal -rv" and tried to assign okular to open up a PDF file, and it says:
XDP: Assigning app ID "/usr/bin/okular" to pid 37922 which has unit "app-\x2fusr\x2fbin\x2fokular@e94b2dcea12f4894aed16c57517d142a.service"
And if I check "Remember application association for all files of type 'PDF document' (application/pdf)", it will prompt:
XDP: Assigning app ID "okular-4" to pid 38588 which has unit "app-okular\x2d4@0d2aafcbe0f246d593ab4ae574322e4e.service"
Then the file ~/.config/mimeapps.list is created with following entry, but will still give me the empty app selection window if I try to open the same file:
(the suffix number will increase by 1 every time I do this, e.g. it shall assign "okular-5" next time)
[Added Associations]
application/pdf=okular-4.desktop;
[Default Applications]
application/pdf=okular-4.desktop;
However, Dolphin works perfectly fine on Plasma 6, and Thunar doesn't have this problem on Hyprland.
I wonder if xdg-desktop-portal has anything to do with it.
The KDE portal seems loaded properly with config ~/.config/xdg-desktop-portal/hyprland-portals.conf
[preferred]
default=hyprland;gtk
org.freedesktop.impl.portal.FileChooser=kde
org.freedesktop.impl.portal.AppChooser=kde
with the following log
XDP: Found 'kde' in configuration for org.freedesktop.impl.portal.FileChooser
XDP: Using kde.portal for org.freedesktop.impl.portal.FileChooser (config)
XDP: providing portal org.freedesktop.portal.FileChooser
XDP: Found 'kde' in configuration for org.freedesktop.impl.portal.AppChooser
XDP: Using kde.portal for org.freedesktop.impl.portal.AppChooser (config)
XDP: providing portal org.freedesktop.portal.OpenURI
Any ideas where I should look at? Thanks.
Last edited by fhftsai256 (2024-04-27 21:50:48)
Offline
I can confirm that! ALL filetype/mime-associations within Dolphin were lost since this morning's updates (on AwesomeWM/X11). Everything was working fine yesterday evening. I'm still investigating...
Offline
Also, the 'Default applications' and 'file associations' from the KDE System Settings are lost.
The only apps I upgraded today were: argyllcms, element-web, element-desktop, lib32-gnutls, python-mako. Nene of those shouldn't have anything to do with KDE, but I downgraded them anyway and rebooted. NO luck. WTF.
Offline
Install archlinux-xdg-menu and run
XDG_MENU_PREFIX=arch- kbuildsycoca6
Online
Maybe the following issue which occured only recently is somehow related. First I observed that it was no longer possible to open a file via nnn or lf file managers. Instead of opening the file the system produces another file called "test.--version" in the current directory and starts eating up the whole RAM until it eventually freezes.
I further investigated the issue and found out that there is not a single "mimeapps.list" file present on the system and that the command
xdg-mime query filetype FILE
seems to cause the problem.
Furthermore it is worth noting that this issue only occurs when using a window manager (dwm, herbstluftwm) and not when using a desktop environment (XFCE, Gnome). But even in a Gnome session I get the error
No session bus: Error spawning command line “dbus-launch --autolaunch=51ce5834b2b147db829bedfc2204a633 --binary-syntax --close-stderr”: Child process exited with code 1
when I execute the command "/usr/lib/xdg-desktop-portal -rv".
Offline
kbuildsycoca6 complained the file "applications.menu" is missing from /etc/xdg/menus, and then I realized the file had been renamed to "plasma-applications.menu." Therefore, to work around the pain point:
sudo ln -s /etc/xdg/menus/plasma-applications.menu /etc/xdg/menus/applications.menu
I'm not comfortable with this hack. Apparently, the solution from @arojas makes the most sense to me so far, based on this wiki page:
https://wiki.archlinux.org/title/Xdg-menu
Last edited by fhftsai256 (2024-04-27 21:37:08)
Offline
Well, it seems that my issue is not related to this thread. I will consider opening another thread.
Offline
Instead of creating a link, I inserted the following lines on '$HOME/.config/hypr/hyprland.conf':
# File association in dolphin.
env = XDG_MENU_PREFIX,plasma-
rebooted, and everything works again.
Though it may help.
Offline
Instead of creating a link, I inserted the following lines on '$HOME/.config/hypr/hyprland.conf':
# File association in dolphin. env = XDG_MENU_PREFIX,plasma-
rebooted, and everything works again.
Though it may help.
This is so elegant that my tears burst out. Thank you very much.
Offline
Thank you guys for figuring this out! I've been afk for some days so I couldn't investigate this myself.
So, for startx/bash users, it is
export XDG_MENU_PREFIX=plasma-
in the .xinitrc
That just leaves a question about why the KDE developers chose to mess with the XDG specification like that?
Offline
That just leaves a question about why the KDE developers chose to mess with the XDG specification like that?
Quite the opposite: KDE is now following the specification strictly.
Online
Install archlinux-xdg-menu and run
XDG_MENU_PREFIX=arch- kbuildsycoca6
I also recently ran into this problem after a pacman -Syu. Quoted "fixed" the problem, but not completely. I use Dolphin on sftp a lot, and previously it would open files with sftp:// links (for example in Kwrite). Now it's downloading the file locally to ~/.cache/kioexec and opening the copy.
Offline
All fixes involving kbuildsycoca6 have only worked temporarily for me, until I try to change the default app for a given file type to be specific. I'm not sure this topic is "solved" yet, but that is for the OP to decide I believe.
I had dolphin on my system and in the process of troubleshooting I also installed kf5, kf6 and xdg-desktop-portal-kde for good measure. Here's my ~/.config/xdg-desktop-portal/hyprland-portals.conf:
[preferred]
# use xdg-desktop-portal-gtk for every portal interface
default=shana;hyprland;gnome;kde
# except for the xdg-desktop-portal-wlr supplied interfaces
org.freedesktop.impl.portal.Screencast=hyprland
org.freedesktop.impl.portal.Screenshot=hyprland
Offline
All fixes involving kbuildsycoca6 have only worked temporarily for me, until I try to change the default app for a given file type to be specific. I'm not sure this topic is "solved" yet, but that is for the OP to decide I believe.
You need to set the XDG_MENU_PREFIX env variable permanently, for your full session.
Online
Well the menus broke again with qt6-base update, albeit temporarily. Although XDG_MENU_PREFIX was set, it seems that I need to run kbuildsycoca6 every time there's a qt6/kde6-related update. Need to add that to my startup scripts...
Offline
For those that are using different locales (LC_MESSAGES in particular), you have to run kbuildsycoca6 with the correct LC_MESSAGES, the one you are running dolphin in.
for context: Basically I have my shell on a different language as the rest of my system for aesthetic reasons. CJK characters just don't look right among monospace latin script
Offline
I'm starting to think that @fhftsai256's 'hack'
sudo ln -s /etc/xdg/menus/plasma-applications.menu /etc/xdg/menus/applications.menu
may still be a better solution in the long run. Kbuildsycoca6 keeps arbitrarily stopping without any apparent reason and consequently losing the menus, forcing me to restart it manually.
Offline
I understand this is marked as solved, but it wasn't clear for me what the solution was. Nonetheless, the following worked for me, so I thought I might add to this thread:
https://www.reddit.com/r/kde/comments/1 … t/l1jinyf/
Last edited by Trvzn (2024-05-13 14:39:06)
Offline