resize desktop (SunRay)
Starting from SRSS 4.1, the Sun Ray Xnewt X server supports the XRandR extension, which allows resizing your desktop while the session is running. This is particularly useful, if you often hotdeskamong Sun Ray DTUs with monitors of different sizes.
Bob even has created a utfit script, which you can use automatically fit your desktop size to the new screen size on hotdesk (needs to be run via utaction on connect).
But the set of sizes any given Sun Ray session can be resized to is limited. And this selection of sizes doesn't really have anything to do with the currently used Sun Ray and its monitor. If the monitor is small, you may be able to something larger than your monitor and will get scan+pan behavior. If the monitor is large, its size may simply not be available. Instead the sizes that are offered depend on the initial size of your desktop - or more precisely the size of the X server canvas.
When a Sun Ray Xnewt X server is started, it creates a frame buffer that best fits the display of the currently connected DTU. Only if this monitor is very small, a certain minimum size will be reserved. This size is then seen as the initial size of the desktop. As the frame buffer can't be grown later, this size then becomes the limit for future resizing: you can shrink your desktop and enlarge it again, but only up to the original size. XrandR will offer you a set of standard sizes, but these must be smaller than the starting size in both dimensions.
This is particularly troublesome, if you frequently move between screens where neither is smaller than the other in both dimensions. Myself I usually use a 1600x1200 20,1" monitor at work and a 22" 1680x1050 monitor at home. Now if I start my session at work (1600x1200), I can't resize it to fit my home screen, as 1680px is wider than the frame buffer. But if the session is started at 1680x1050, then I can't resize for my work screen either, as 1200px is taller than the 1050px frame buffer
utxconfig to the rescue
To solve this problem, you can control the size of the X server canvas using the utxconfigcommand. If you specify a resolution (i.e. a size), a newly started X server will create a frame buffer that can hold this size. In my case, I used
$ utxconfig -r 1680x1200
to specify an odd size, which fits no real monitor exactly. The important property of this choice is that it is at least as large as the pixes dimensions of all the monitor I regularly use. After issuing this command and getting a new X server, I can see that XrandR now allows me to resize my desktop to all the sizes I need:
SZ: Pixels Physical Refresh
I need to adjust the size right after initial login, but the utfit script will do even that automatically. And the benefit is well worth the tiny effort anyhow.
Update: the utxconfig command binds the chosen size to your token and stores it in the Sun Ray Data Store. Thus the command needs to be run only once within a failover group. The setting applies on all servers of the group and stays active until you run utxconfig again to change it. But if you occasionally use multiple tokens, you have to set up the session size separately for each one.