Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screensharing in AppVMs #4351

Closed
DemiMarie opened this issue Sep 28, 2018 · 18 comments
Closed

Screensharing in AppVMs #4351

DemiMarie opened this issue Sep 28, 2018 · 18 comments

Comments

@DemiMarie
Copy link

DemiMarie commented Sep 28, 2018

Qubes OS version:

R4.0

Affected component(s):

domU GUI


Steps to reproduce the behavior:

Use Slack Desktop with screensharing

Expected behavior:

Screensharing works, in that it can share any screen space belonging to the AppVM

Actual behavior:

Screensharing fails

General notes:

This was an issue for me during an interview. Probably the best solution is to allow running a full Linux desktop environment in a single Qubes window.


Related issues:

@marmarek
Copy link
Member

@marmarek
Copy link
Member

Right now any attempt to capture the screen from inside qube (either screenshot or some screen sharing) results in just white image.
I've found why: we enable composition in "manual" mode. According to XCompositeRedirectSubwindows manual:

The rendering of an entire hierarchy of windows is redirected to off-screen storage.

So, the actual screen isn't draw. That's fine for gui-agent, which access those per-window off-screen storage, but breaks grabbing screen content.

There is also automatic mode:

When a hierarchy is rendered off-screen, the X server provides an automatic mechanism for presenting those contents within the parent window.

And changing it does fix this problem. But I also suspect it will affect performance because now the whole screen needs to be rendered twice (once in the AppVM and then in dom0). I need to check that and depending on results make it optional.

@marmarek
Copy link
Member

Not very scientific test: firefox with the same video and other settings. CPU usage for both VMs (with the change and without) is pretty much the same.

marmarek added a commit to marmarek/qubes-gui-agent-linux that referenced this issue Oct 16, 2018
For in-vm screenshots (including screen sharing etc) to work, window
composition buffers needs to be rendered back to root window. Using
"automatic" composition mode does that.

Fixes QubesOS/qubes-issues#4351
@ioleo
Copy link

ioleo commented Oct 17, 2018

@marmarek maybe this could be exposed as a AppVM setting? I've got about 20 AppVMs, but actually only need to screenshare from one. I mean, if there is a performance penalty, one might want to pay it only where we actually need it.

@ioleo
Copy link

ioleo commented Oct 23, 2018

Thank you very much for this! @marmarek 🎉 👏
I'll try to update qubes-gui-agent from testing repositories tomorrow and test it. I'll let you know.

@v6ak
Copy link

v6ak commented Oct 24, 2018 via email

@ioleo
Copy link

ioleo commented Oct 24, 2018

@v6ak I see. The command sudo dnf update qubes-gui-agent --enablerepo=qubes-vm-r4.0-current-testing actually shows that there is an update available:

================================================================================
 Package            Arch      Version            Repository                Size
================================================================================
Upgrading:
 qubes-gui-agent    x86_64    4.0.17-1.fc28      qubes-vm-r4.0-current     54 k
Installing dependencies:
 python3-xcffib     noarch    0.5.1-5.fc28       fedora                   192 k

Transaction Summary
================================================================================
Install  1 Package
Upgrade  1 Package

But I suspect it might be anything else :)

@marmarek
Copy link
Member

This will be in 4.0.18. And also 3.2.29 some time later.

@qubesos-bot
Copy link

Automated announcement from builder-github

The package gui-agent-linux has been pushed to the r4.0 testing repository for the CentOS centos7 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component gui-agent-linux (including package pulseaudio-qubes-4.0.18-1.fc26) has been pushed to the r4.0 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-gui-agent_4.0.18-1+deb9u1 has been pushed to the r4.0 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing stretch-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@ioleo
Copy link

ioleo commented Oct 29, 2018

@marmarek @v6ak I can confirm it works using vncserver and dwm locally (as per daves blog except all in one VM / without the inter-vm stuff - I don't need that).

@ioleo
Copy link

ioleo commented Oct 29, 2018

@marmarek @v6ak I can confirm it also works without those stuff. You're seeing all windows of your AppVM, but everything around is white. Which is actually really cool!

@ioleo
Copy link

ioleo commented Oct 29, 2018

screensharing

Thanks again for this great feature @marmarek <3

@succdo
Copy link

succdo commented Nov 9, 2018

Nice features, Thanks for implementing this important features.
Looking forward to new release for R3.2.

@qubesos-bot
Copy link

Automated announcement from builder-github

The component gui-agent-linux (including package pulseaudio-qubes-4.0.18-1.fc26) has been pushed to the r4.0 stable repository for the Fedora template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-gui-agent_4.0.18-1+deb9u1 has been pushed to the r4.0 stable repository for the Debian template.
To install this update, please use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package gui-agent-linux has been pushed to the r4.0 stable repository for the Fedora centos7 template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment