LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-24-2021, 06:07 AM   #1
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Rep: Reputation: 144Reputation: 144
Question 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.?
 
Old 09-24-2021, 06:55 AM   #2
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,500

Rep: Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308
I've already said many times, for example there:

Quote:
Originally Posted by LuckyCyborg View Post
On Wayland/Plasma5 we need also the xdg-desktop-portal for any Wayland-based remote desktop solution to work.

This means everything starting with desktop sharing on Firefox or Chromium, ending with FreeRDP, the various VNC solutions or even TeamViewer or AnyDesk.
BUT, first of all, you need a functional PipeWire daemons setup, because it's used by Wayland/Plasma5 (any other Wayland-based DE) for capturing streams of windows or entire desktop, for example to give you the taskbar thumbnails or desktop sharing.

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/

Last edited by LuckyCyborg; 09-24-2021 at 07:54 AM.
 
2 members found this post helpful.
Old 09-24-2021, 09:30 AM   #3
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,500

Rep: Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308
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
-rw-r--r-- 1 root root 437K Sep 24 16:19 xdg-desktop-portal-1.10.1-x86_64.tgz
That's is its size: 437K and probably nothing else than Wayland/Plasma5 interacts with it - I for one, I seen no adverse effects generated by its presence, and I have it installed since Plasma5 was in KTown.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20210924_171814.jpg
Views:	279
Size:	185.4 KB
ID:	37266  

Last edited by LuckyCyborg; 09-24-2021 at 10:10 AM.
 
2 members found this post helpful.
Old 09-25-2021, 04:22 AM   #4
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Original Poster
Rep: Reputation: 144Reputation: 144
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.
 
Old 09-26-2021, 11:42 AM   #5
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,500

Rep: Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308
Quote:
Originally Posted by timsoft View Post
LuckyCyborg, do you have the mods for that slackbuild you could share and I'll give it a go.?
The xdg-desktop-portal is now already added on -current. Just update your system.
 
Old 09-27-2021, 10:31 AM   #6
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Original Poster
Rep: Reputation: 144Reputation: 144
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.
 
Old 09-27-2021, 01:52 PM   #7
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,500

Rep: Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308
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...
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20210927_211728.jpg
Views:	429
Size:	125.4 KB
ID:	37296   Click image for larger version

Name:	Screenshot_20210927_212015.jpg
Views:	233
Size:	101.4 KB
ID:	37297   Click image for larger version

Name:	Screenshot_20210927_212241.jpg
Views:	186
Size:	144.6 KB
ID:	37298   Click image for larger version

Name:	Screenshot_20210927_212517.jpg
Views:	173
Size:	144.7 KB
ID:	37299  

Last edited by LuckyCyborg; 09-27-2021 at 02:52 PM.
 
1 members found this post helpful.
Old 09-29-2021, 09:28 AM   #8
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Original Poster
Rep: Reputation: 144Reputation: 144
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

Last edited by timsoft; 09-29-2021 at 11:48 AM. Reason: correct error message
 
Old 10-05-2021, 11:29 AM   #9
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Original Poster
Rep: Reputation: 144Reputation: 144
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
Initializing D-Bus connectivity with XDG Desktop Portal
krfb.framebuffer.pipewire: Unsupported XDG Portal screencast interface version: 0
QObject::connect(Framebuffer, RfbServerManager): invalid nullptr parameter
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 699, resourece id: 2092717, major code: 40 (TranslateCoords), minor code: 0
(the last line is shown after I close the qui error message)
 
Old 10-07-2021, 03:48 AM   #10
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Original Poster
Rep: Reputation: 144Reputation: 144
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.
 
  


Reply

Tags
tigervnc, wayland



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Wayland: Inaccessible and restrictive by design? (Aka, Wayland won't get out of my way and I don't want it in my future.) CajunCoder Linux - General 2 09-04-2017 12:32 PM
Does gnome-flashback session use wayland? Do all gtk3 apps use wayland? rubankumars Linux - Desktop 1 08-08-2017 04:13 AM
[SOLVED] tigervnc issues when sharing VNC screens pisti Linux - Software 0 02-03-2016 01:44 AM
LXer: Mutter Wayland 3.11.2 Now Syncs Keymap from X.Org to Wayland LXer Syndicated Linux News 0 12-04-2013 02:15 AM
Future !X ? Wayland : X - what is wayland? serafean Linux - General 5 03-04-2011 11:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration