The sad state of screen sharing on desktop Linux

栏目: IT技术 · 发布时间: 6年前

内容简介:I’m a developer, and sometimes I want to show something I’m making to my friends. Screen sharing on LinuxBut, given the productivity boost felt when given extra screen real-estate, it’s not hard to imagine that a vast portion of developers have multiple mo

Screen sharing on Linux: The state of things

I’m a developer, and sometimes I want to show something I’m making to my friends. Screen sharing on Linux sucks . It works pretty decently if the following two things are true:

  1. You have only one monitor.
  2. You are using X11.

But, given the productivity boost felt when given extra screen real-estate, it’s not hard to imagine that a vast portion of developers have multiple monitors. Plus, I really want to use Wayland, but due to the difficulty in screen sharing and a bunch of other problems, I can’t retain the same workflows under a different display server.

Discord

When I’m talking to my friends, I’m (unforunately) using Discord. For those who don’t know, Discord is a bloated chat-and-voice application for Gamers™, and is where we begin simply because of how popular it is.

Discord added screen sharing functionality back in October 2018. It works amazingly well (even for low-latency, high-framerate things like games) as long as you’re using Windows.

Linux is so low-priority for Discord that a bug where Discord wouldn’t start for every Linux user still managed to find its way to the stable branch of the application. Even right now, my Discord client randomly segfaults on several of my Arch installs.

Anyway, for screen sharing on Linux, we find that it works but we can’t separate our two monitors:

The sad state of screen sharing on desktop Linux

This will become a running theme, as Discord’s electron client is using Chromium’s display capture API here.

Jitsi Meet

My next port-of-call for collaboration is Jitsi Meet . This is an open-source, free video conferencing tool. It requires no account, and is almost perfect.

Except : Both Firefox and Chrome suffer from the same issue when trying to screenshare from a multi-head setup on Linux. They do not have the XRandR integration that allows you to choose an individual monitor, despite having the same functionality on other operating systems.

This is such a shame, but it pretty much discounts the entire landscape of web-based collaboration sites with screen sharing support.

The sad state of screen sharing on desktop Linux

The sad state of screen sharing on desktop Linux

A Solution

When I want to show something, I can either:

  • Share a single window, which can sometimes just share the entire screen anyway, or sometimes crash the entire chat application if I hide the window by switching to another workspace.
  • Share outside of the chat application we’re using

So, I use OBS (which actually has third-party support for wlroots if you’re on Wayland) and stream to my own RTMP server.

However, nginx-rtmp lets anyone stream to any endpoint by default. With a tiny Flask application and a bit of configuration , we get that out of the way.

Secondly, latency: RTMP is not designed for a low-latency environment like screen-share collaboration. Plus, its roots are pretty shaky - Macromedia’s Flash-to-server video streaming is not really what we want.

Finally, convenience: To watch my screen, viewers have to open a video client, and point it at my RTMP URL. This is way more friction than just looking at the chat application that’s already open. Plus, most RTMP players have built-in delay, so we resort to weird ffplay -nobuffer commands to get the latency down. This is really terrible ergonomics.

I have a few ideas to make the situation better:

  • Somehow, OBS needs to hook up to a video streaming solution that has some form of low-latency player (with WebRTC?)
  • Otherwise, we need a nice, low-latency RTMP player that can remember recently-viewed stream URLs.
  • But, ideally: There should be patches for Firefox and Chromium could come that fix the issue of display capture when using multiple displays and/or Wayland. (I tried myself, but, man, compiling a browser is a lot of waiting.)

This is a plea to chat platforms and browser developers to improve the situation on Linux.


以上所述就是小编给大家介绍的《The sad state of screen sharing on desktop Linux》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

统计思维

统计思维

[美] Allen B. Downey / 金迎 / 人民邮电出版社 / 2015-9 / 49.00元

现实工作中,人们常常需要用数据说话。可是,数据自己不会说话,需要人对它进行分析和挖掘才能找到有价值的信息。概率统计是数据分析的通用语言,是大数据时代预测未来的根基。如果你有编程背景,就能以概率和统计学为工具,将数据转化为有用的信息和知识,让数据说话。本书介绍了如何借助计算而非数学方法,使用Python语言对数据进行统计分析。 通过书中有趣的案例,你可以学到探索性数据分析的整个过程,从数据收集......一起来看看 《统计思维》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码