Created attachment 185545 [details] application-menu-after-edit SUMMARY I’m trying to override a global/system Desktop Entry in KDE, but my user-level changes in ~/.local/share/applications/ aren’t reflected in the KDE application launcher menu. I made the same change on another system where it works flawlessly, so I’m a bit puzzled why it doesn’t on this machine. STEPS TO REPRODUCE 1. Edited the desktop file with: $ desktop-file-install --dir="$HOME/.local/share/applications" \ --set-key=Exec \desktop-file-install --dir="$HOME/.local/share/applications" \ --set-key=Exec \ --set-value="/opt/google/chrome/google-chrome --disable-features=GlobalShortcutsPortal %U" \ /usr/share/applications/google-chrome.desktop 2. The expected diff is: $ diff /usr/share/applications/google-chrome.desktop ~/.local/share/applications/google-chrome.desktop 108c108 < Exec=/usr/bin/google-chrome-stable %U --- > Exec=/opt/google/chrome/google-chrome --disable-features=GlobalShortcutsPortal %U 115a116 > X-Desktop-File-Install-Version=0.28 OBSERVED RESULT The change of the desktop file is not picked up in the KDE Application Launcher. <see attachment> EXPECTED RESULT The change of the desktop file should be picked up in the KDE Application Launcher. WHAT I'VE TRIED (unsuccessful) * Deleting ~/.cache/ksycoca5* and running kbuildsycoca5 --noincremental * Doing the same with kbuildsycoca6 * Running update-desktop-database ~/.local/share/applications Interestingly, if I rename the desktop entry to ~/.local/share/applications/google-chrome-test.desktop, the KDE menu updates correctly but obviously shows a duplicated entry. This suggests the issue might be related to desktop file precedence? RELATED ENV VARS XDG_DATA_DIRS=/home/matthias/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20251002 KDE Plasma Version: 6.4.5 KDE Frameworks Version: 6.18.0 Qt Version: 6.9.2 Kernel Version: 6.17.0-1-default (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 PRO 7840U w/ Radeon 780M Graphics Memory: 32 GiB of RAM (29.0 GiB usable) Graphics Processor: AMD Radeon 780M REFERENCES * https://forums.opensuse.org/t/trouble-overriding-global-desktop-entry-in-kde-plasma-6/188593
I have the same behavior on my two machines running openSUSE Tumbleweed. Here are the details of one machine, in case it helps: Operating System: openSUSE Tumbleweed 20251004 KDE Plasma Version: 6.4.5 KDE Frameworks Version: 6.18.0 Qt Version: 6.9.2 Kernel Version: 6.17.0-1-default (64-bit) Graphics Platform: Wayland Processors: 12 × AMD Ryzen 5 3600 6-Core Processor Memory: 32 GiB of RAM (31,3 GiB usable) Graphics Processor: AMD Radeon RX 550 / 550 Series
Is the issue only visual in this dialog or does it use the wrong Exec as well?
Yes, it executes without the modified Parameters. When i use: > gtk-launch google-chrome.desktop everything works as expected.
I suppose /tmp/log generated by this command would be enlightening: strace -f -o /tmp/log kbuildsycoca6 --noincremental
(In reply to Harald Sitter from comment #4) > I suppose /tmp/log generated by this command would be enlightening: > > strace -f -o /tmp/log kbuildsycoca6 --noincremental I ran the command and took a look at the log, but I did not find anything enlightening. But, obviously, it's not easy to find something enlightening in a nearly 50k lines text file if you don0t know what you're looking for ;-) I am attaching the file here (zipped). Oh, one more thing... when running the command I got this output: > strace -f -o /tmp/log kbuildsycoca6 --noincremental kbuildsycoca6 running... kf.service.sycoca: The menu spec file ( "" ) contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix it.
Created attachment 185551 [details] output of strace -f -o /tmp/log kbuildsycoca6 --noincremental
There is an unexpected lack of chromes in that debug output. Please attach your /usr/share/applications/google-chrome.desktop And, what's the output of: env |grep XDG_ QT_LOGGING_RULES=*=true kbuildsycoca6 --noincremental
(In reply to Harald Sitter from comment #7) > There is an unexpected lack of chromes in that debug output. > > Please attach your /usr/share/applications/google-chrome.desktop > > And, what's the output of: > > env |grep XDG_ > QT_LOGGING_RULES=*=true kbuildsycoca6 --noincremental My problem is not with Google Chrome, but with other applications for which the command line is not correctly reflected. e.g. I have to use a couple environment variables to have LibreOffice correctly adapt to my HiDPI monitor, but even after adding those environment variables to the .desktop file they're not reflected in the GUI and they do not work. If I copy the .desktop file changing its name (e.g. libreoffice-writer.desktop ==> libreoffice-writer-hidpi.desktop) I get another entry in the applications menu and this one works correctly. I am attaching libreoffice-writer.desktop. The output of `env |grep XDG_`: >XDG_CONFIG_DIRS=/home/cris/.config/kdedefaults:/etc/xdg:/usr/local/etc/xdg:/usr/etc/xdg >XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1 >XDG_MENU_PREFIX=plasma- >XDG_SEAT=seat0 >XDG_SESSION_DESKTOP=KDE >XDG_SESSION_TYPE=wayland >XDG_CURRENT_DESKTOP=KDE >XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 >XDG_SESSION_CLASS=user >XDG_VTNR=3 >XDG_SESSION_ID=3 >XDG_RUNTIME_DIR=/run/user/1000 >XDG_DATA_DIRS=/home/cris/.local/share:/home/cris/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:/var/lib/snapd/desktop The output of `QT_LOGGING_RULES=*=true kbuildsycoca6 --noincremental` is also attached (zipped).
Created attachment 185552 [details] kbuildsycoca6 log
Created attachment 185553 [details] output of QT_LOGGING_RULES=*=true kbuildsycoca6 --noincremental
Created attachment 185554 [details] libreoffice-writer.desktop from ~/.local/share/applications
Created attachment 185555 [details] env |grep XDG_
Created attachment 185556 [details] QT_LOGGING_RULES=*=true kbuildsycoca6 --noincremental
I've also added the outputs of: > strace -f -o /tmp/log kbuildsycoca6 --noincremental > env |grep XDG_ > QT_LOGGING_RULES=*=true kbuildsycoca6 --noincremental
Very perplexing. m.mairleitner@gmail.com can you please attach /home/matthias/.config/menus/applications-merged/user-chrome-apps.menu /home/matthias/.local/share/desktop-directories/chrome-apps.directory /home/matthias/.local/share/applications/google-chrome.desktop /usr/share/applications/com.google.Chrome.desktop /usr/share/applications/google-chrome.desktop
Created attachment 185557 [details] chrome-files
Here you go. check out: chrome-files.tar.gz
Thanks
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kservice/-/merge_requests/215
Unfortunately none of the existing data is showing what exactly goes wrong. The strace shows that the file is definitely being looked at, I presume it gets discarded for some reason though. I see nothing peculiar in the files you've posted and also am not able to reproduce this on my system. I've started adding some more debug context for the next kde frameworks release. If one of you knows how to rebuild an rpm with that patch that'd be very helpful, otherwise we have to wait a month for the release and then revisit this bug.
Thanks for looking into this, sitter@kde.org. I hope to find time to do that over the weekend. I’ll attach the new logs here and let you know.
Git commit bec686d532e8c99df19cfb802198530ace5a72e6 by Harald Sitter. Committed on 07/10/2025 at 04:13. Pushed by sitter into branch 'master'. kbuildsycoca: debug++ it's currently not clear why/when kservices are ignored for the sycoca. expand debug coverage by adding some new messages and bringing back some old ones M +6 -3 src/sycoca/kbuildservicefactory.cpp M +2 -0 src/sycoca/kbuildsycoca.cpp https://invent.kde.org/frameworks/kservice/-/commit/bec686d532e8c99df19cfb802198530ace5a72e6