[winswitch] XPRA/HTML5

Antoine Martin antoine at nagafix.co.uk
Wed May 4 07:32:31 BST 2016


On 04/05/16 06:05, Mukul Agrawal wrote:
> I managed to solve this and get it working.Somethings that I noticed :-
> 1. I needed to shut my apache server down for following to work :-
> sudo xpra start --bind-tcp=0.0.0.0:80 --html=on --start-child=xterm
> 
> Couple of questions:-
> A) which web-server does XPRA start?
websockify
> B) Do I have a choice of sticking with Apache and still have this thing working ?
Yes.

> 2. Following is faulty
> 
> sudo xpra start :10 --bind-tcp=0.0.0.0:80 --tcp-proxy=127.0.0.1:8000 --start-child=xterm
Warning: as I mentioned before, running as root and exposing an xterm
without any protection on an unprotected TCP port is a very bad idea(tm).

> I could connect to xpra server using client application in TCP connection mode. But not from web-browser. Web-browser goes to the default index file and not to xterm.
This does exactly what it is supposed to do.
If you want apache to serve up xpra's HTML5 client then you have to copy
it there. (it doesn't have to be in the root directory either)
You will also need to have a websockify process somewhere to handle the
browser's websocket requests and convert them to TCP for the xpra server.
You can run websockify standalone, or through apache, etc..
Configuring all this is well beyond the scope of this email thread.

> One question -- How does user choose what he wants --- is he browsing to get to index file or is he trying to connect to xterm ?
When you use a browser to hit port 80, the traffic is sent to apache web
server on port 8000, which then serves up whatever it wants back to the
browser.
With the "html=on" flag, we auto configure things so that the index page
is the HTML5 client and it will connect back to xpra.

Cheers
Antoine


> 
> Once again, thanks! Great product.
> 
> 
> 
> 
> 
>  Regards, Mukul ( https://sites.google.com/site/mukulagrawal ) 
> 
>     On Tuesday, May 3, 2016 4:53 AM, Mukul Agrawal <mukulagrawal78 at yahoo.com> wrote:
>  
> 
>  Thanks!I have Apache webserver running on port 80. I have root access  but I need use port 80 for outside traffic for both the webserver and the xpra server because seems like firewall is blocking traffic on other ports.
> I tried following :-
> Editted /etc/apache2/ports.conf to make sure httpd is listening to 8080 and not 80.
> 
> Listen 8080
> Then started apache :-
> sudo service apache2 start
> 
> And then started xpra server on port 80 with "sudo"sudo xpra start --bind-tcp=0.0.0.0:80 --html=on --start-child=xterm
> 
> Will --html=on start a new web server? Or will it just start a porxy and point it to httpd listenning on 8080?
> 
> Otherwise, should I do following (again with "sudo") 
> 
> sudo xpra start :10 --bind-tcp=0.0.0.0:80 --tcp-proxy=127.0.0.1:8080 
> --start-child=xterm
> 
> 
> When I point the browser on the client machine on internet to http://SERVER-IP should I expect to see index page of webserver or the xpra xterm?
> 
> Last question, what does :10 mean here because seems like we are accessing xpra through tcp port 80. So why bother specifying display number? Where do I use :10 in the xpra attach command when using html5 client?
> 
> Thanks in advance! Help greatly appreciated.
>  Regards, Mukul 
> ( https://sites.google.com/site/mukulagrawal ) 
> 
>     On Tuesday, May 3, 2016 2:01 AM, Antoine Martin <antoine at nagafix.co.uk> wrote:
>  
> 
>  Please do not email me directly, use the mailing list.
> 
> Antoine
> 
> On 03/05/16 15:49, Mukul Agrawal wrote:
>> I have an Apache webserver running on port 80. I have root access  but I
>> have to use port 80 for both webserver and xpra server because seems
>> like firewall in blocking traffic on other ports.
>>
>> Should I use this to start xpra server?
>>
>> sudo xpra start :10 --bind-tcp=80 --start-child=xterm --tcp-proxy=127.0.0.1:80
>>
>>
>> Another question, what does :10 mean here because seems like we are
>> accessing xpra through tcp port 80. So why bother specifying display
>> number? Do I or can I use :10 in the xpra attach command?
>>
>> Sent from Yahoo Mail on Android
>> <https://overview.mail.yahoo.com/mobile/?.src=Android>
>>
>>     On Mon, May 2, 2016 at 9:47 PM, Antoine Martin
>>     <antoine at nagafix.co.uk> wrote:
>>
>>     On 03/05/16 04:59, Mukul Agrawal wrote:
>>     > I am accessing a remote Ubuntu machine from a local MS Win7 machine.
>>     > I am trying to use the HTML5 client from browser. On Ubuntu
>>     machine I only have ports 22, 80 and 443 open.Can somebody suggest
>>     what exact command should I use to start the xpra server on ubuntu
>>     machine?I am guessing that I will need to use the port 80 for both
>>     xpra server as well as for http.
>>     > Is this possible? How do I do that?
>>     http://xpra.org/trac/wiki/Clients/HTML5
>>     It uses port 10000 for everything in this example, but you can use
>>     almost any port you like: ports below 1024 require root, so you're
>>     probably better off using a higher port or using iptables to redirect to
>>     a non-privileged port.
>>
>>     > I don't mind using secure-shell to manually log into the Ubuntu
>>     machine and then start the xpra-server with proper command to bind
>>     to proper websocket on the Ubuntu. In fact I will like to do that
>>     just to make sure I understand how this thing is working.
>>     > But eventually, it will be preferable if I could do that from
>>     web-browser on client machine itself and there is no need to logging
>>     into the Ubuntu machine separately to start the xpra-server.
>>     Starting xpra from a web browser will require some kind of web server to
>>     connect to in the first place.
>>     If xpra isn't started yet, you will need to use some other tool for
>>     that. Perhaps an apache cgi script?
>>
>>     > [BTW, I can use xpra with ssh and MSwindows client software just
>>     fine. It works beautifully! ]
>>     :)
>>
>>     Antoine
>>
>>
>>     > Regards, Mukul
>>     > ( https://sites.google.com/site/mukulagrawal
>>     )
>>
>>     _______________________________________________
>>     shifter-users mailing list
>>     shifter-users at lists.devloop.org.uk <javascript:return>
>>     http://lists.devloop.org.uk/mailman/listinfo/shifter-users
>>
> 
> 
> 
>    
> 
>   
> _______________________________________________
> shifter-users mailing list
> shifter-users at lists.devloop.org.uk
> http://lists.devloop.org.uk/mailman/listinfo/shifter-users
> 




More information about the shifter-users mailing list