
I've been working on X11 on jailbroken iOS - MaxLeiter
https://maxleiter.com/X11/
======
ilammy
You just reminded me of jwz’s portability efforts to keep XScreenSaver from
being rewritten from scratch™ in the newest fad every time it comes around. He
literally implemented X11 on top of Cocoa on top of UIKit on top of OpenGL on
top of OpenGL ES just so that his hacks can still run. Though I wonder what
will happen when Vulkan becomes the substrate API.

~~~
rs23296008n1
Good for him. Each to their own. That said, those hacks must be legendary for
him to go to those lengths. Frankly I'm surprised xscreensaver is still around
given all the various changes to window managers.

I've probably still got a few machines with a locally compiled version of
xscreensaver lying around.

~~~
bayindirh
It's also remarkable that XScreensaver has one of the most stable DPMS
implementations around.

Most screensavers and lockers lock-up the system while trying to switch the
screen to low power mode on my PC but, XScreensaver works reliably.
DisplayPort connection on nVidia cards is a pain point.

~~~
zamadatix
"(Display Power Management Signaling) enables power saving behaviour of
monitors when the computer is not in use."

For those not familiar.

------
app4soft
> _If you 're interested in using X11 now_

I'm interested!

Take a look on _AzPainter_ [0] — modern looking desktop app for painting,
written in pure C with own toolkit built directly on top of X11.

Would be happy to see it ported to iOS.[1]

FTR, AzPainter already ported to Android, thanks to _Termux app_ dev team.[2]

