Closed dxwil closed 6 months ago
you can run /bin/bash -c "cmd"
if the shell matters. What's the problem?
I don't know, but I can't get systemctl to run from hypridle.
[LOG] wayland done, registering dbus [LOG] Using dbus path /org/freedesktop/login1/session/_31 [LOG] Got dbus .Session [LOG] Got Lock from dbus [LOG] Locking with '/bin/bash -c "systemctl suspend"' [LOG] Executing '/bin/bash -c "systemctl suspend"' [LOG] Process Created with pid 16290 /bin/bash: line 1: /bin/bash -c "systemctl suspend": No such file or directory
My config: `general { lock_cmd = '/bin/bash -c "systemctl suspend"' ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam) }
listener { timeout = 60 # in seconds on-timeout = hyprctl dispatch dpms off # command to run when timeout has passed on-resume = hyprctl dispatch dpms on # command to run when activity is detected after timeout has fired. }
listener { timeout = 120 on-timeout = '/home/dxwil/.config/hypr/scripts/systemctl_suspend.sh' }`
how are you running hypridle? Sounds like PATH being kinda bork. If you use a login manager, and launch hypridle with exec-once
, your .bashrc is not sourced.
So far I've only been running straight from the terminal, so I'm assuming there shouldn't be any problems with how I'm running it.
If I include the full path of systemctl, I get this
/bin/bash: line 1: /usr/bin/systemctl suspend: No such file or directory
i think the issue is that you are quoting the command in your hypridle config. hyprlang doesn't use quotes as far as i know, so it seems to just be passing them to your shell instead. the error messages you're getting are exactly what you get if you try to do the same thing in bash.
change it to lock_cmd = systemctl suspend
(without any quoting) and it should work.
That's it!! Thank you, I don't know how I didn't think of that :)
oh yeah I am blind thanks
All in the title, I don't know why hypridle calls the sh shell, but I can't get in to run systemctl. Swaylock, which is at /usr/local/bin, runs for example.