Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix turning the screen on/off on some RPI systems #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

asgeirrr
Copy link

@asgeirrr asgeirrr commented Nov 20, 2021

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant