[winswitch] XPRA/HTML5

Mukul Agrawal mukulagrawal78 at yahoo.com
Wed May 4 07:32:43 BST 2016


OK, thx. This helped a lot.
A couple more glitches (hopefully last ones!) :-

1. When I start xpra server to listen on tcp port throughsudo xpra start --bind-tcp=0.0.0.0:80 --html=on --start-child=xterm
I cannot stop it usingxpra stop 
or even 
sudo xpra stop

xpra shows buggy looking message saying no active session was found but when I try to restart another session at same display it says display is being used. I know for sure it is being sued because my client is still connected. Even if I kill the process listening to port 80 I still cannot freeup the display already used.

How do I stop xpra attached to TCP ports?

2. I used sudo because I want xpra server to listen to privileged port 80 but I do not want x-cleints to be running in sudo mode. Any ideas for a work around? How can applications started from non-priviledged account can send their graphics to xpra display connected to tcp port 80 ?
 
 Any ideas?
 Regards, 
Mukul 

    On Tuesday, May 3, 2016 7:04 PM, Antoine Martin <antoine at nagafix.co.uk> wrote:
 

 On 03/05/16 18:53, Mukul Agrawal 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?
Sort of.
It will start websockify on demand for handling TCP connections that
aren't using xpra's protocol, ie: HTTP.
Websockify also serves static webpages, in particular the xpra HTML5
client page as the default page.

> 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
That's the one you want.
It will redirect non-xpra traffic (ie: the websockify packet data from
the HTML5 client) to port 8080 where your apache server is listening.

> 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?
The index page of the webserver.
In the case of websockify, this page is the xpra HTML5 client page,
which is why you automatically get connected.
You can achieve the same thing with apache by dropping that same page
into the htdocs directory.

> Last question, what does :10 mean here because seems like we are accessing xpra through tcp port 80.
All applications running through xpra use an X11 display.
(well, when using the standard xpra X11 seamless server anyway)

On most distributions, you can omit the display number and one will be
chosen automatically.

> So why bother specifying display number? Where do I use :10 in the xpra attach command when using html5 client?
You don't.

Cheers
Antoine

> 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
> 

_______________________________________________
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