-
Notifications
You must be signed in to change notification settings - Fork 54
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
Added comments for users that can't use systemctl. #11
base: master
Are you sure you want to change the base?
Conversation
Making this a separate file would be better so the user can automatically use the script instead of having to edit it. |
Will do that! |
Editing the script to better fit what was decided in the Pull Request.
This script is made to work on Void Linux and distros that don't use systemctl
Done! This should fit your needs. |
Great! Let's hope this can be merged. |
Hi! I noticed that the Pull Request isn't merged. Is everything ok, or is there something I need to do? |
I can't merge pull requests. Only the owner can or anyone with the pull request permission. |
Ah, sorry. I got confused and thought you had the permissions. Have a good day! |
Had to install elogind first and edit sudoers file for this to work |
UPDATE: |
@Spaxly What edit did you make to your sudoers to get this working? |
I had to allow the commands to be used without sudo, I don't have the specifics because I don't use Void or rofi power menu anymore |
Thanks for the PR! I'm not too familiar with systemctl and loginctl, so do you know if |
You could certainly replace poweroff and reboot, and I'm fairly certain you can replace hibernate and suspend as well. |
Hey! Sorry for not answering, but here in Italy we have a quite long Easter vacation and I stayed off of GitHub as well. I am not using Void Linux much anymore, but as far as I know Loginctl is Runit's (Systemd alternative that Void uses) CLI for managing the power status of the machine. Since I am now using Fedora and can use Systemctl without any problems I didn't look up for ways to improve it further, but I am available if you need help since I rely on your script daily and would love to be useful. |
Alright, it seems that the "standard" I wonder if these commands are more general, that is, work on a larger set of Linux OSes:
Alternatively, the script could try a few different ways to do the action until the command succeeds. For instance:
Or something like that. But I'd prefer having a single command that's supposed to work on all Linux OSes if possible. EDIT: Apparently, there's no "POSIX-way" of shutting down etc. And I couldn't find any reference on if there exists "The Correct Command". |
Void and many other systems use elogind which has all of the commands used in this script that would otherwise be run with Maybe there could be a flag to switch to it like Or you can just put |
As a Void Linux user, I had problems using this script.
By browsing this repo's issues, I have discovered that you can't use systemctl on Void Linux (I am a new Linux user so I didn't know that). For this reason, I added comments to help people like me who don't know about these details to encourage them to use loginctl as an alternative, which works without any problem.