Hi, I'm TNT and I'm new in this wonderful OS. I'm trying to use it to escape the privacy nightmare that is happening nowadays, and also to improve my security. I work as a pentester and Qubes OS has brought my attention because, thanks to the Template VMs, I can create quick AppVMs with all the tooling I need to attack websites and active directory, and later do the reporting of everything. I setup a different AppVM for every customer I have so data doesn't get mixed and, thanks to that, customer data never leaks to other customers while showing them how to fix things in the reports or videocalls.

Today, I'm bringing a guide of how i solved a problem, and I hope this is helpful for you too. I have to say that I'm no Linux expert, I've moved from Windows and MacOS recently and I still have a lot of things to learn, so please, do not hate me hahaha. Also, if you have managed to get something working with better performance than this solution, please post it 🙏

So, about my problem... I've started to use Qubes OS. First, it was only for hacking and I did not have any complex issue that I could not solve looking the official guides. Then I loved Qubes and started using it for everything. When I had to deal with videocalls in MS Teams with our customers, I ran into this problem: - Webcam won't work in Firefox or LibreWolf - I won't be able to use Qubes Video Companion to share my screen (dom0) and my webcam at the same time. I think this issue happens because screenshare is detected as a webcam instead of a screen (it's transmitted via /dev/videoX). This was necessary to explain my clients how I breached into some of their systems or to be able to work remotely with my colleagues and show them my findings. - Also, I didn't like my webcam box in the MS Teams showing my screen, it didn't felt right.

So, my solution is:

  1. Install QVC in dom0: sudo qubes-dom0-update qubes-video-companion-dom0

  2. Create a TemplateVM (i will use debian) for the videocall Qube.

  3. Chromium will show correctly my webcam and screenshare. In the templatevm, run: sudo apt install chromium

  4. Install Qubes Video Companion in the TemplateVM: sudo apt install qubes-video-companion
  5. Install MPV in the TemplateVM (explained later): sudo apt install mpv

  6. TemplateVM is ready. Now simply create an AppVM with this TemplateVM

  7. Now, in this AppVM, run chromium, go to MS Teams, Jitsi, Google Meet or whatever you need to use
  8. Connect your webcam to the AppVM. Doable with the GUI

  9. Now, run "qubes-video-companion screenshare" in the AppVM and select dom0 to be able to share your whole screen

  10. Last, we will use a webcam application to show the screensharing that we are receiving as a webcam data stream provided by QVC. First, I used Cheese and worked quite well, but the GUI of this app will take up a lot of screen space. So, I discovered that MPV tool will show a webcam without any GUI in its window. Run in the AppVM this command "mpv av://v4l2:/dev/videoN --profile=low-latency --untimed". Change the N in the "av://v4l2:/dev/videoN" thing with the correct one. If you don't know which one is it, try one by one until you get the screensharing in the MPV window.

  11. Now you can share your webcam in the videocall, and also use the screen share button to share the screen of the MPV window, which is your actual screen. I recommend moving the MPV window to a Workspace that you don't use and fullscreen it there, so everything looks nice and MPV doesn't get in your way.

And yeah, this has worked quite well for me, but I'm having a lag issue. The video of MPV lags and people see everything with delay. Also, for websites like MS Teams, everything lags because this website isn't very efficient in performance. If I manage to solve the lag issue, i will publish a response to this topic explaining the solution, but if someone knows of something already, i will be pleased to listen to your solution. And if there was an easier solution to solve this, sorry. I'm new in this OS, I'm trying my best :S Hope this makes the life easier for more users.

TNT.