[How To] KlipperScreen and RDP for iOS/Android/PC/Mac

Hi everybody,
because the only known solution for iOS is the expensive and ugly software MochaX11.
I was creating a simple Solution for RemoteDesktop like the free Microsoft RemoteDesktop Application.

So it’s very simple. I will use default home dir /pi/ change with your username

First of all we have to Install KlipperScreen like in the docks, after that install xrdp

sudo apt install xrdp

Now you have to create an file in your home path called .xsession use your prefered file editor I’m using vim

vim /home/pi/.xsession

The file should contain these two lines.

cd /home/pi/KlipperScreen 
exec /home/pi/.KlipperScreen-env/bin/python /home/pi/KlipperScreen/screen.py

To make restart usable you have to edit /home/pi/KlipperScreen/screen.py

Change line 438 from

os.system("sudo systemctl restart KlipperScreen")

to

os.system("sudo systemctl restart xrdp")

reboot your pi or restart xrdp (sudo systemctl restart xrdp)

connect width rdp tool to your pi :slight_smile:

1 Like

The service part isn’t needed anymore, you can define your service in the newst version of KlipperScreen.

[main]
service = xrdp

Thanks for this simple solution :slight_smile:
Works with my iPad or even 7" Fire tablet from 2015
Any suggestions for an Android RDP client? The Microsoft one won’t let me set a lower custom resolution…

I think this method should be part auf the KIAUH installer, so easy and useful for old phones and tablets.

What i did:

sudo apt install xrdp
nano /home/pi/.xsession

Paste this 2 lines:

cd /home/pi/KlipperScreen 
exec /home/pi/.KlipperScreen-env/bin/python /home/pi/KlipperScreen/screen.py

ctrl+x

Create a new KlipperScreen.conf from Mainsail UI (where your printer.conf is) paste and save:

[main]
service = xrdp

Reboot the pi and connect with your username and password in your RDP app of choice.

1 Like

Maybe you can try Microsoft Remote Desktop 8, Microsoft has two versions in play Store eg. Microsoft Remote Desktop and Microsoft Remote Desktop 8.

Thanks for the info on this!

I was able to get it working on my iPhone but the resolution is way off and I can only see part of the interface. I tried changing resolution in the RDP app but nothing changes. Is there somewhere in KlipperScreen that you have to set the resolution to make it display properly?

I’m wanting to use an old iPhone and unfortunately I only see one version of Microsoft Remote Desktop in the app store.

give error after last update, fixed in this way:

[main]
service: xrdp

I tried both with :
[main]
service = xrdp
and
[main]
service: xrdp

And I get "Option “service” not recognized for section “[main]”
(at the vm console)

That’s in version: v0.2.7-11-g1332045-dirty

I did not see anything relevant in klipperscreen.log
Any idea ?

I’ trying to setup klipperscreen to run on a proxmox vm so that I can xrdp to it

I deleted KlipperScreen.conf containing

[main]
service = xrdp
or
service: xrdp

and it appears to be working now…

I could not get this to work I am getting an error running this

cd /home/pi/KlipperScreen
exec /home/pi/.KlipperScreen-env/bin/python /home/pi/KlipperScreen/screen.py

2023-03-08 17:06:22,715 [screen.py:main()] - Failed to initialize Gtk
2023-03-08 17:06:22,715 [screen.py:()] - Fatal error in main loop:
Traceback (most recent call last):
File “/home/pi/KlipperScreen/screen.py”, line 1015, in
main()
File “/home/pi/KlipperScreen/screen.py”, line 1002, in main
raise RuntimeError
RuntimeError
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
2023-03-08 17:06:22,713 [screen.py:main()] - KlipperScreen version: v0.3.2-4-g1>
Unable to init server: Could not connect: Connection refused
2023-03-08 17:06:22,715 [screen.py:main()] - Failed to initialize Gtk
2023-03-08 17:06:22,715 [screen.py:()] - Fatal error in main loop:
Traceback (most recent call last):
File “/home/pi/KlipperScreen/screen.py”, line 1015, in
main()
File “/home/pi/KlipperScreen/screen.py”, line 1002, in main
raise RuntimeError
RuntimeError

Yes, you can config RD Client and KlipperScreen to match the screen resolution.

In RD Client (iOS) , Go to Settings → Display and choose a resolution, for example in my configuration I selected 864 x 485

Then, in your Klipper host, modify de KlipperScreen.conf and set the same resolution.

You can do it for example, using Mainsail, going to Machine → Root config files and locate KlipperScreen.conf.

In my version, I changed the config like below

[main]
width: 864
height: 485

After you have set this configuration, Reboot the system.

By default, RD Client try to emulate a Mouse, it shows a cursor and behavior is that you have to move the pointer to interact with the screen.
You can change this behaviour, and switch to “Touch mode”, so when you touch the screen, the pointer goes there and clicks.

To do this, tap in the RD Icon, you have in the middle between the keyboard and zoom icons, then press on the Touch icon that is located besides the Mouse icon ( selected by default ).

Hope this contributes to the thread

Martin

Hello @Olavarriense !

Thank you for your input.

You noticed that the post you refer to ist almost two years old?

A lot of things have changed are not up to date any more.

Time to close.