[0]
[https://github.com/symbian9/azpainter](https://github.com/symbian9/azpainter)

[1]
[https://github.com/Symbian9/azpainter/issues/76](https://github.com/Symbian9/azpainter/issues/76)

[2]
[https://github.com/Symbian9/azpainter/issues/6](https://github.com/Symbian9/azpainter/issues/6)

------
heavyset_go
Cool! I gave up on hacking on the iOS and macOS platforms because of how
hostile Apple is towards it.

It's nice to see projects like this, I just hope that the rug doesn't get
pulled out from under you after sinking time into it.

~~~
MaxLeiter
checkra1n (current jailbreak for devices with A10 or older chips) is based on
a BootROM exploit, so thankfully I can keep my iPad on newer iOS versions and
remain jailbroken.

~~~
pabs3
Do you know if checkra1n could eventually allow Linux based operating systems
like Android or Debian to run on Apple mobile hardware?

~~~
kccqzy
Who's going to write the drivers?

~~~
pabs3
Perhaps the same folks who previously had Android running on the iPhone 3G a
decade ago:

[https://linuxoniphone.blogspot.com/2010/05/android-on-
iphone...](https://linuxoniphone.blogspot.com/2010/05/android-on-
iphone-3g.html)

~~~
simonh
The 3G had a commodity Samsung CPU core and 'off the shelf' third party
subsidiary components, the drivers for which were available. Modern Apple
custom in-house chips not so much.

------
rs23296008n1
Being ignorant of all things jailbreaking, is there a reason why X11 the
display can't run on iOS? Surely an ios app can run a persistent background
server, eg web? Or is it the swapping out/pausing that is the problem? Or is
the answer to these simply a sharp edged and loud _NO_? We-say-so etc.

I fully get why Vnc/X11 as a screen sharing facility wouldn't work - no
access. I also get why running a full devel environment would be pain for a
"normal" developer to implement - again, no access.

This is all ironic because Apple market their iPad Pro as a professional
device AND the cpu/ram is obviously plenty good enough (they themselves said
so). The thing is more powerful than a Pi. And it meekly manages to compile
quite a lot. My little Pi collection is now at 5 members and growing.

So, Apple, why can't I compile apps for ios on ipados? Hmmm? Wheels for the
mind, think different etc

~~~
Someone
For some definition of “server”, yes.
[https://www.raywenderlich.com/5817-background-modes-
tutorial...](https://www.raywenderlich.com/5817-background-modes-tutorial-
getting-started):

 _”Your app is only allowed to keep running in the background in very specific
cases. For example, these include playing audio, getting location updates or
fetching the latest content from a server.

If your task does not fall into these categories, backgrounding may not be for
you. You may even find yourself with an App Store rejection if you try to
cheat the system by using background modes outside the realm of their
purposes, so consider yourself warned!”_

If you read that, your ‘server’ either will only run for a finite time
determined by the OS (in practice 3 minutes), or only run at highly granular
times determined by the OS ( _”the system uses usage patterns to determine
when to best fire off a background fetch. For example, if your user opens the
app at 9 AM each morning, it’s likely that a background fetch will occur
sometime before that time.”_ )

I think a X11 server that tracks updates for those three minutes of inactive
time, and has a window manager that requests window updates where needed when
the app becomes active could work, though.

(Disclaimer: these restrictions get relaxed over time on iOS. I may have
missed some recent improvements)

~~~
tinus_hn
Fortunately background apps are still not allowed or every app and his brother
would find a reason to require it.

This kind of functionality would require an external server but then you may
as well use VNC.

~~~
rs23296008n1
From what I can tell most "things that need persistent connections", including
vnc or ssh, are not so persistent on ios.

------
0xff00ffee
This makes me happy. I have so much X11 code written over the past few
decades, and I always fall back to X programming when I need to do something
fast and in C. I've written a few simple iOS apps, but was frustrated with
GStreamer support. Of course I have no idea what Cydia is... off to wikipedia.

~~~
sudosysgen
For anyone else, Cydia is a dpkg based package manager for jailbroken iOS

------
marinhero
Very cool, I wish jailbreak wasn't needed! Hopefully this shows Apple that
people want to use their iPad as coding machines too...

~~~
rock_artist
Apple will eventually give you some kind of Xcode.

BTW, few years ago this guy made some Xcode remote before joining Apple Xcode
team :) -
[https://twitter.com/LouisDhauwe/status/1008071487721439233/v...](https://twitter.com/LouisDhauwe/status/1008071487721439233/video/1)

But that's only part of the problem. Still until Apple would give us the
ability (similar to Android) running unsigned / not from App Store / no
timebombs certs (similar to Android unknown sources), iOS is the most
propriety platform and that's a shame.

~~~
mark_l_watson
I agree that Apple will eventually provide some sort of Xcode support. For
now, Pythonista is a proof of concept that you can effectively write small
Python programs on an iPad.

I plug my small iPad Pro into my USB-C interface large monitor and a few
applications take advantage of dual screens to show different content.

For now, I find that I can code while traveling using a remote Linux server,
Working Copy, Prompt ssh shell app, and Textastic for local editing. Not very
convenient, but it works.

What is convenient on my iPad while traveling is writing. I use leanpub with
markdown files stored in a github repo for each book, edit and do git stuff
with Working Copy, and generate review PDFs on leanpub’s web app. This works
fine. On rare occurrences I use Microsoft Word on my iPad, works great, but I
prefer markdown and leanpub.

------
inoop
This is an absolutely batshit crazy idea. I love it.

------
jasonhansel
Add it to my list of "nice things we can't have inside the walled garden"

------
kbumsik
I am confused, so is a X11 stack/server runs in an iOS device natively (not
remotely) but you need a VNC client since a X11 client is not implemented yet?

~~~
minxomat
You can do the same today, without a jailbreak using
[https://ish.app/](https://ish.app/) which is an x86 emulator capable of
running on the latest iOS / iPadOS versions. I do actually use it for work.
Plus it works with standard x86 alpine Linux packages.

~~~
aasasd
I guess technically _you can_ , but emulating x86 on arm sounds horrible.
(Friendly reminder that nothing like JIT is allowed on iOS for third-party
code.)

~~~
saagarjha
It’s reasonable if you’re doing some light editing.

------
mnem
An iPad is certainly a thin client...

More seriously though, while I am (or have been) persuaded that the restricted
environment of iOS generally does make sense for the majority of people, I’d
love to see official “blank” iDevices or an open developer mode available for
them. Perhaps something similar to being able to install Linux on
PlayStation’s. They make very nice portable computing platforms for
prototyping and development.

------
wyxuan
Shame that newer devices can’t have this

------
cannedslime
Finally xeyes!

------
e1ghtSpace
Reminds me of Qmole.[0]

[0] [https://github.com/chriskmanx/qmole](https://github.com/chriskmanx/qmole)

------
rvz
Interesting porting effort here for X11 on iOS. I'm not sure why I would use
this but wouldn't it be beneficial for more iPhone jailbreak users to have
Android dual-booting on their iDevice device?

If that were to happen, I would never need to buy a second phone like I would
just use my single Macbook to triple-boot Windows, Mac and Ubuntu.

~~~
_jal
Well, for starters, you'd need to reverse engineer drivers for custom Apple
hardware, some of which is hardened against that.

...And about 37 other extremely difficult things later, Apple would sue you.

~~~
saagarjha
Under what grounds?

~~~
badsectoracula
Under the grounds of making them sad and you having way less money than they
have.

------
ericek111
What's with all the hype? This has been done over 10 years ago:
[http://ingvar.blog.redpill-linpro.com/2009/11/17/running-
nat...](http://ingvar.blog.redpill-linpro.com/2009/11/17/running-native-x-
applications-locally-on-your-iphone/)

~~~
bdcravens
Will the approach in the article you linked work today?

------
dmarinus
Wouldn't porting Wayland be easier and more future proof than porting X11?

~~~
MaxLeiter
Wayland is linux only, and will require significantly more work. Some work has
been done on macOS, so maybe one day...

------
rijoja
What about RDP would that be a possibility?

------
sequoiar6868
need rooted ?

~~~
filchermcurr
Yep, you'd have to be jailbroken / rooted to use Cydia.

~~~
ashton314
Sorry, I must have been out of the loop. When was the jailbreak for iOS 13
published? (I'm also a complete stranger to jailbreaking—never done it
before.)

~~~
judge2020
Sometime in December, but Checkra1n is still in beta and only works up to the
iPhone X since the bug was patched on the newer 2019 iPhones.

[https://canijailbreak.com/](https://canijailbreak.com/)

------
tooker
Bravo

