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

Sudo or root #112

Closed
ghost opened this issue Jul 29, 2021 · 1 comment
Closed

Sudo or root #112

ghost opened this issue Jul 29, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 29, 2021

Hi. Unfortunately, in my script i need to use sudo to get root access but notify-rust didn't work when you are using root account or sudo.

@rnestler
Copy link
Contributor

rnestler commented Dec 5, 2022

I had a similar issue and solved it by switching back to the original user and setting DBUS_SESSION_BUS_ADDRESS explicitly:
sudo -u $SUDO_USER DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$SUDO_UID/bus /usr/bin/reboot-arch-btw.

See also the discussion at rnestler/reboot-arch-btw#33

@hoodie hoodie closed this as completed Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants