NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.48k stars 12.98k forks source link

Application launcher menu is not updated #20776

Open FRidh opened 7 years ago

FRidh commented 7 years ago

Issue description

The application launcher (KDE Plasma) is not updated, and therefore many links do not function anymore because they refer to old store paths.

Technical details

NixOS at ff1c76e9ebf7268da04611cbbf7e14b4ddfcf732

FRidh commented 7 years ago

@ttuegel any idea what could have caused this?

ttuegel commented 7 years ago

Which version of KDE?

FRidh commented 7 years ago

KDE Frameworks 5.27.0

ttuegel commented 7 years ago

Have you logged out and logged back in? Have you run kbuildsycoca5?

FRidh commented 7 years ago

I restarted my computer, but that didn't have any effect. Also, it takes a long time to log out (5~25 seconds), even with an entirely empty desktop. kbuildsycoca5 doesn't make a difference either.

ttuegel commented 7 years ago

I can reproduce half of this issue, specifically, restarting does not update the menu. However, running kbuildsycoca5 manually does update the menu for me. startkde is supposed to run kbuildsycoca5 during startup, so I think something is wrong there.

FRidh commented 7 years ago

I think I've seen this parse error before

$ kbuildsycoca5
kbuildsycoca5 running...
Reusing existing ksycoca
Recreating ksycoca file ("/home/freddy/.cache/ksycoca5_en_sUSppqk9Rzy0lXtK_M1wog_1CoY=", version 303)
Still in the time dict (i.e. deleted files) ("apps")
kf5.kservice.sycoca: Parse error in  "/home/freddy/.config/menus/applications-merged/xdg-desktop-menu-dummy.menu" , line  1 , col  1 :  "unexpected end of file"
Menu "applications-kmenuedit.menu" not found.
Saving
yochai commented 7 years ago

I've encountered the bug too, running the following two commands after updating gets the menu updated.

rm ~/.cache/ksycoca5_* -rf
kbuildsycoca5
ttuegel commented 7 years ago

If removing the ksycoca cache fixes the problem, that suggests to me the problem is the timestamps in the Nix store not being updated. We may need to patch kbuildsycoca.

FRidh commented 7 years ago

rm ~/.cache/ksycoca5_* -rf kbuildsycoca5

That fixes the issue

FRidh commented 7 years ago

I just ran in this issue again after a nixos-install and using my old $HOME

ttuegel commented 7 years ago

I just ran in this issue again after a nixos-install and using my old $HOME

Could you share your configuration.nix please? I'm still having difficulty reproducing this.

FRidh commented 7 years ago

@ttuegel here is my configuration.nix https://github.com/FRidh/nix-config/blob/f25424d80d8d04c9471cc1a500636040b7810d6a/machines/fr-desktop.nix

ttuegel commented 7 years ago

Hm, OK, now I am suddenly able to reproduce this on my own setup, and I'm not sure why. Well, at least now I can investigate it!

johnramsden commented 7 years ago

I'm getting this issue as well. Specifically I installed google-chrome under kde plasma and no new applications show up in the menu.

I ran kbuildsyscoca and got the following:

john@zero> kbuildsycoca5                                                                      ~
kbuildsycoca5 running...
Reusing existing ksycoca
Recreating ksycoca file ("/home/john/.cache/ksycoca5_en_6FxOgM3ZXYKNjZBZboMCi7opGwA=", version 303)
Still in the time dict (i.e. deleted files) ("apps")
kf5.kservice.sycoca: Parse error in  "/home/john/.config/menus/applications-merged/xdg-desktop-menu-dummy.menu" , line  1 , col  1 :  "unexpected end of file"
Menu "applications-kmenuedit.menu" not found.
Saving
itszero commented 6 years ago

just providing a datapoint: I also have this issue with a fresh nixos unstable install.

bkchr commented 6 years ago

Yeah, I also have the same problem, I just removed xdg-desktop-menu-dummy.menu and kbuildsyscoca5 works again. But we should find out what created this dummy file.

FRidh commented 6 years ago

Just now I encountered the issue again with

$ nixos-version
18.03pre131587.b6ddb9913f2 (Impala)

Grepping Nixpkgs for kbuildsycoca5 does not show any place where it is explicitly called. Is it called from Plasma already?

ttuegel commented 6 years ago

Grepping Nixpkgs for kbuildsycoca5 does not show any place where it is explicitly called. Is it called from Plasma already?

It is supposed to be called from startkde (per our modifications for NixOS) but that call seems to have evaporated.

Chiiruno commented 6 years ago

A hook for executing kbuildsycoca5 when upgrading your system would be nice.

jlelse commented 6 years ago

I still get this issue with this output:

kbuildsycoca5 running... kf5.kservice.services: The desktop entry file "/run/current-system/sw/share/applications/org.kde.systemmonitor.desktop" has Type= "Application" but no Exec line kf5.kservice.sycoca: Invalid Service : "/run/current-system/sw/share/applications/org.kde.systemmonitor.desktop"

Vskilet commented 5 years ago

I'm on Nixos 18.09 and when I use kbuildsycoca5 nothing appears on command line ... And one day when I nix-env -ia something ... menu updated ... Strange ?

va1entin commented 5 years ago

@Vskilet Same here. Since I switched to 18.09 the application menu started working again but manual execution of kbuildsycoca5 didn't seem to do anything for me either.

Vskilet commented 5 years ago

When I delete my home cache (.cache) and do a kbuildsycoca5, my desktop is correctly regenerate.

schmittlauch commented 5 years ago

providing a data point: Affected by this as well on 18.09.1676.7e88992a8c7 (Jellyfish), a rm ~/.cache/ksycoca5_* -rf && kbuildsycoca5 fixed it so far for me. Let's see how long that holds…

ttuegel commented 5 years ago

At the moment, we call kbuildsycoca5 from somewhere early in the login script, but it sounds like that does not correctly invalidate the cache. We should just delete $HOME/.cache/ksycoca5_* and let the cache be regenerated as-needed.

hyperfekt commented 5 years ago

Another datapoint: As of 18.09 63a09881b674e35a7e7a64951cd4b0f7e58be685 running just kbuildsycoca5 (without clearing the cache) manually rebuilds the application launcher, but the call in userActivationScripts doesn't do the job.

pirboazo commented 5 years ago

@Vskilet Same here. Since I switched to 18.09 the application menu started working again but manual execution of kbuildsycoca5 didn't seem to do anything for me either.

I worked for me :-) thank

stale[bot] commented 4 years ago

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.
FRidh commented 4 years ago

I am not aware of this issue happening anymore so closing now.

If the issue does occur for you, please drop a comment here.

scarf005 commented 1 year ago

hi, could you reopen this issue? installed ark, kdeconnect and filelight and had to use the method in comment above to create program icons. using nixos 22.05 with unstable channel.

alphabet5 commented 1 year ago

This was still an issue with a fresh NixOSinstall last week. Running this worked though.

rm ~/.cache/ksycoca5_* -rf
kbuildsycoca5
EternityForest commented 11 months ago

Is there any chance of solving this with a more general cache management solution? Something that can track when a folder is changed(Rechecked when something is installed or removed) and auto-run a command?

BravishkaSkytano commented 5 months ago

I am having this issue on GNOME, I installed obsidian and manuskript and neither shows up.

I ran the commands @alphabet5 used, and I received an error saying the program isn't in my PATH and to use nix-shell. Does this mean the service isn't running? Or perhaps not configured properly?

EDIT: wait a sec, this is a KDE application, SMH. I'm still having the issue, though. I don't think it's an Electron because Vivaldi shows up just fine (not sure if manuskript is an electron app too).

doublevoid commented 4 months ago

This is still an issue in Plasma 6 on the Unstable channel.

tahuffman1s commented 4 months ago

I'm having this issue with Plasma 6.0 on the Unstable channel.

Clearing the cache does indeed work for me. With Plasma 6 run these commands:

rm ~/.cache/ksycoca6_* -rf kbuildsycoca6

DaKingof commented 2 months ago

I'm having this issue with Plasma 6.0 on the Unstable channel.

Clearing the cache does indeed work for me. With Plasma 6 run these commands:

rm ~/.cache/ksycoca6_* -rf kbuildsycoca6

This doesn't work for me. I can only launch from a terminal instance. Using .desktop links are still broken.