Fix turning the screen on/off on some RPI systems #26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, thanks for this plugin, it's essential in my OSMC RPI setup with a regular PC monitor which doesn't have a remote control.
The problem is, on some systems, vcgencmd is not on PATH. There doesn't seem to be a simple way to customize env vars passed to Kodi Python scripts but adding it to the PATH in screensaver.py works.
This should not break anything on other systems, just fix the problem on OSMC and other similar distributions.
Just a bit of context: my osmc user under which Kodi plugins/scripts are most likely run does have /opt/vc/bin on PATH but it's not present in os.environ["PATH"] when the scripts are run so even passing shell=True to Popen doesn't help. If someone knows how to set the PATH in this case, I'll gladly close the PR since it would be a cleaner solution.
Another fix of this problem was submitted in #24 but I think it's a bit hardwired. Other distributions can have the command on different paths.