From bloggedin.co.uk
Focused articles on Technology, Innovation and Programming including Python, Node-RED, Raspberry Pi & the bbc micro:bit
Previously we experimented with adding Raspberry Pi’s either a Raspberry Pi 4 connected via USB C or a Pi Zero as a local available shell to give the iPad Pro a little more flexibility when it comes to coding options. However, the other night whilst researching and watching youtube it was very interesting to see how someone else tackled the approach…
YouTube consumption, I mean researching pays off
Kalle Hallden runs a very interesting youtube channel with very stylish videos relating to programming and has recently took an interest in Linux and Vim. One of his recent videos covered coding on an iPad and whilst I was expecting to see either what we have covered before or indeed dedicated apps such as Pythonista he didn’t.
iSH
His research pointed towards using a free app called iSH, which alone just gives you a Linux like shell with some basic commands but the interesting thing with this app is that it emulates x86 and comes armed with WGET. The video didn’t show enough detail sadly (unless you frame by frame it) to get the screen commands he issued but what he did show was that it was possible to WGET Alpine Linux into the shell.
Alpine fresh
Alpine Linux https://alpinelinux.org is very lightweight small install of Linux with next to no additional features installed at default.
After downloading and installing iSH I had to hit google to see how to go about getting Alpine Linux installed. Reference material was thin on the ground but I did find this article https://news.ycombinator.com/item?id=24861923
It was a post from banana_giraffe that got us in business (thanks whoever you are)
With just issuing those few commands within iSH we got ourselves Alpine Linux installed within iSH. Now I am no stranger to Linux however, I must confess largely I have always been in the comfort of Debian based systems and apt-get has always been my friend. So on instinct I issued some apt install commands to no avail. Alpine Linux uses a package management software call APK so it was back to google time. My first priority was nano and Python both of which are absent from this Alpine install.
apk add nano seemed to do the trick.
Look mum no Raspberry Pi required!
Goal one achieved, next step was to get Python and Pip installed.
apk add python3
Great stuff but no pip and running apk add pip3 did nothing, turns out for pip you need to issue
apk add py3-pip
Low and behold we now have python running in Alpine Linux within iSH, fantastic.
So now we have Linux, albeit command line based only but a massive step forward for users of iPad’s. One thing I have noticed though is that pip install take an eternity to run, I think this is because of it running inside a ‘VM’.
So now we can install pretty much any of the command line compilers such as gcc and node.js. node.js was next on my radar.
apk add –update nodejs npm
apk add –update npm
Node-RED a Neddy no no it seems!
This also worked without fault, happy days. Now the real test for me being a lover of node-red was could I install node-red on my iPad and see it in the browser? This sadly led to a fail lots of warnings and fail messages during the install which to be fair I thought was a big ask for this perhaps someone wiser can pave the path forward to this.
On the whole just getting a workable Linux environment on the iPad was a big win and if you are comfortable inside a shell using text based editors and compiling from the shell then this really does open up some developer options on the iPad. One can only hope this will get better as it would be really nice to get a comfortable development platform on the iPad. I sit and hope that Apple is secretly working on this with maybe a port of xCode for the iPad but we will wait with baited breath. In the meantime this is a good workaround and perhaps only to be surpassed when GitHub codespaces becomes available to the masses.
Thanks for blogging in.