Xpra-org / xpra

Persistent remote applications for X11; screen sharing for X11, MacOS and MSWindows.
https://xpra.org/
GNU General Public License v2.0
1.97k stars 169 forks source link

shadow specific applications or windows #3476

Open totaam opened 2 years ago

totaam commented 2 years ago

Extending #3320, there is no reason why we can't look for specific windows (ie: by name or window id) and shadow only that part of the screen.

It may not work very well with sub-windows and menus, windows may be occluded by other windows, but it could still be useful.

totaam commented 2 years ago

Still a lot of work to be done on this, and the interface will certainly change. But as of the commit above, I can shadow an xterm I had left on a display using:

xpra shadow :10,windows=class=xterm

And attach from anywhere as usual.

totaam commented 1 year ago

For MS Windows, we can also use the window-handle attribute of d3d11screencapturesrc via the new gstreamer shadow capture: #3750

CrazyKidJack commented 6 months ago

Any chance anyone is still working on this? I'm looking desperately for a way to allow FVWM on linux to manage MS windows applications. This would be a game changer if it allowed that!

If no one has the time to make the changes, but could tell me what needs doing, I'd be happy to do it.

CrazyKidJack commented 6 months ago

Just saw this discussion: https://github.com/orgs/Xpra-org/discussions/3949 and donated a small token.

I saw that there was an option to "donate $100 to request a feature". I would be willing to pay for the ability to have seamless mode (or some close equivalent) from an MS Windows machine to a display on a linux machine, maybe we could discuss how much you think it would cost? Because... seeing how all of the RDP solutions that tried to do it dropped it... I suspect it would not be easy and the $100 probably wouldn't be sufficient. I'm just a guy, so I couldn't pay tons... but it might be worth a conversation if you are interested.

Of course, like I said, I'd be happy to code it myself if someone could help me get acquainted with the project / setting up a dev environment for it (though this might also take too much of your time to be worth it for you idk).

totaam commented 6 months ago

and donated a small token.

Thank you, much appreciated.

I would be willing to pay for the ability to have seamless mode (or some close equivalent) from an MS Windows machine I suspect it would not be easy and the $100 probably wouldn't be sufficient.

Correct. Unfortunately, I don't think that money is the problem here.

I fear that the architecture of the MS Windows desktop doesn't really allow for such a feature to be implemented properly. It may be possible to get an implementation working as well as can be, but I don't think that it will come close to the usability of seamless X11 servers.

The approach in this ticket relies on locating the windows that you want to have forwarded. The new d3d11screencapturesrc gstreamer option may help here, but I doubt that it will handle windows that overlap very well. And this doesn't solve the problem of correctly identifying all the windows that need to be forwarded. I am actually working on a related ticket right now: #3964 so perhaps I can take another look at this after v6 is released.

CrazyKidJack commented 6 months ago

Thanks for your consideration. Too bad Windows probably can't get "full" seamless mode... though it does make me wonder how RDP does it with remote apps... even though basically no one actually supports it...

chewi commented 6 months ago

One big difference with RDP, at least with most editions of Windows, is that you can't use the system locally while connected with a remote client. That probably has a big influence over how it works internally.

I did wonder whether it would be possible to make this work by automatically arranging the windows off-screen in such a way that they don't overlap, but I have no idea whether that is actually feasible.

totaam commented 6 months ago

That probably has a big influence over how it works internally.

Yes. Unfortunately, we don't have access to the source, so there's no way of knowing how to hook into that. One issue I still need to look into is #3990, perhaps it will finally allow us to shadow the login screen.

I did wonder whether it would be possible to make this work by automatically arranging the windows off-screen in such a way that they don't overlap, but I have no idea whether that is actually feasible.

The problem would be a applications that place their windows in specific locations... override that at your own risk. And probably fight over who is in charge.