As far as I can tell there is no way to select a single screen to share in the Linux Slack app when you have more than one screen. So in my 3 screen set up, screen sharing is practically unusable.

So I was wondering if there was a way to maybe "trick" Slack (or any other Linux app) into thinking I only have one screen through some kind of config file/environment variable etc?

I've tried locking Slack to one screen using KDE's "Special Application Settings" functionality, but that didn't do it.

Any other suggestions?

I'm running Kubuntu 18.04.


  • 2
    Sounds like it actually doesn't really you have multiple screens, and just thinks you have one really wide (or tall, etc.) one. I would guess a nested X server (like xserver-xephyr or Xnest) would limit it to that server's window. Of course, that'd also mean you'd have to run whatever you want to share in that nested server, so probably not really an answer. – derobert Feb 26 '19 at 21:14
  • 2
    @derobert It's a single “screen” in the sense of the largely obsolete concept of X11, but three screens in the vernacular sense. – Gilles 'SO- stop being evil' Jun 6 '19 at 12:00

Not my answer, but this worked for me:

I found a workaround by using "v4l2loopback". Like following, by using "v4l2loopback", ffmpeg can output screen captured movie to v4l2 device.Then, in Slack application, you can share your screen as your camera input.

$ sudo modprobe v4l2loopback exclusive_caps=1
$ ffmpeg -f x11grab -framerate 30 -video_size 1920x1080 \
 -i :0.0+0,0 -f v4l2  -vcodec rawvideo -pix_fmt rgb24 /dev/video1
  • Change "1920x1080" to the screen size you want to capture.
  • Change "+0,0" to the starting point of the screen.
  • Change /dev/video1 to your v4l2loopback device made by sudo modprobe v4l2loopback exclusive_caps=1.

So, if you make /dev/video1 by v4l2loopback and have two "1920x1080" size monitor screen in left and right.

For getting left screen:

$ ffmpeg -f x11grab -framerate 30 -video_size 1920x1080 -i :0.0+0,0 -f v4l2 \
 -vcodec rawvideo -pix_fmt rgb24 /dev/video1

For getting right screen:

$ ffmpeg -f x11grab -framerate 30 -video_size 1920x1080 -i :0.0+1920,0 -f v4l2 \
  -vcodec rawvideo -pix_fmt rgb24 /dev/video1

The fellow also made following command line tool for executing these command in easier way: https://github.com/BlueSkyDetector/set_v4l2loopback_screen


  • I had to install v4l2loopback-dkms on Ubuntu 18.04:

    $ sudo apt-get install v4l2loopback-dkms

  • modprobe created /dev/video0 for me, since I don't have any other camera installed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.