X11 on iOS
While the content below may be useful to some, the Cydia repository is no longer available due to the maintaince overhead and my loss of interest. If you still want X11 on iOS/iPadOS, check out the Procursus project.
I'm excited to announce that X11 is coming soon to iOS. Most (see below) packages and dependencies for a fully functioning X11 desktop system have been compiled and are available on Cydia for iOS 11+. All packages have been compiled for arm64 and have been tested on iOS 12.4 and iOS 13.1. This requires a jailbroken device.
This site will serve largely as documentation for building yourself.
You can add the Cydia repo below for the deb packages. Please let me know if you run across any issues with the debs; it's likely I messed up including a library or something like that. (These aren't done just yet.)
How it works
At the moment, a virtual screen is accessed via a VNC client to an Xvnc instance running on the iDevice. If you're unfamiliar, Xvnc is an X server with a virtual screen that can be accessed via VNC. The best part of this is no drivers are required: it's all handled by Xvnc.
Largely just because I can. Also, I want to turn my iPad into a proper development environment, and a windowing system helps with that. It's a powerful machine with a Unix-like OS, so X11 seemed like a reasonable project. X11 allows running arbirtary applications like browsers and IDEs, assuming you can make them compile.
- X11 on iOS via Xvnc
- Working window managers (jwm / twm / fluxbox)
- Text editor (adie)
- Image editor (azpainter)
- OpenGL (via Mesa)
- Loads of other libraries, tools, and applications.
Before you start, be sure to have an iOS SDK located at
/usr/share/iPhoneOS.sdk for sbingner's llvm-10 to function. You can get the SDKs from theos.
The following tools/libraries are required to build the packages (unless you choose to build these yourself):
From MCApollo's repository:
- Python @ 3.7
- Darwin CC Tools
- libstdc++ (C++ Standard Library symlink)
In general, you can follow the instructions from Beyond LinuxFromScratch. This project is based on 9.0, with version differences or code modications marked with ⚠️ below. Applications and libs marked with ❗️ means unavailable on iOS or I was unable to build them. Empty notes means compiles and works as-is from BLFS. Additionally, all of the packages are available (generally as dylibs) on the Cydia repo linked above.
|Fontconfig||2.13.1 ⚠️||Requires modifying stdlib.h in SDK to allow system calls. Bug with patch available here.|
|libFS||1.0.8 ⚠️||Need to remove some code from the libtool file. The enviroment variables aren't populated on iOS so a generated bash command is wrong. Check the output of ./configure to pinpoint the line number.|
|libpciaccess||1.0.12 ❗️||Unsupported OS|
|Mako||1.1.0||If you can't build yourself, try using pip|
|Mesa||0.52.1 ⚠️||Set DRI drivers to swrast and set gallium drivers to empty. I manually modifed meson_options.txt. Also symlink m4 to /opt/local/bin/gm4. I had to remove an APPLE check in /src/mesa/main/texcompress_s3tc_tmp.h so it used the GL library instead of the macOS OpenGL one. Also, be sure to specify a minimum iOS version so thread-local support works with something like -miphoneos-version-min=11.2.|
|luit||1.1.1||Run sed -i -e "/D_XOPEN/s/5/6/" configure|
|FLTK||1.3.5 ⚠️||Need to remove some -U__APPLE__ calls. Disable tests in Makefile.|
|tigervnc||1.10.1 ⚠️||No vncviewer. Disable it via CMake. Remove the if(NOT APPLE) check above the add_subdirectory(unix). Also remove the find_package(FLTK) check and remove the line add_subdirectory(tests) (as some tests require FLTK). It's important to build tigervnc before building Xvnc.|
|Xvnc||1.10.1 ⚠️||Add a fake Xplugin.h to fool /unix/xserver/miext/rootless. Modify rootlessWindow.c to check for "Xplugin.h" instead of <Xplugin.h>. Also, remove the -z, now characters from /unix/xserver/hw/vnc/Makefile.in, where it's assigning libvnc_la_LDFLAGS.|
|Glib||2.62.4 ⚠️||Disable cocoa and carbon support in build.meson. Had to fake crt_externs.h. Remove the if host_system == 'darwin' check in glib/meson.build.|
|pango||working on it|
|EFL||1.23.3||working on it|
|compton||git v0.1 beta g316eac0|
|FOX toolkit||1.7.67||Contains Adie (text editor), a calculator, and Shutterbug (screenshots)|
*This post was originally written on the old maxleiter.com, and formatting has slightly adjusted