xpra icon
Bug tracker and wiki

Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#689 closed enhancement (fixed)

make it easier to setup the html5 server

Reported by: Antoine Martin Owned by: alas
Priority: major Milestone: 0.15
Component: server Version: trunk
Keywords: Cc:

Description

See #473.
At the moment, one has to choose port numbers and point xpra to websockify and tell websockify to point back to xpra.
This is all tedious and error prone.

Instead, let's add a --html=on switch which will do everything in one.

Change History (13)

comment:1 Changed 3 years ago by Antoine Martin

Owner: changed from Antoine Martin to alas

Done in r7743.
Now I can start an xpra server like so:

xpra start :10 --start-child=xterm --bind-tcp=0.0.0.0:10000 --html=on

Then just point my browser to the xpra port and get the html login page:

xdg-open http://127.0.0.1:10000/

afarr: over to you.
Note: this ticket is just for recording this new command line feature. The html5 client issues belong in #473.

comment:2 Changed 3 years ago by maxmylyn

Tested against a Fedora 20 r7840:

Entering --html=on in the CLI when calling the normal Xpra start commands produces this output:

WebSocket server settings:
  - Listen on 127.0.0.1:39091
  - Flash security policy server
  - Web server. Web root: /usr/share/xpra/www
  - No SSL/TLS support (no cert file)
  - proxying from 127.0.0.1:39091 to 127.0.0.1:1200

And then upon navigating to http://10.0.32.52:1200 (IP of the machine) I am greeted by the HTML login page. It looks like --html=on is working. Re-starting the server with --html=off and refreshing the webpage throws an error telling me disconnect: invalid packet format, not an xpra client? indicating HTML is no longer running.

If you need any more testing pass this ticket my way.

Last edited 3 years ago by maxmylyn (previous) (diff)

comment:3 Changed 3 years ago by Antoine Martin

Resolution: fixed
Status: newclosed

Closing.

comment:4 Changed 3 years ago by aradtech

Resolution: fixed
Status: closedreopened

I am unable to get the html5 client to work or I am not understanding the directions. I am stuck on "disconnect: invalid packet format, not an xpra client?" and cannot proceed any further.

here is some output from the server

2014-10-13 13:15:23,238 New connection received: SocketConnection(('10.1.32.77', 1200) - ('10.1.32.130', 50742))
2014-10-13 13:15:23,240 Disconnecting client Protocol(SocketConnection(('10.1.32.77', 1200) - ('10.1.32.130', 50742))): invalid packet format, not an xpra client?
2014-10-13 13:15:23,446 New connection received: SocketConnection(('10.1.32.77', 1200) - ('10.1.32.130', 50743))
2014-10-13 13:15:23,447 Disconnecting client Protocol(SocketConnection(('10.1.32.77', 1200) - ('10.1.32.130', 50743))): invalid packet format, not an xpra client?
2014-10-13 13:15:23,449 New connection received: SocketConnection(('10.1.32.77', 1200) - ('10.1.32.130', 50744))
2014-10-13 13:15:23,450 New connection received: SocketConnection(('10.1.32.77', 1200) - ('10.1.32.130', 50745))
2014-10-13 13:15:23,452 Disconnecting client Protocol(SocketConnection(('10.1.32.77', 1200) - ('10.1.32.130', 50744))): invalid packet format, not an xpra client?
2014-10-13 13:15:23,452 Disconnecting client Protocol(SocketConnection(('10.1.32.77', 1200) - ('10.1.32.130', 50745))): invalid packet format, not an xpra client?
Last edited 3 years ago by Antoine Martin (previous) (diff)

comment:5 Changed 3 years ago by Antoine Martin

Owner: changed from alas to aradtech
Status: reopenednew

What command have you used to start the server? What version, etc
Where do you point the browser to?

comment:6 Changed 3 years ago by aradtech

using trunk from 10/13/14 Fedora 20

xpra start :10 --start-child=xterm --bind-tcp=0.0.0.0:1200 --html=on

then I navigate to http://machinesip:1200 using Chrome on windows.

Last edited 3 years ago by Antoine Martin (previous) (diff)

comment:7 Changed 3 years ago by Antoine Martin

Do you have websockify installed?

What's in your server log? (in full)

Last edited 3 years ago by Antoine Martin (previous) (diff)

comment:8 Changed 3 years ago by Antoine Martin

Another ticket that keeps on giving!

This code was added in r7743 (as per above), but got moved in r7928 for #711 - which broke it. The fix was not completely straightforward, but the code is better for it I think: if r7939 for you, please re-assign to afarr to make sure I haven't broken anything else (again), as this now touches shadow servers too...

comment:9 Changed 3 years ago by Antoine Martin

Owner: changed from aradtech to alas

aradtech / afarr: if this works for you (no need to re-test everything), please close this ticket.

comment:10 Changed 2 years ago by alas

Resolution: fixed
Status: newclosed

Launching and connecting with a browser to the server works as expected. Pretty cool, actually.

Closing.

comment:11 Changed 2 years ago by Antoine Martin

This broke because of #638 in r8303, fixed in r8516. Also needed r8517 to re-set the tcp_proxy option.

comment:12 Changed 2 years ago by Antoine Martin

See also #838.

comment:13 Changed 2 years ago by alas

Re-tested, osx & windows... still looks good.

Had one instance with win32 client that wouldn't give keyboard focus to the xterm, but saw nothing in logs and couldn't reproduce (and not for lack of trying).

Note: See TracTickets for help on using tickets.