Xpra: Ticket #1557: Resize desktop size with regard to browser window size

Hi Antoine,

We discussed this in a previous ticket.

At Harvard's Institute for Quantitative Social Science, we are going to be replacing NoMachine site-wide with XPRA, running XPRA in containers and deploying them to Kubernetes to serve desktops to our academics and staff.

One crucial feature for us is to have the desktop size resize according to the desktop window, if possible, I would like:

I imagine you could do this by using jQuery to intercept resize events and passing these to xrandr

Best, Evan



Tue, 27 Jun 2017 12:27:17 GMT - esarmien:

"One crucial feature for us is to have the desktop size resize according to the desktop window"

What I menat is resize desktop size according to BROWSER window

We will exclusively be using the HTML5 functionality in XPRA. Our users are social scientists and have had enough trouble downloading the NoMachine? client. Love the simplicity of HTML5. :-)


Wed, 28 Jun 2017 09:38:01 GMT - Antoine Martin: status, component changed; milestone set

Original discussion: ticket:1551#comment:16.

Related to #530 and #56.

We should be able to:

This should be easy and can be done for 2.1. Doing the same for the python client will be a little bit harder, but should be done at the same time.

Note: until #56 is dealt with, the resolution of the desktop may not match the browser's frame exactly. (hence why we need to make the view centered, to make it nicer to look at)


Sat, 01 Jul 2017 12:16:16 GMT - Antoine Martin:

Partially implemented in r16158 for the HTML5 client. This part was quite easy.

Still TODO:


Sun, 02 Jul 2017 09:09:37 GMT - Antoine Martin:

With these changes, the solution works very well. Unfortunately, I think that this has been implemented the wrong way: the resize should be triggered as a window event, not as a hook on the desktop-resize packet. That's how the python client will be implemented, the html5 client should be changed to use the same method.


Sun, 02 Jul 2017 10:13:11 GMT - Antoine Martin:

Implemented in the python client in r16165 (this is a server-side change only!). r16162 was needed to fix a bug in the client handling of size hints (this needs to be backported)

The HTML5 client should be converted to use the same code path.


Mon, 03 Jul 2017 12:19:04 GMT - Antoine Martin: owner, status changed

Done in r16172: the desktop area is resized when the browser connects, and resized every time the browser window area changes.

@esarmien: please close if this works for you. There are beta builds with these changes here: http://xpra.org/beta (done 64-bit builds for centos 7.3, fedora 26 and debian stretch - more later)


Wed, 05 Jul 2017 21:29:10 GMT - esarmien: owner changed

Wow, Antoine! This is great. I really appreciate the work you put into this. Our users will love it.

You can resolve this ticket. Is there any way you can track progress on removing the borders around the screen? That would be great, but, not as important as this.


Thu, 06 Jul 2017 03:50:44 GMT - Antoine Martin: status changed; resolution set

The black borders are due to the lack of support for arbitrary resolutions in the dummy driver, you can subscribe to this ticket: #56


Thu, 06 Jul 2017 10:51:46 GMT - Antoine Martin:

Minor improvements:


Sat, 08 Jul 2017 10:38:15 GMT - Antoine Martin:

r16221 adds rate limiting to client resize requests to prevent dos. Note: because this uses a timer, we should cancel it if we receive a resize notification directly from the X11 server (ie: when the user also uses a randr resizing tool of some sort) - meh.

See also #1567


Sun, 09 Jul 2017 15:19:23 GMT - Antoine Martin:

This makes the Xdummy server a little bit slower to start, so r16252 increases the timeout used in the automated tests.


Mon, 10 Dec 2018 16:48:10 GMT - Patrik Meijer:

Is this enabled by default or what options do I need to pass into xpra besides (--html=on)? Are you guys on github? It's really awkward to track (no pun intended) the changes here. I found ​some repositories but they don't seem to be synced with this repo.. Thanks for an awesome application! Saved my day


Mon, 10 Dec 2018 17:17:21 GMT - Antoine Martin:


Mon, 10 Dec 2018 17:31:09 GMT - Patrik Meijer:

Replying to Antoine Martin:

OK, I'm using a browser (Chrome) as client. My problem to solve right now is that there is a huge window from one of the apps and there's no "global" scroll and the --max-size=800x600 doesn't seem to help either. Any other path around it? Thanks for the fast reply!


Mon, 10 Dec 2018 18:13:36 GMT - Antoine Martin:

OK, I'm using a browser (Chrome) as client. My problem to solve right now is that there is a huge window from one of the apps and there's no "global" scroll and the --max-size=800x600 doesn't seem to help either. Any other path around it?

This problem is unrelated to this ticket. Try the beta 2.5 builds and use max-size on the server side. The max-size switch is not configurable from the html5 client.


Thu, 30 May 2019 21:24:20 GMT - esarmien:

Hi Antoine,

I think this problem has reappeared. I am using the latest stable XPRA on Fedora 30. I am including the generated bugreport zip. Resizing the browser window does not resize the desktop. I tried resizing in all different ways.

Best, Evan


Thu, 30 May 2019 21:24:40 GMT - esarmien: attachment set

Resize not workig


Thu, 30 May 2019 21:30:48 GMT - esarmien:

Please also see https://imgur.com/a/lZI82TY


Mon, 17 Jun 2019 04:56:38 GMT - Antoine Martin: status, description changed; resolution deleted

I can reproduce the problem.


Mon, 17 Jun 2019 06:04:39 GMT - Antoine Martin: status changed; resolution set

Fixed in r22967. (will backport)

You can apply the fixes by hand or use the html5 client copy found here: https://xpra.org/html5.


Sat, 23 Jan 2021 05:27:36 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1557