jaromaz / jslinux-mobile Goto Github PK
View Code? Open in Web Editor NEWLinux for iOS - a mobile version of a PC emulator written in Javascript, with a running, fully functional Linux system.
License: Other
Linux for iOS - a mobile version of a PC emulator written in Javascript, with a running, fully functional Linux system.
License: Other
Hello!
As of 2021 (according to https://bellard.org/jslinux/news.html ) the original JSLinux comes with a newer version of Busybox, which has a nicer vi (eg implements the undo command, you can delete newlines with backspace, etc.) , and also the linux image provides gcc.
Could you modify JSLinux mobile to support this new version?
Thanks!
So I was trying to export a new image on jslinux. Something like...
extract the files from apline
distro Docker image:
docker create --name temp_container i386/alpine
mkdir ~/docker_image_contents
docker cp temp_container:/. ~/docker_image_contents
docker rm temp_container
then copy it to a new binary image:
dd if=/dev/zero of=root.bin bs=1M count=32
loop_device=$(sudo losetup --find --show root.bin)
sudo mkfs.ext2 $loop_device
mkdir ~/mounted_image
sudo mount $loop_device ~/mounted_image
sudo cp -a ~/docker_image_contents/. ~/mounted_image/
unmount, detach and cleanup:
sudo umount ~/mounted_image
sudo losetup -d $loop_device
rm -rf ~/mounted_image
rm -rf ~/docker_image_contents
but then if I replace the root.bin with this image I get:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
So, this has not worked so far... Not sure if you have done any changes to the root.bin or if you have any suggestions/idea on how we can tinker this and get a more updated/different linux image to run on it jslinux. Any hint is welcome.
My end goal would be to build an image running FatScript REPL on it as a web playground.
Making this into a pwa would eliminate this need to download it by cacheing it offline and also eliminate the need to download an alternative browser, because pwas allow apps to run and look like native apps.
Add the following tags to the main index.html file in the head
Also, create an icon named touch-icon-iphone.png,
a 152x152 icon named touch-icon-ipad.png,
a 180x180 icon named touch-icon-iphone-retina.png,
and a 167x167 icon named touch-icon-ipad-retina.png,
<link rel="apple-touch-icon" href="touch-icon-iphone.png">
<link rel="apple-touch-icon" sizes="152x152" href="touch-icon-ipad.png">
<link rel="apple-touch-icon" sizes="180x180" href="touch-icon-iphone-retina.png">
<link rel="apple-touch-icon" sizes="167x167" href="touch-icon-ipad-retina.png">
Then create a file named manifest.json with the following
{
"name": "JS Linux",
"short_name": "JS Linux Mobile",
"start_url": "index.html",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#fff",
"description": "Run Linux in your browser"
}
This should make it into a pwa, and you can direct users to install it to the homescreen using the share>add to home screen button
Hey @jaromaz , I've sent you an email (I found it in your blog) for some ideas about creating an offline version. Can you check it out? Thanks.
Hello!
Could you implement/add the export_file command of the original JSLinux, to make it easy to export some file to the current device where the browser is running?
Thanks
If possible, please reply, thank you.
The original JSLinux has websocket VPN support. I wonder if it can be implemented here. It's an interesting idea is to run a special browser with built-in VPN on iOS so that the emulator can connect to external server by SSH.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.