Witko / nvidia-xrun

Utility to run separate X with discrete nvidia graphics with full performance
GNU General Public License v2.0
488 stars 69 forks source link

Refactor to be sudoers-friendly (= rebase #87) #145

Open hseg opened 4 years ago

hseg commented 4 years ago

Rebased version of #87. Patch reduces the set of commands to whitelist down to one. Also, it changes the calling convention used by the PM unit from setting an envvar to passing a fixed string.

Some misc shellcheck warnings are also cleaned up, most significantly:

Note: implementation nonessentially uses Bash 4 features. With minor duplication, older bashes can be supported.

Nathoufresh commented 4 years ago

Great work! It works well on my manjaro install I use it daily.

For those who wanna try here's a PKGBUILD. And don't forget to add %users ALL=(root) NOPASSWD:/usr/bin/nvidia-toggle at the end of you sudoers file.