subuser icon indicating copy to clipboard operation
subuser copied to clipboard

HTML5 xpra client support

Open mschatten opened this issue 5 years ago • 2 comments

Hello,

firstly, thank you for a great tool!

I was playing around with getting things to work, and it works great with the x client of xpra (just a side note when building an image name@./ doesn't seem to work, but name@$PWD does).

Would it be possible to run subuser with the xpra-html5 client? E.g. by starting xpra server as described here:

https://xpra.org/trac/wiki/Clients/HTML5

I was fiddling a bit with your code in x11Bridge.py, but haven't been able to start the client for some reason. I guess, I would need to rewrite the way xpra server is starting, but I'm afraid other parts of subuser might get compromised...

Best,

M.

mschatten avatar Feb 16 '20 01:02 mschatten

Since each individual subuser has it's own xpra bridge, there would have to be a different port for every subuser that wanted to use the HTML5 interface. Is that what you want? Or do you want to get all the subuser's in one html5 window? I'm not even sure how that would work exactly, I haven't used the html5 client.

First off, there aren't any permissions for portbinding yet. You'd need to add a permission for that. This would configure the docker --publish arg.

You'd then need to add a second permission group named html5-client to the gui and add a configuration option port to the html5-client group.

IFF the html5-client group was configured, then this line would have to change so that it gave the server permission to bind the specified port.

Finally, you'd have to dissable this code if the html5-client permission group was set and print out a line telling the user to redirect their browser to "localhost:"

timthelion avatar Feb 17 '20 21:02 timthelion

I imagine that a permissions.json file that was configured to use the html5-client would look like this:

{
 "description"                : "The vlc video player."
,"maintainer"                : "Timothy Hobbs <timothyhobbs (at) seznam dot cz>"
 ,"executable"                : "/usr/bin/vlc"
 ,"gui"                       : {
     "html5-client": {"port": 8043},
     "clipboard":true,
     "cursors":true,
     "system-tray":true
 }
 ,"sound-card"                : true
 ,"webcam"                    : true
 ,"access-working-directory" : true
 ,"allow-network-access"      : true
 ,"basic-common-permissions" : true
}

timthelion avatar Feb 17 '20 21:02 timthelion