Xpra: Ticket #1801: shadow outputs to different windows
I am trying to xpra shadow
my Ubuntu 16.04.3 working environment when I am using my laptop (Windows 10). Environment is 3 screens wide.
I'd prefer if this was 3 windows instead of one window of ~5k x 1080 p.
I fail to think how that'd be possible. I think that fakexinerama could be useful here, but I have no actual clue.
As a bonus: under the same Xpra process?
Wed, 04 Apr 2018 09:53:27 GMT - Antoine Martin: keywords, owner, summary changed; milestone set
- keywords
shadow ubuntu windows multimonitor monitors screens removed
- owner
changed from Antoine Martin to stdedos
- summary
changed from Physical Displays to different windows to shadow outputs to different windows
- milestone
set to 3.0
This should be done under the same xpra process by detecting the different outputs (through randr?) then creating a different root window model for each output. All the models would share the same underlying window, with a different offset for each.
@stdedos: can you please post the output of the script:
python ./xpra/scripts/gtk_info.py
And:
xrandr -q
So we can see how your outputs are detected by gtk (probably nothing), and X11 randr.
Thu, 05 Apr 2018 12:27:32 GMT - stdedos: attachment set
- attachment
set to xrandr.log
Thu, 05 Apr 2018 12:27:41 GMT - stdedos: attachment set
- attachment
set to gtk-info.log
Thu, 05 Apr 2018 12:29:09 GMT - stdedos:
Apologies for the delay. For future readers, I had to manually download sources, it's not included in the apt-get
installation
Well, your intuition was ... halfway right. GTK sees one screen, but multiple monitors ;-)
Fri, 06 Apr 2018 15:56:40 GMT - Antoine Martin: owner, status changed
- owner
changed from stdedos to Antoine Martin
- status
changed from new to assigned
I had to manually download sources, it's not included in the apt-get installation
Good catch, it will now be included: r18993.
GTK sees one screen, but multiple monitors
I've got the same result here, so I was able to hack together a patch:
- r18992: preparatory work fixing an ugly code dependency, which I had wanted to tackle for a long time anyway, just needed a good reason
- r18998: relatively small code for handling the offsets
It works!
Still TODO:
- option to revert to the old behaviour
- fix nvfbc capture (#1317) without copying extra buffers
- don't copy the pixel buffer just to adjust the offset! (add setters for x and y?)
- screenshot code: either paste the individual monitors onto one large black image, or directly access the large root window model directly as we did before
- handle screens disappearing, hard: will need to generate lost-window / new-window packets accordingly
- somewhat related: when shadowing itself, the clipboard loop is not detected (#1312)
Fri, 06 Apr 2018 18:46:25 GMT - stdedos:
Kudos for the prototype :-D
- I'm not sure why would someone prefer the old behavior, but if you can do it - why not?
don't copy the pixel buffer just to adjust the offset! (add setters for x and y?)
Maybe you mean getters? :/
- I am not sure how you are actually implementing screenshot. It could be easier to shoot it at client and fetch the file. Or, if you are fetching the root window and then splitting it - then simply save it
Sat, 07 Apr 2018 12:57:39 GMT - Antoine Martin:
Maybe you mean getters? :/
No.
It could be easier to shoot it at client and fetch the file. Or, if you are fetching the root window and then splitting it - then simply save it
I don't understand any of this, anyway:
Updates:
- r19003: make it possible to revert to single window mode with
XPRA_SHADOW_MULTI_WINDOW=0 xpra shadow
- r19004: handle server resizing and monitors added or removed
- r19005: screenshot for X11 shadow servers using the "slow" GTK capture code
Still TODO:
- share nvfbc (#1317) capture instance for multiple window models (made easier by r19004) - will require moving graphics cards around for testing...
- avoiding pixel copying: only needed for X11 with xshm, so I may just special case it and be done with it - shadowing is already slow anyway
- clipboard loop not detected (#1312)
- macos and win32 shadow server support: #1805
Sun, 22 Apr 2018 17:13:02 GMT - Antoine Martin: milestone changed
- milestone
changed from 3.0 to 2.3
Thu, 26 Apr 2018 12:16:51 GMT - Antoine Martin:
The unnecessary pixel coping is fixed in r19080.
Only left to do for this release: re-check nvfbc.
Mon, 30 Apr 2018 18:59:22 GMT - Antoine Martin: status changed; resolution set
- status
changed from assigned to closed
- resolution
set to fixed
Works well enough, will follow up in #1825 for nvfbc.
Mon, 25 Feb 2019 07:48:25 GMT - stdedos:
Question: Should this still work now (r21873):
XPRA_SHADOW_MULTI_WINDOW=0 xpra shadow
I am trying to debug an issue that, separate windows point to the same spot on the leftmost monitor.
(I think I have mentioned it to a ticket somewhere, but I cannot seem to find the ticket now) --> mentioned here https://github.com/Xpra-org/xpra/issues/2249#comment:1
Mon, 25 Feb 2019 08:16:39 GMT - Antoine Martin:
Question: Should this still work now
Yes.
Sat, 23 Jan 2021 05:34:09 GMT - migration script:
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1801