Nixpkgs: KDE will not automatically update it's start menu

Created on 22 May 2018  Â·  12Comments  Â·  Source: NixOS/nixpkgs

Issue description

KDE does not automatically run kbuildsycoca5, thus leading to broken links to software that NixOS is in fact correctly linking in /run/current-system/sw/share/applications

Steps to reproduce

Install KDE Plasma 5.
Use it for a little while.
Notice sometimes stuff like the steam desktop file will not update, or after a nixos-rebuild switch the start menu will not display new packages, either until a logout, a restart, or running kbuildsycoca5 in the terminal.

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.14.41, NixOS, 18.03.132405.ee80654b526 (Impala)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.0.1
  • channels(root): "nixos-18.03, nixos-unstable, nixpkgs"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs
qkde

Most helpful comment

The activation script mechanism could be used, right?

All 12 comments

Singleton of #20776.

Informing @ttuegel .

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

Whoops.

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

That would be nice, but AFAIK nixos-rebuild does not have hooks. One workaround for individual users would be to make a shell alias, but that's not something we could realistically deploy for everyone using NixOS.

The activation script mechanism could be used, right?

The activation script mechanism could be used, right?

Can activation scripts run as an arbitrary user?

I think it runs as root, so we could use su/sudo to arbitrary user.

Perhaps getting a list of users and then executing kbuildsycoca5 for each (valid) user?
Or is there a way to check which user executed the (sudo?) nixos-rebuild command?

Also what about if a user su's into root or another user and then updates?
Perhaps getting a list and executing the command would be better, especially if on a multi-user system.

Hm… This is still happening to me on 18.09: Nearly all start menu entries are broken and give a "Could not find the program" error message. Running kbuildsycoca manually doesn't fix the problem.

I'm managing most of my software using home-manager though, could that be an issue?

Same problem for me as @schmittlauch

Same problem for me :-(
as
" @Vskilet
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 . "
workaround work :-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ttuegel picture ttuegel  Â·  98Comments

7c6f434c picture 7c6f434c  Â·  66Comments

fdietze picture fdietze  Â·  144Comments

purefn picture purefn  Â·  68Comments

worldofpeace picture worldofpeace  Â·  103Comments