The file is: /zynthian/config/zynthian_custom_config.sh
Please do not forget to run from shell chmod a+x /zynthian/config/zynthian_custom_config.sh
to make this file executable in order to make it work.
I have followed your recipe by the letter including the link you have provided. But no luck. The command itself works ‘uhubctl -l 1 -a 0’ but zynthian_custom_config.sh doesn’t seem to be working on the boot (chmod a+x, chown root:root)
Trying to include this small command in ‘HARDWARE>OPTIONS>Custom Boot Command’ field didn’t work too, gave boot problems.
Anyway - the command works, thanks to you ! It is the half way already - will dig further.
‘HARDWARE>OPTIONS>Custom Boot Command’ field is only there for adding commands to the config.txt file, not for executing custom scripts.
For this, the zynthian_custom_config.sh is used.
That one is a normal bash script running at root level before the Zynthian gui is shown.
Try creating it with these commands (copy and paste them into SSH line by line:
sudo apt-get install uhubctl
cd //zynthian/config
rm zynthian_custom_config.sh
echo -e >zynthian_custom_config.sh '#!/bin/bash\nuhubctl -l 1 -a 0'
chmod a+x zynthian_custom_config.sh
The problem with a .sh script is, if you create it in WIndows, it has a wrong end of line encoding, which leads to failure of the script.
Either use Notepad++ and before saving the file, choose Edit → EOL Conversion → Unix (LF), or write the file with the shell comands from above, or use nano /zynthian/config/zynthian_custom_config.sh
(ctrl-s to save, ctrl-x to exit) and then the chmod a+x /zynthian/config/zynthian_custom_config.sh
via SSH. The first line of the file shall be only #!/bin/bash and then on the following lines follow your commands.
Thank you again for your help and effort. I was never using windows for creation of the .sh script - used terminal and nano. Will try to repeat thye process once again today. But everything seems to be exactly as you have described and leave my feedback.
Hopefully this recipe might help someone from our community in the future in similar cases.