tigervnc desktop sharing with wayland?
hi all, I can run tigervnc (from extra) on the host (running current) and connect to virtual desktops just fine, but I want to connect to the real physical desktop (for local support on my lan, so I'm not worried about external security).
I can use x0vncserver ~/.vnc/passwd then connect from another pc running vnc (tightvnc viewer), but I just get a black screen. On the actual controlled pc the mouse dissappears but one gets the impression is is moved by the remote viewer. I suspect this viewing issue is because I'm running wayland (startkwayland) rather than x11 on the host, but as that is the default for sddm, I suspect that others with have the same problem. anyone any ideas.? |
I've already said many times, for example there:
Quote:
However, on Wayland you will need a Wayland based VNC server - things like x0vncserver will certainly not work. Regarding TigerVNC and its zero support for Wayland, see there: https://github.com/TigerVNC/tigervnc/issues/158 See also: https://wiki.archlinux.org/title/wayland#Remote_display I for one, I would recommend you to read the posts form the following blog, where are many details about how screen/desktop sharing works on Wayland/Gnome (and Wayland/Plasma5) https://jgrulich.cz/tag/wayland/ |
1 Attachment(s)
So, out of curiosity I've tested (again) right now and the desktop sharing works on Wayland/Plasma5 of Slackware 15.0 RC1 latest updated, via KRDC server and client, IF it's added the xdg-desktop-portal.
The single additional package is xdg-desktop-portal-1.10.1, built by myself with a modified SBo script, and of course, the PipeWire daemons running. The protocol used is VNC on the KRDC client (then probably other VNC clients will work too), and on the KRDC server the "screen capture" method is set to "pw" aka PipeWire. Is not exactly what you imagined, but it works as in attached screenshot. And how KRDC server permits to setup an "unattended access" you can probably use this to get a "VNC server" for Wayland/Plasma5. In my humble opinion, it's sad that Mr. Volkerding does not add this really small xdg-desktop-portal package to Slackware, to have a fully functional desktop sharing on Wayland/Plasma5 . Code:
vanya@darkstar:/tmp# ls -lh xdg-desktop-portal-1.10.1-x86_64-1.tgz |
Thanks for that info. I did look at the tigervnc issues wayland post mentioned earlier, so wondered how to do it.
LuckyCyborg, do you have the mods for that slackbuild you could share and I'll give it a go.? Also, have you put in a request in the "requests for current" thread. as far as I know, Patrick does look at that. I agree, since sddm defaults to wayland, tigervnc is no use for desktop sharing in that case. I'll look up the pipewire posts as well to see what I need to do there. For my initial use case, I might just force using startx instead of wayland, but for all other cases it would be good to have a working method to do remote graphical assistance via sharing the desktop on a slack 15 system. |
Quote:
|
I just checked, and I did have xdg-desktop-portal in my system. I've done the config for pipewire as per https://www.linuxquestions.org/quest...0/#post6243016
and made sure pipewire was running, but although I enabled "unattended logging in" in krfb and set a password; when trying to connect from windows10 with tightvnc it causes the client to hang (and show nothing but the top window decoration with no "display" window below it).! In krb, for the prefered frame buffer, the only one that did not error was qt. xcb and pw gave an error on the host. On this particular device I changed from running startkwayland to startx and x0vncserver works just fine, so I have a work-around, but I'm not sure what I did wrong.(why it didn't work with wayland) It would be nice to get it working with wayland, if anyone has more suggestions or troubleshooting pointers for me to try. |
4 Attachment(s)
Well, I did another experiment with KRFB and KRDC on Wayland/Plasma5, of course with PipeWire daemons up and running.
First screenshot is after restarting the KRFB - after configuring "screen capture" to "pw" aka PipeWire, which is the single one working on Wayland/Plasma5 . Please note the confirmation dialog for sharing the screen and input devices - this is NOT the KRFB, but the xdg-desktop-portal and confirming with "share" is a must. The second screenshot is the target computer asking for accepting the incoming VNC connection. The third screenshot is the KRDC started on the master computer (running also Slackware 15.0 RC1) doing a standard VNC session to Wayland/Plasma5 on target computer. The fourth screenshot is the KRC started on the same master computer doing an unattended VNC session to Wayland/Plasma5 on target computer. I for one, I believe that the "desktop sharing" works now as supposed on Wayland/Plasma5 , at least as Slackware to/from Slackware. How this could be used to simulate a VNC server behavior of TigerVNC's alike is a theme of research for those interested. I think that the most laborious trick is to bypass the resources sharing dialog of xdg-desktop-portal or storing somehow the choice. Also, probably would be interesting to find which thirdly party VNC clients are compatible with this design... ;) |
thanks for the response. When I try to run with pw set for "screen capture", I get an error from krfb saying "Failed to start the krfb server. Try setting another port in the settings and restart krfb". I've checked that vncserver (tigervnc) wasn't accidentally running, and that there was nothing already listening on 5900 with netstat. I've tried changing the port to 5901 and 5902, but still no joy. If i change back to "screen capture" being qt, krfb runs and I can connect, but although I can send keyboard input and mouse input to the host, the client can't see the host screen contents, but just sees a black screen.
I tried switching from pw to qt and back to pw to get the xdg-desktop-portal popup you showed in the screenshot, but it doesn't pop up. I had a go at running the xdg-desktop-portal binary manually, but that didn't help, and there isn't a man page for it. do you know of a way to get the xdg-desktop-portal confirmation popup so that I can verify the settings are ok.? thanks |
an update: I tried running krfb from a konsole, so I could see the terminal error messages when I get the "failed to start the krfb server ....." gui message.
Code:
krfb.framebuffer.pipewire: Failed to open drm render node: no such file or directory |
on further investigation it looks like krfb will not run using pipewire without drm which will not run on fbuff display, especially with nomodeset, so anyone without modesetting is out of luck/has to manually run x instead of wayland if they want to remote share the desktop.
I'll mark this closed for now. if anyone has a work-around to get pipewire running without modesetting/drm, please add to this thread. |
All times are GMT -5. The time now is 07:51 PM. |