Systemd-logind policykit actions

Hi,

I recently ran into the problem that a normal logged in user can not reboot the system via command line. I wanted to solve it the policykit way and realized that clear linux is missing the config file /usr/share/polkit-1/actions/org.freedesktop.login1.policy which is part of the default systemd configuration. I am not sure which package / bundle takes care of this, but I am sure that a systemd-logind system is partially crippled without the file. I think it should be added to the clr-systemd-config package / source project, but I am not sure how this all works together. Can somebody explain or even fix this?

Hi @hgdahmen, it’s part of systemd-extras. That is pulled by desktop bundles, maybe that should be in additional bundles too.

Hi,

thank you, at least I can bundle it now. Wouldn’t os-core-plus be the proper bundle for this? It does bundle the remaining parts of systemd.

Maybe.
Would you mind filling an issue at Issues · clearlinux/distribution · GitHub about this? Thanks

We discussed it and I’d like to repeat the thinking of why this is the case: polkit requires a javascript parser which is very large, and we do not want this to be a forced dependency of every clearlinux installation. For this reason it is kept out of the core bundles. We can discuss options for environments where this would be beneficial (desktop environments, mostly) but that’s about it. os-core-plus is not the right place for this, I feel, it would be better off in a bundle that all the desktop environments can utilize, for instance.

1 Like

@ahkok Okay I understand your reasoning and your proposal seems to be the right direction. Please note that using the reboot command for example will result in an error message on a default system installation without the desktop environment, so that looks like a bug. If it is deliberate however then be it so. A common base that is used by the different desktop environments sounds like a better solution than currently. I am however using local terminals without a graphical environment. It would be nice if such a common base can be installed as a separate bundle to enable said functionality for console-only users, too. Or maybe include it in the console usability bundle then?

It looks like we can augment the polkit bundle easily to add this functionality. That will keep it optional, but available to console users (trivially, just install the polkit bundle).

1 Like

That sounds like a fantastic solution to me :slight_smile:

1 Like