Hi,
I recently saw this jhs’ post on how to use an android phone as display for KlipperScreen by X11 forwarding.
As I have only iOS handheld devices, I was looking for an easy way to connect with my iPhone or iPad in a similar way.
Edit: There is a iOS App “Mocha X11”, which can do SSH with X11 forwarding. Free version has 5min timer, pro version is expensive ~30USD. It should be possible to adapt to the tutorial for android phones.
After some research I found the Xpra project, which has a html5 client for SSH/X11 forwarding
Has anyone tried something similar before?
Seems like a neat solution (if it works):
- support for any device with html5 browser
- setup on host machine (pi running klipper) by some bash script or may kiauh
- easy access by url
Working on a proof of concept rn…
Back with new information:
Mocha X11:
X11 Forwarding works with Mocha X11 on iOS/iPadOS 15.1. Resolution/Windows size is a bit to high. Can’t see whole UI (see pictures below, crude manual below). Response time is ok.
Todo: Fix resolution
HTML5:
Got it working accessing KlipperScreen from Browser (install log below). Sometimes does not load on iPad (Safari/Firefox). Resolution will fit to screen width
Response time is also quite ok, not the fastest.
Future improvements may be:
- install in python venv
- fix security issues (xpra offers authentication methods)
- fix resolution
Notes
What I did to get it running:
# Klipper Screen X11 Forwarding
# Using 2Gb Pi 4
Fresh Pi OS lite install, headless with ssh
sudo apt install git
git clone https://github.com/th33xitus/kiauh.git
Install klipper, moonraker, KlipperScreen
nano start.sh
###### Insert and save #####
#!/bin/bash
cd /home/pi/KlipperScreen
/home/pi/.KlipperScreen-env/bin/python /home/pi/KlipperScreen/screen.py
###### Insert and save #####
chmod +x start.sh
# From here on its possible to connect with Mocha X11
# https://apps.apple.com/de/app/mocha-x11/id1440418243
# See screenshot
# There is a beta build for arm/pi -> add source
https://github.com/Xpra-org/xpra/wiki/Download
wget -q https://xpra.org/gpg.asc -O- | sudo apt-key add -
echo "deb https://xpra.org/beta/ buster main" | sudo tee -a /etc/apt/sources.list.d/xpra.list
sudo apt update
sudo apt install xpra
# Start Session
xpra start --start="bash /home/pi/start.sh" --bind-tcp=0.0.0.0:10000
# Stop session
xpra stop
# Access with Browser
http://192.168.178.4:10000/
New users can only add one embedded media per post…
Mocha 11 Client Settings
Screenshot KlipperScreen X11 forwarded to html5 browser (firefox)
This html5-x11 stuff breaks the purpose of klipperscreen and overcomplicated But I was curious if it would work
Conclusion:
Using webinterfaces (fluidd/mainsail) kinda makes more sense, although KlipperScreen UI is more handy on touchscreen devices imo (larger icons, minimalistic informations).
X11 forwarding of course also works from shell (on unix)
e.g.
ssh -X pi@192.168.178.4
./start.sh
Could you maybe make a step-by-step guide? I would like to use Klipperscreen on an old phone/tablet.
I tried to install xpra on my already working Klipper installation, but it doesn’t work for me. I feel like I’ve missed some steps. It would help me greatly if there was a step-by-step guide I could follow.