I solved the question I mentioned in the title with Jim.B’s method. Also, it can be done by creating a service. However, the viable solution for me is Jim.B’s method.
Actually, I don’t want to enable or disable it.
After that, it’s another issue. I’m wrong for putting it here.
If PTXH
is enabled, the computer wakes up just as it went into sleep mode.
If PTXH
is disabled, the problem of immediately waking the computer from sleep is resolved. However, I can’t wake it up with keyboard and/or mouse.
If PTXH
is disabled while the computer is booting and, after user login, when I enable PTXH
with my hand in Terminal, the computer wakes up immediately from sleep mode is resolved. I can also wake it up with the keyboard and/or mouse.
This method is confusing, and most likely wrong. However, I was able to solve the problem I mentioned in this way by going around behind something.
When I want to have the echo command done automatically, for some reason it doesn’t work as I want it to. The code works automatically, but the result is different…
Anyway, I leave it.
Thank you everyone.