for some time I had a crealty ender 3 that had klipper installed. I wanted to use klipper screen insted of the trush blue lcd. I have a poco x3 phone that running PostmarketOS (https://postmarketos.org) so thoght way not to try using it as a screen. my goal was making the experiance as smooth as possible, so I`have tried to reduce the steps from power on to usable state.
- a 3D printer running klipper with kiauh.
- setting Up klipperscreen with kiauh.
- installing vnc server on the printer
- create /home/user/KlipperScreen/scripts/launch_KlipperScreen.sh
- set up network settings
- install pmOS stable with Xorg window manager - xfce, open box, etc..
- set up network settings
- set auto loggin tty
- set up startx
This section covers how to configure Remmina to automatically connect to a VNC server and retry if disconnected.
Create or modify ~/.xinitrc:
#!/bin/sh
exec startxfce4 & exec remmina -c vnc://user@172.16.42.2 --disable-news --disable-stats --disable-toolbar --enable-fullscreenThis ensures that Remmina starts with XFCE and automatically connects to the VNC server.
To ensure the display is correctly rotated and sized for VNC usage.
Run the following command to set the correct resolution and rotation:
xrandr --output VNC-0 --mode 1080x2400 --rotate rightTo make this change permanent, add it to a startup script or the VNC startup configuration.
This prevents the screen from going into power-saving mode.
Add the following command to the startup script:
xset s off -dpmsThis disables screen blanking and power management.
Automatically powers off the system if usb0 network interface loses connectivity.
Create a script at /usr/local/bin/usb0-shutdown.sh:
#!/bin/sh
while true; do
if ! ping -c 1 172.16.42.2 >/dev/null 2>&1; then
echo "Network lost, shutting down..."
poweroff
fi
sleep 5
doneMake the script executable:
chmod +x /usr/local/bin/usb0-shutdown.shCreate an OpenRC service at /etc/init.d/usb0-shutdown:
#!/sbin/openrc-run
depend() {
need net
}
start() {
/usr/local/bin/usb0-shutdown.sh &
}
stop() {
pkill -f usb0-shutdown.sh
}Enable and start the service:
chmod +x /etc/init.d/usb0-shutdown
rc-update add usb0-shutdown default
rc-service usb0-shutdown startThis section details the VNC setup and display configuration on the printer.
Modify the VNC startup script:
#!/bin/bash
# Use display 10 to avoid clashing with local X server, if any
Xtigervnc -rfbport 5900 -noreset -AlwaysShared -SecurityTypes none :10&
DISPLAY=:10 $KS_XCLIENT&
waitEnsure the correct resolution and rotation are applied:
xrandr --output VNC-0 --mode 1080x2400 --rotate rightThis manual serves as a reference for configuring the system with these customizations. Let me know if anything needs to be added or changed!