Bug 454645

Summary: Wishlist: support for adding headless outputs - iPad as second screen using VNC or RDP - like Gnome and Sway
Product: [Plasma] kwin Reporter: phrxmd <philipp.reichmuth>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: elles.robert, kde-bugs, kde, keith, putr4.s
Priority: NOR    
Version First Reported In: 5.24.5   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description phrxmd 2022-05-31 09:23:48 UTC
I want to repurpose some old tablets as secondary displays. They're slow, but fast enough to run a VNC or RDP client. If I could set up some virtual/headless outputs that are accessible via VNC or RDP, I would find it very useful, because I could use any old tablet to extend my screen real estate.

Gnome and Sway can already do this, and so can KWin with X11:

- Sway has had an option to configure headless outputs since 2020, you can then run a VNC server on those outputs: https://www.reddit.com/r/swaywm/comments/k1zl41/thank_you_devs_free_ipad_repurposed_as_a_second/, https://github.com/swaywm/sway/issues/5553
- Gnome has support for virtual monitors via RDP since Gnome 42, support was merged a few months ago: https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/merge_requests/69
- With KWin X11 I used to be able to achieve this in a hackish way by setting up a virtual output in XRandR, similar to this: https://askubuntu.com/questions/28608/how-do-you-use-an-android-tablet-as-a-second-display.
Comment 1 David Edmundson 2022-05-31 09:35:30 UTC
Kwin also has support since 5.25
Comment 2 phrxmd 2022-05-31 11:22:37 UTC
Thank you! That's great information.
Comment 3 Prajna Sariputra 2022-06-17 01:46:52 UTC
I just upgraded to Plasma 5.25, so are there instructions somewhere on how to enable it? I didn't see anything that looks relevant when going through System Settings.
Comment 4 Keith Ferney 2022-12-19 21:40:36 UTC
I have been trying to find a way to use this feature, are there any guides on how to set it up?
Comment 5 Prajna Sariputra 2022-12-20 01:56:07 UTC
It appears the way to do this is with the `krfb-virtualmonitor` program, so Krfb needs to be installed, and what you do is you run `krfb-virtualmonitor --name WirelessDisplay --resolution 1920x1080 --password pAsSwOrD --port 5900` (change the resolution, port and password as needed), then with your phone/tablet/whatever you can connect to your system using a VNC client (on Android you can try bVNC for example, but just about any should work). You'll also need to know your system's IP address, I think that is shown in the Plasma System Monitor, and you need to make sure whatever port you pick is allowed through your system's firewall if you have one.

Also, I think that might only work on Wayland, never tried it on X11 but I know it uses PipeWire.
Comment 6 Robert 2025-03-10 10:26:34 UTC
(In reply to Prajna Sariputra from comment #5)
> It appears the way to do this is with the `krfb-virtualmonitor` program, so
> Krfb needs to be installed, and what you do is you run `krfb-virtualmonitor
> --name WirelessDisplay --resolution 1920x1080 --password pAsSwOrD --port
> 5900` (change the resolution, port and password as needed), then with your
> phone/tablet/whatever you can connect to your system using a VNC client (on
> Android you can try bVNC for example, but just about any should work).
> You'll also need to know your system's IP address, I think that is shown in
> the Plasma System Monitor, and you need to make sure whatever port you pick
> is allowed through your system's firewall if you have one.
> 
> Also, I think that might only work on Wayland, never tried it on X11 but I
> know it uses PipeWire.

I tried it but you can only share the screen. So it will show the same output but there is now way to configure it as a second monitor on which you can place other application windows alongside your main monitor. Unfortunately like this it is not useful to me.
Comment 7 Robert 2025-03-10 10:28:55 UTC
This allows only to share the screen it is not really a second screen. Therefore reopening this ticket
Comment 8 Prajna Sariputra 2025-03-10 10:39:56 UTC
(In reply to Robert from comment #7)
> This allows only to share the screen it is not really a second screen.
> Therefore reopening this ticket

Sounds like you're just running the Krfb GUI program, which will indeed only share your existing screens, what you're supposed to do is type "krfb-virtualmonitor --name WirelessDisplay --resolution 1920x1080 --password pAsSwOrD --port 5900" in a terminal without the quotes (adjusting the resolution, password and port as needed), press Enter, and then connect with the VNC client on your other device. To be sure I just tested that command again on my Arch Linux system with Plasma 6.3.2 and Krfb 24.12.3 and it does create a virtual monitor separate from the existing screens.

Granted a GUI way to do it would be great so this bug report could be left open for that I guess, or maybe a new report should be opened instead. I vaguely remember KDE Connect having such an option somewhere but no idea how well that works if it's there at all.
Comment 9 Robert 2025-03-10 10:44:18 UTC
Apologies for reopening. It works with the command line tool krfb-virtualmonitor, not with the application from the application menu.
Comment 10 Robert 2025-03-10 10:58:03 UTC
Kde connect seems to only work with other linux computers and not with android