2022-10-01, 09:33
Hello to people who are smarter than I am. I hope my question has a simple solution.
I have a bash script called "qresolution" that customizes the display on an old 61" projection tv that has only one HDMI port that prefers 1080i resolution and needs odd margins to display correctly.
The computer is a Raspberry Pi 4 running arm64 linux on 2 GB RAM that boots to a command line. I can issue the command to reach a desktop environment and from there, run my bash script, which works correctly and makes the picture on the TV very clear. I have to use because the strange settings are not available in the GUI. I prefer to stream using Kodi because it is less demanding on CPU memory than LXDE desktop and Google Chrome or Firefox (only 2% instead of 75% or higher).
After adjusting display settings in LXDE, I log out of the desktop environment to return to the command line and from there, I issue the command and kodi runs with the custom display settings. All this requires use of a mouse and keyboard to start before I can use the Kore remote control app on my phone. My wife does not know that much about computers and does not know how to do all that start up.
My solution is to write my own addon for my wife to use that runs my "qresolution" script but I cannot get it to work in Kodi. When I try to into my addon python file, I get a strange error in "Log Viewer" I didn't include the full path in the error I just posted because it is long!
I modified the "Hello World" example which works correctly without modification but just adding the "import os, sys" or "import subprocess" to the python file breaks it.
Any attempt to run a shell script by importing one thing or another causes the same error pointing to the addon.xml which I won't change until I can get my script working (I don't want to introduce errors in the XML file and get even more confused).
Does anyone have a suggestion? I have searched for over 8 hours trying to find an answer on my own without success, so any help would be greatly appreciated. Also, why does the error keep indicating a problem with addon.xml when I leave it alone and only edit the python file?
Thank you for your assistance
I have a bash script called "qresolution" that customizes the display on an old 61" projection tv that has only one HDMI port that prefers 1080i resolution and needs odd margins to display correctly.
The computer is a Raspberry Pi 4 running arm64 linux on 2 GB RAM that boots to a command line. I can issue the command
Code:
startx
Code:
xrandr
After adjusting display settings in LXDE, I log out of the desktop environment to return to the command line and from there, I issue the command
Code:
kodi
My solution is to write my own addon for my wife to use that runs my "qresolution" script but I cannot get it to work in Kodi. When I try to
Code:
import os, sys
Code:
Failed to read zip://[full path]/qresolution.zip/qresolution/addon.xml
I modified the "Hello World" example which works correctly without modification but just adding the "import os, sys" or "import subprocess" to the python file breaks it.
Any attempt to run a shell script by importing one thing or another causes the same error pointing to the addon.xml which I won't change until I can get my script working (I don't want to introduce errors in the XML file and get even more confused).
Does anyone have a suggestion? I have searched for over 8 hours trying to find an answer on my own without success, so any help would be greatly appreciated. Also, why does the error keep indicating a problem with addon.xml when I leave it alone and only edit the python file?
Thank you for your assistance