Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

services.plasma5: Update start menu with an activationScript #42910

Merged
merged 1 commit into from Jul 14, 2018

Conversation

bkchr
Copy link
Contributor

@bkchr bkchr commented Jul 3, 2018

To update the plasma start menu kbuildsyscoca5 needs to be executed.
There are several people complaining about missing applications in their
plasma start menu.
This patch adds a activationScript for plasma, that runs
kbuildsyscoca5 for each user that has isNormalUser == true.

Motivation for this change

#41416
Fixes: #40915
#42548

Things done

@peterhoeg @ttuegel

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

To update the plasma start menu `kbuildsyscoca5` needs to be executed.
There are several people complaining about missing applications in their
plasma start menu.
This patch adds a activationScript for plasma, that runs
`kbuildsyscoca5` for each user that has `isNormalUser` == `true`.
@peterhoeg
Copy link
Member

How about patching startkde instead? Then we don't need to resort to su.

@bkchr
Copy link
Contributor Author

bkchr commented Jul 3, 2018

I would like to have an approach where we don't need to restart the display manager.
I personally don't want to restart after each update, just to get my applications back working.

# Update the start menu for each user that has `isNormalUser` set.
system.activationScripts.plasmaSetup = stringAfter [ "users" "groups" ]
(concatStringsSep "\n"
(mapAttrsToList (name: value: "${pkgs.su}/bin/su ${name} -c kbuildsycoca5")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be a direct path via ${kdeWhatever}/bin/kbuildsycoca5? Does this affect users that aren't running kde (which is possible through a custom ~/.xsession file)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this affect users that aren't running kde (which is possible through a custom ~/.xsession file)?

This only applies if config.services.xserver.desktopManager.plasma5.enable is true so if somebody sets that and then overrides the environment using ~/.xsession it would run even when KDE isn't active.

@worldofpeace
Copy link
Contributor

@peterhoeg @bkchr What's holding this up?

@bkchr
Copy link
Contributor Author

bkchr commented Jul 13, 2018

Good question, I think we wait for @ttuegel . But I think that he does not have that much time lately? (based on missing feedback on several of my prs)

@worldofpeace
Copy link
Contributor

I noticed this also. They ended up getting merged by someone else eventually...

Nudge Nudge @peterhoeg 😄

@ttuegel
Copy link
Member

ttuegel commented Jul 14, 2018

How about patching startkde instead? Then we don't need to resort to su.

We already do that, but like @bkchr said, we want this to happen without restarting the display manager if the user runs nixos-rebuild switch.

@ttuegel ttuegel merged commit 1301973 into NixOS:master Jul 14, 2018
@bjornfor
Copy link
Contributor

Great! Planned to backport to release-18.03?

@nand0p
Copy link
Contributor

nand0p commented Aug 5, 2018

i am running kde5/plasma, and i am getting this error now on rebuild bash: kbuildsycoca5: command not found. not clear what the fix/workaround is?

@bkchr
Copy link
Contributor Author

bkchr commented Aug 6, 2018

@nand0p on which version of nixpkgs are you running? Did you had kde/plasma installed before or is this on a fresh install?

jerith666 added a commit to jerith666/nixpkgs that referenced this pull request Aug 18, 2018
* silence normal output from the command

* avoid running it when the data it wants to update is encrypted

* specify explicit bash in kbuildsycoca5 su command

  when the activation script runs at boot time, the users' default
  shells (typically /run/current-system/sw/bin/bash) will not be
  available.  instead, specify an explicit store path for bash.

follow-on to NixOS#42910 and NixOS#44544
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants