I'll clean this up, and maybe draft up a shell script that can be tracked, but I ran a BUNCH of tests, and can confirm that you can install OctoScreen in, what is essentially, two commands. It's still "a bunch of commands" but below is just the command line version of what would really be in a shell script.
I tested this on a clean OctoPi, as well as what I can only describe as an "abused" OctoPi (decidedly NOT fresh, loads of things already on it, as well as aborted/orphaned installs of a handful of things), and it works.
Of Note: the ONLY reboots "needed" were the one following LCD35-show (and that is only because the script FORCES a reboot) OR after installing and configuring OctoPi (the final reboot now below could be replaced with service octoscreen rstart and everything is G2G).
Also of Note: Unfortunately, the OctoScreen deb automatically starts the OctoScreen service, which in and of it's self isn't "bad." However, what is bad is that the OctoScreen does NOT release the start if it can not load the API Key. Which causes service octoscreen start to hand until it times out. This seems unacceptable, as, on a fresh install, it is highly likely that there won't be an API Key to load, and this causes supreme issue... Perhaps release the start... That'd be swell...
sudo sh -c 'apt-get update && apt-get install -fy libgtk-3-0 xserver-xorg xinit x11-xserver-utils git build-essential xorg-dev xutils-dev x11proto-dri2-dev libltdl-dev libtool automake libdrm-dev' && \
git clone https://github.com/waveshare/LCD-show.git && \
chmod -R 755 LCD-show && cd LCD-show/
Instructions to check driver (if this were a script, we could prompt the user to select the correct file).
Automatically Reboots (GRRRRR)
sudo sh -c 'cp /boot/config.txt /boot/config.txt.bak && \
sed -i -re "s/^\w*(hdmi_cvt.*)$/#\1/g" /boot/config.txt && \
echo "hdmi_cvt=800 533 60 6 0 0 0" >> /boot/config.txt' && \
cd ~ && git clone https://github.com/ssvb/xf86-video-fbturbo.git && \
cd xf86-video-fbturbo && \
autoreconf -vi && ./configure --prefix=/usr && make && \
sudo sh -c 'make install && \
cp xorg.conf /etc/X11/xorg.conf' && \
cd ~ && wget https://github.com/Z-Bolt/OctoScreen/releases/download/2.6.0/octoscreen_2.6.0_armhf.deb && \
sudo sh -c 'dpkg -i octoscreen_2.6.0_armhf.deb && \
cp /etc/octoscreen/config /etc/octoscreen/config.bak && \
echo "Please log in to your OctoPrint Instance and retrieve an API Key for OctoScreen to use" && \
read -p "OctoPrint API Key: " OCTOPRINT_APIKEY && \
sed -i -re "s/^\w*(OCTOPRINT_APIKEY.*)$/OCTOPRINT_APIKEY=$OCTOPRINT_APIKEY/g" /etc/octoscreen/config && \
sed -i -re "s/^\w*(OCTOSCREEN_RESOLUTION.*)$/OCTOSCREEN_RESOLUTION=800x533/g" /etc/octoscreen/config && \
reboot now'
The above reboot now is not required if we have already done the reboot after LCD35-show, and this could be replaced with service octoscreen restart.
If I were writing a script, and not doing all of the same-command stuff above, I would add more prompts, some options to exit or continue (or skip interactive mode entirely), and re-start checks (to skip portions of the script that had already executed).
I've used some fairly robust interactive bash script frameworks in the past, I will see if I can dig one up and make a script for this.
Leaving this here as a not to myself...
I'll clean this up, and maybe draft up a shell script that can be tracked, but I ran a BUNCH of tests, and can confirm that you can install OctoScreen in, what is essentially, two commands. It's still "a bunch of commands" but below is just the command line version of what would really be in a shell script.
I tested this on a clean OctoPi, as well as what I can only describe as an "abused" OctoPi (decidedly NOT fresh, loads of things already on it, as well as aborted/orphaned installs of a handful of things), and it works.
Of Note: the ONLY
reboots "needed" were the one followingLCD35-show(and that is only because the script FORCES a reboot) OR after installing and configuring OctoPi (the finalreboot nowbelow could be replaced withservice octoscreen rstartand everything is G2G).Also of Note: Unfortunately, the OctoScreen
debautomatically starts the OctoScreenservice, which in and of it's self isn't "bad." However, what is bad is that the OctoScreen does NOT release thestartif it can not load the API Key. Which causesservice octoscreen startto hand until it times out. This seems unacceptable, as, on a fresh install, it is highly likely that there won't be an API Key to load, and this causes supreme issue... Perhaps release thestart... That'd be swell...Instructions to check driver (if this were a script, we could prompt the user to select the correct file).
Automatically Reboots (GRRRRR)
The above
reboot nowis not required if we have already done the reboot afterLCD35-show, and this could be replaced withservice octoscreen restart.If I were writing a script, and not doing all of the same-command stuff above, I would add more prompts, some options to exit or continue (or skip interactive mode entirely), and re-start checks (to skip portions of the script that had already executed).
I've used some fairly robust interactive
bashscript frameworks in the past, I will see if I can dig one up and make a script for this.Leaving this here as a not to myself...