Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Way to broadcast / stream desktop over LAN?

  1. #1

    Default Way to broadcast / stream desktop over LAN?

    I'm part time employed at public school and I'm looking for a way to broadcast a stream of my desktop so the students would see what I'm doing. So it also means the delay between what I'm doing and what students see on their PCs shouldn't be bigger than 3-4sec. It also should work without needing an Internet connection (should work over LAN) - school's network is being handled by one guy (not me) and he is there part time too, so often WAN does not work.
    As it is public school and resources are limited I've started investigating how can I do it on a tight budget. Subscription services (#$@!) are not an option - but I'm willing to spend some of my own cash to purchase an app if it turns out it is not doable reliably with open source.

    Initially I thought about ffmpeg and multicast - I thought I could use my beefy OpenSUSE PC (so I know it can handle encoding) and stream it using one of the multicast IPs. I've had some success with:

    ffmpeg -loglevel debug -f x11grab -s 1920x1080 -r 30 -i :1.0 -c:v h264_nvenc -preset:v llhq -rc:v vbr_minqp -qmin:v 30 -f mpegts udp://236.0.0.1:2000

    - but it has one serious flaw. I might be missing something (ffmpeg is a beast) but I don't see a way to sync the stream. This means that while initially everything seems ok, but after a while it is a mess. Especially when I start doing something that has multiple fast moving objects - clients see garbled mess with enormous delay. And I don't think it is a network bandwidth issue - I've tried it at home with 2 PCs wired to router and still I encountered this.

    Any suggestions what can I try ?

  2. #2
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,710
    Blog Entries
    1

    Default Re: Way to broadcast / stream desktop over LAN?

    Which desktop environment are you using?

    For KDE Plasma 5, launch Krfb server application (eg via Menu > System > Krfb). You'll see that it will provide a server address and password that needs to be used for the client machines that you which to share the desktop with. The other consideration is the firewall operating on the server (if applicable). If necessary, you'll need to open the appropriate port (5900 by default). Also when connecting client machines, you can configure to prevent keyborad/mouse control if all you want to share a desktop screen, and instead of being prompted every time a client machine wants to connect, it is possible to configure Krfb to run in 'Unattended' mode, so that machines with the correct credentials can just connect. The client machines can connect via vncviewer (or remmina).

    The Gnome desktop offers a similar screen sharing functionality, (assuming running under Xorg)...
    https://www.linux.com/learn/intro-to...p-access-linux
    https://doc.opensuse.org/documentati...e/cha.vnc.html
    openSUSE Leap 15.3; KDE Plasma 5

  3. #3

    Default Re: Way to broadcast / stream desktop over LAN?

    thx deano! Can VNC stream desktop to multiple clients at the same time? I've always thought it was 1 to 1 type of thing.

  4. #4
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,288

    Default Re: Way to broadcast / stream desktop over LAN?

    If you can get team viewer 12 (13 is still beta in Linux and not complete). You can invite multiple viewers. It is easy to use and setup but they do want to sell you the commercial version which is assume. Also nomachine may work ok

  5. #5
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,710
    Blog Entries
    1

    Default Re: Way to broadcast / stream desktop over LAN?

    Quote Originally Posted by Pshemas View Post
    thx deano! Can VNC stream desktop to multiple clients at the same time? I've always thought it was 1 to 1 type of thing.
    It usually is considered "one-to-one", but AFAIU the server should be capable of supporting multiple concurrent sessions with clients. Some experimentation required. I'd make sure if 'Allow remote connections to control your desktop' is turned off so that students can only view (and not control) the shared desktop. Give it a whirl.

    Similar question asked here...

    https://superuser.com/questions/9728...google_rich_qa
    openSUSE Leap 15.3; KDE Plasma 5

  6. #6
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,710
    Blog Entries
    1

    Default Re: Way to broadcast / stream desktop over LAN?

    Depending on your exact requirements and how dynamic/sophisitcated the desktop sharing needs to be, you may also try live-stream your desktop via VLC , (with students watching via a browser for example)...

    https://www.howtogeek.com/120202/how...rnet-with-vlc/

    YMMV
    openSUSE Leap 15.3; KDE Plasma 5

  7. #7

    Default Re: Way to broadcast / stream desktop over LAN?

    TeamViewer won't do the trick - it is subscription only and educational institution are not eligible for free tier (if it was a one time purchase I'd probably fund it from my own pocket).

    I've tried the VLC option - even before trying ffmpeg. It has the same issue - enormous delay or display going completely out of sync after a while.

    I'm currently experimenting with TurboVNC and it is slowly driving me nuts. After some fiddling I managed to make it work, but there are issues:

    1. I have no clue how to set it up so it would display my current session, not create new one (I'm on 1.0, but when I start vncserver it creates 2.0).

    2. I can't figure out howto make VirtualGL to work (without it 3d apps are super choppy on the clients). When I try:

    vglrun glxgears

    I get:

    Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 key[VGL] ERROR: Could not open display :0.

    I've tried some options on the host:
    vglrun -d :1.0 glxgears

    but I got memory protection error. When I tried it on a client (with -d :2.0 instead , because as mentioned clients launch in its own session / display - don't know correct term) I get a different one:
    [VLG] ERROR: in OGLDrawable--
    [VGL] 82: Could not create Pbuffer


    I've noticed this when running vglserver_config:

    IMPORTANT NOTE: Your system uses modprobe.d to set device permissions. You
    must execute rmmod nvidia with the display manager stopped in order for the
    new device permission settings to become effective.

    -but I can't do rmmod nvidia (and also have no clue what it does) as I got info that several others modules are in place.

    So, yeah, I'm waaaaaay over my head.
    Any suggestions how can I make it work? Or maybe other solutions I could try ?

  8. #8
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: Way to broadcast / stream desktop over LAN?

    First,
    Unless your classroom is the size of a campus (several typical sized classroooms) you wouldn't want to do multi-cast, it'd be unnecessarily complex. Do unicast, which should be fine for 20 or so connections over something at fast as Fast Ethernet... Since VNC scrren updates <should> be ony changes and the screen shouldn't have to be re-written continuously (assuming typical Desktop stuff and not for instance a full screen video).

    I haven't set up VNC for a large number of simultaneous Users, but I don't know of any change over the years that would prevent this from being set up.
    And, it should be simple to do.
    By default, TigerVNC is set up on openSUSE with sharing enabled.
    You just need to have every client login using the same IP address, port an display.
    Remember to set all connections read only or suffer the consequences of a classroom having fun with what you're presenting.

    Otherwise,
    I can see that there are a large number of experimental and new products on the Internet that say they offer Desktop sharing and collaborative solutions, but I can't recommend any at the moment... But, if your needs are very basic, some of them might be a simple solution.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  9. #9

    Default Re: Way to broadcast / stream desktop over LAN?

    @tsu2 : you're right on that I'll need only rather basic setup - I have usually 15-20 students in the class.

    I've managed to get some of this working. Namely VirtualGL part. On the host it started working after reboot. On the client side it was a matter of setting -d option to use correct display for rendering. So in my case when I'm starting the app I need to use:

    vglrun -d :1.0 appname


    And ****, the difference is huge - 3d apps are buttery smooth, over LAN it feels like using those natively.

    But I can't figure out VNC part entirely. As mentioned I'm trying to make it work with TurboVNC - as it is tuned for 3d and video. And this is exactly scenario I'm using it for. I recall trying similar setup a year ago (when I didn't know TurboVNC existed) and it didn't work well with TigerVNC (it was ok for desktop navigation , but not for 3d / video).

    The part I'm struggling with is I don't know howto set it up so it would display contents of what I'm doing on the host machine, on "real" display (if I understand things correctly - on 0.1 display) rather than another "session" with separate display (0.2 in the test scenario).

  10. #10
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,925
    Blog Entries
    14

    Default Re: Way to broadcast / stream desktop over LAN?

    Maybe some WebRTC app, that does screen sharing ?
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •