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

DietPi-Software | Desktops: PolicyKit1 error when logging in as non-root #2857

Closed
MichaIng opened this issue May 26, 2019 · 3 comments
Closed
Labels
Milestone

Comments

@MichaIng
Copy link
Owner

MichaIng commented May 26, 2019

Solution

sed -i 's|/usr/sbin/lightdm|systemctl start lightdm|' /DietPi/dietpi/dietpi-login

non-root-login

Occurs only when logging in as non-root, e.g. "dietpi".

This then prevents shutdown/reboot from menu.

Ref: https://dietpi.com/phpbb/viewtopic.php?f=11&t=5850

@MichaIng
Copy link
Owner Author

MichaIng commented Jun 16, 2019

Hmm with lxdm login manager on LXDE the issue does not appear. No error + shutdown, reboot etc works well. So it's an issue with LightDM or related autostarts or such.

All I find in web is that this error appears when multiple policykit agents are running. But in your case there is definitely only the lxpolkit up, so the issue is from different kind.

LightDM runs as lightdm user, perhaps a permissions issue?

Jep G_CONFIG_INJECT 'greeter-user=' 'greeter-user=root' /etc/lightdm/lightdm.conf solves the issue. So indeed it seems that either the login user or the LightDM user requires permissions for PolicyKit.

@MichaIng
Copy link
Owner Author

Found it: It's the way we start it.

LightDM should be started via: systemctl start lightdm

root@VM-Stretch:/var/log/lightdm# systemctl cat lightdm
# /lib/systemd/system/lightdm.service
[Unit]
Description=Light Display Manager
Documentation=man:lightdm(1)
After=systemd-user-sessions.service

[Service]
# temporary safety check until all DMs are converted to correct
# display-manager.service symlink handling
ExecStartPre=/bin/sh -c '[ "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/sbin/lightdm" ]'
ExecStart=/usr/sbin/lightdm
Restart=always
BusName=org.freedesktop.DisplayManager
  • I guess it has something to do with the BusName, required for communication with PolicyKit1 or such. However easy solution.

@MichaIng
Copy link
Owner Author

Solved with: #2917

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant