pmset-session is meant to be used with .zprofile and .zshenv in order to automatically set power management options while you are connected to macOS v

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-09-22 04:30:03

pmset-session is meant to be used with .zprofile and .zshenv in order to automatically set power management options while you are connected to macOS via ssh.

Put pmset-session in your $PATH. If you're going to be using pmset-session in .zprofile like recommended below, the directory it's in must be added to $PATH before the relevant code in .zprofile executes, e.g. by adding it to .zshenv.

You almost certainly want to make it possible for your user to sudo pmset without a password prompt. In order to do this, run the following code in your terminal, replacing joe with your user name:

You can use pmset-session -c from the command line to clean up PID files in case e.g. your computer ever crashes or loses power. Note that this will not include PID files where the process ID is now being used by some other, unrelated process. You can use pmset-session -o $$ to remove all PID files and start a session only for your current shell.

Leave a Comment