Notes When Using iSH on iPadOS
After using iSH on iPad for quite a while, I have some notes.
iSH is now available on App Store
Just in case you are still using iSH through TestFight, it is to inform you that it is now available on App Store.
Trick to run iSH background
- Note:
-
Using
cat /dev/location
and turned on location service will consume more battery. -
You may not need this trick at all, you can simply
Split View
iSH over Safari to achieve the same effect. -
You can also use
phpwin
app on iPad for opening offline website.
However, if you really need to run it background, for example with python module http.server
, try this:
-
Create and chmod executable file
runBackground.sh
-
Add these:
1 2 |
|
-
Now turn on your device Location service in the device setting, and allow iSH use your location while running.
-
Run
sh runBacground.sh
-
Now open Safari and access:
http://localhost:8000/
Change the port8080
accordingly to your case. You should stay with Safari while iSH is still running.
php and composer
To install php and composer on iSH:
1 |
|
Create and chmod 777 installComposer.sh
with the below bash script:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
To have the command composer available globally, we move composer.phar to:
1 |
|
webserver php with apache
An easy ways to install webserver php with apache is via this auto script:
1 2 3 4 5 6 |
|
Find php.ini and install SQLite3 extension
Enable SQLite3 extension. SQLite3 is shipped with php, so we just need to enable it in the php.ini.
However on iSH we may need to install it manually:
1 2 |
|
We can find php.ini location with these commands:
- The better way (faster) is:
1 |
|
- Or slower one:
1 2 3 |
|
And now we can edit it with nano:
1 |
|
In nano, press Ctrl + w and find sqlite3 and uncomment ; to enable it. We will get something:
1 2 3 |
|
You may need to restart your server to get SQLite3 extension working.
Check again
1 2 3 4 5 |
|
Java javac
Install
1 2 |
|
If running java -version
yields error, try this command:
1 |
|
You can now try running a jar file:
1 |
|
If running javac -version
yields error
1 2 |
|
Try to set these paths:
1 2 3 4 |
|
You can put these commands to:
/etc/profile.d/profile.sh
to set these vars automatically every time you start up the terminal.
- If you have a newer version, try updating YOURversion in the above command, like
/usr/lib/jvm/YOURversion
If things go smooth, you will get response something like:
1 2 |
|
To remove these above path
List env with export
or env
1 2 |
|
1 2 3 |
|
pynvim
On iSH (iPad) If pip3 install pynvim yields errors (greenlet)
```include/python3.8/Python.h:11:10: fatal error: limits.h: No such file or directory
#include
1 2 3 4 5 6 |
|