|
@@ -0,0 +1,67 @@
|
|
|
|
|
+.\" Automatically generated by Pandoc 2.17.1.1
|
|
|
|
|
+.\"
|
|
|
|
|
+.\" Define V font for inline verbatim, using C font in formats
|
|
|
|
|
+.\" that render this, and otherwise B font.
|
|
|
|
|
+.ie "\f[CB]x\f[]"x" \{\
|
|
|
|
|
+. ftr V B
|
|
|
|
|
+. ftr VI BI
|
|
|
|
|
+. ftr VB B
|
|
|
|
|
+. ftr VBI BI
|
|
|
|
|
+.\}
|
|
|
|
|
+.el \{\
|
|
|
|
|
+. ftr V CR
|
|
|
|
|
+. ftr VI CI
|
|
|
|
|
+. ftr VB CB
|
|
|
|
|
+. ftr VBI CBI
|
|
|
|
|
+.\}
|
|
|
|
|
+.TH android-usb-vnc 7 2025-08-17 "dotfiles Android X11 Over ADB"
|
|
|
|
|
+.hy
|
|
|
|
|
+.SH Use Android tablet (or phone) as extra display
|
|
|
|
|
+.PP
|
|
|
|
|
+This dotfiles target uses adb reverse port forwarding and Xvfb to expose an X11
|
|
|
|
|
+display of VNC.
|
|
|
|
|
+.PP
|
|
|
|
|
+The udev rules and systemd units automatically launch an X11 display (:19) via
|
|
|
|
|
+Xvfb, an x11vnc server, and an xpra server shadowing the virtual display.
|
|
|
|
|
+.PP
|
|
|
|
|
+The X11 display persists even when the device is unpluged, allowing the device
|
|
|
|
|
+to replug later and continue using the session on the display.
|
|
|
|
|
+.PP
|
|
|
|
|
+To reduce the attack surface, the x11vnc server runs (on localhost) only while
|
|
|
|
|
+the Android device is connected.
|
|
|
|
|
+.PP
|
|
|
|
|
+The Android device can connect (passwordless) via localhost:5900 using any
|
|
|
|
|
+preferred VNC client.
|
|
|
|
|
+.PP
|
|
|
|
|
+The host can also connect via xpra to work on the virtual display session
|
|
|
|
|
+simultaneously, and long after the Android device is disconnected. This is
|
|
|
|
|
+particularly useful if the host is headless for a while (say, while travelling)
|
|
|
|
|
+and then later has a display attached.
|
|
|
|
|
+.SS adb
|
|
|
|
|
+.PP
|
|
|
|
|
+The Android Debug Bridge is used to forward the x11vnc port (5900) on localhost
|
|
|
|
|
+to the android device. You can install adb via your package manager.
|
|
|
|
|
+.PP
|
|
|
|
|
+Currently only one Android device is supported as the virtual display created
|
|
|
|
|
+via Xvfb is aligned to the resolution of the first connected device.
|
|
|
|
|
+Subsequently connected devices may not have the optimal screen resolution.
|
|
|
|
|
+.PP
|
|
|
|
|
+In the future, virtual displays per-device shall be added. At which point it
|
|
|
|
|
+will be possible to use multiple devices albeit on separate X11 displays.
|
|
|
|
|
+.SS xpra
|
|
|
|
|
+.PP
|
|
|
|
|
+The xpra debian package repos have the latest version, however, I found the
|
|
|
|
|
+packages seem to have missing dependencies:
|
|
|
|
|
+.IP \[bu] 2
|
|
|
|
|
+lz4
|
|
|
|
|
+.IP \[bu] 2
|
|
|
|
|
+python3-opengl
|
|
|
|
|
+.PP
|
|
|
|
|
+You will need to install these debian packages for xpra to work
|
|
|
|
|
+correctly.
|
|
|
|
|
+.PP
|
|
|
|
|
+lz4 is needed to communicate with the spawned xpra server, otherwise you
|
|
|
|
|
+can start one, but can not stop it!
|
|
|
|
|
+.PP
|
|
|
|
|
+python3-opengl is required if you want reasonable performance when you
|
|
|
|
|
+connect to a shadowed display.
|